From b4f0ad183a148eab02f16c88da76c350bdec9faa Mon Sep 17 00:00:00 2001 From: Marius Date: Thu, 19 Feb 2026 14:52:42 +0100 Subject: [PATCH] fix(vscode): use session directory for @ file search in agent manager worktrees (#469) requestFileSearch handler called getWorkspaceDirectory() without a sessionId, so @ file mentions in Agent Manager worktree sessions always searched the main workspace instead of the worktree directory. This meant files only in the worktree branch were not found, and shared files could resolve to the wrong copy. Pass currentSession.id so the sessionDirectories map is consulted, matching the pattern every other handler already follows. --- packages/kilo-vscode/src/KiloProvider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kilo-vscode/src/KiloProvider.ts b/packages/kilo-vscode/src/KiloProvider.ts index 7a43b8d1bb4..e9c6a09bd83 100644 --- a/packages/kilo-vscode/src/KiloProvider.ts +++ b/packages/kilo-vscode/src/KiloProvider.ts @@ -369,7 +369,7 @@ export class KiloProvider implements vscode.WebviewViewProvider, TelemetryProper case "requestFileSearch": { const client = this.httpClient if (client) { - const dir = this.getWorkspaceDirectory() + const dir = this.getWorkspaceDirectory(this.currentSession?.id) void client .findFiles(message.query, dir) .then((paths) => {