Skip to content

Commit

Permalink
don't watch .env anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Feb 2, 2025
1 parent 9d937f2 commit 10279ca
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions packages/vscode/src/connectioninfotree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ class ConnectionInfoTreeDataProvider
this.refresh()
})
)
const watcher = vscode.workspace.createFileSystemWatcher("./.env")
watcher.onDidChange(() => this.refresh())
watcher.onDidDelete(() => this.refresh())
subscriptions.push(watcher)
}

async getTreeItem(
Expand All @@ -36,15 +32,22 @@ class ConnectionInfoTreeDataProvider
{ token: false }
)
if (res) {
item.description = res.base || "?"
item.iconPath = "check"
item.description = res.base || ""
item.tooltip = YAMLStringify(res)
item.command = <vscode.Command>{
command: "vscode.open",
arguments: [this.state.host.toUri("./.env")],
arguments: [
this.state.host.toUri(
"https://microsoft.github.io/genaiscript/getting-started/configuration/#" +
element.provider
),
],
}
}
return item
}

getChildren(
element?: ConnectionInfoTreeData
): vscode.ProviderResult<ConnectionInfoTreeData[]> {
Expand Down

0 comments on commit 10279ca

Please sign in to comment.