diff --git a/vscode/src/panel/KanbanPanel.ts b/vscode/src/panel/KanbanPanel.ts index 2d4e519..93b7a63 100644 --- a/vscode/src/panel/KanbanPanel.ts +++ b/vscode/src/panel/KanbanPanel.ts @@ -317,6 +317,10 @@ export class KanbanWebviewPanel { // toolbar button whenever the working tree is clean. Fire-and-forget — // `setupGitWatcher` handles its own activation + retry logic. toolbar.setupGitWatcher(this) + + const profilesWatcher = settings.watchProfilesFile(this) + if (profilesWatcher) + this.disposables.push(profilesWatcher) } private syncFocusedTerminalTab(): void { diff --git a/vscode/src/panel/handlers/settings.ts b/vscode/src/panel/handlers/settings.ts index c1321cb..e7954df 100644 --- a/vscode/src/panel/handlers/settings.ts +++ b/vscode/src/panel/handlers/settings.ts @@ -1,3 +1,4 @@ +import type { Disposable } from 'vscode' import type { ProfilesData } from '../../profiles/store' import type { KanbanWebviewPanel } from '../KanbanPanel' import { execFile } from 'node:child_process' @@ -5,7 +6,7 @@ import * as fs from 'node:fs' import * as os from 'node:os' import * as path from 'node:path' import process from 'node:process' -import { commands, env, Uri, workspace } from 'vscode' +import { commands, env, RelativePattern, Uri, workspace } from 'vscode' import { clearIdentityCache, initIdentity } from '../../auth/identity' import { getToken, getYouTrackToken, setToken, setYouTrackToken } from '../../auth/secrets' import { listClaudeProfiles, setProfilesDirOverride } from '../../cc/profiles' @@ -329,6 +330,24 @@ export async function handleProfilesGet(panel: KanbanWebviewPanel): Promise { + void handleProfilesGet(panel) + } + watcher.onDidChange(refresh) + watcher.onDidCreate(refresh) + watcher.onDidDelete(refresh) + return watcher +} + /** * Read profiles from the hardcoded directory and push the list to the * webview. Failures are swallowed and surfaced as an empty list so the