Skip to content

Commit

Permalink
always make details openable in trace tree
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Jun 21, 2024
1 parent 3da2030 commit 4825831
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions packages/vscode/src/tracetree.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import * as vscode from "vscode"
import { ExtensionState } from "./state"
import {
CHANGE,
TRACE_NODE_PREFIX,
TraceNode,
} from "genaiscript-core"
import { CHANGE, TRACE_NODE_PREFIX, TraceNode } from "genaiscript-core"
import { infoUri } from "./markdowndocumentprovider"

function unmarkdown(text: string) {
Expand Down Expand Up @@ -36,17 +32,11 @@ class TraceTreeDataProvider implements vscode.TreeDataProvider<TraceNode> {
.length > 0
? vscode.TreeItemCollapsibleState.Collapsed
: vscode.TreeItemCollapsibleState.None
if (
item.collapsibleState ===
vscode.TreeItemCollapsibleState.None
)
item.command = {
command: "markdown.showPreview",
arguments: [
infoUri(TRACE_NODE_PREFIX + item.id + ".md"),
],
title: "Show Preview",
}
item.command = {
command: "markdown.showPreview",
arguments: [infoUri(TRACE_NODE_PREFIX + item.id + ".md")],
title: "Show Preview",
}
if (
typeof element.content[0] === "string" &&
element.content[0]
Expand Down

0 comments on commit 4825831

Please sign in to comment.