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.
This commit is contained in:
Marius
2026-02-19 14:52:42 +01:00
committed by GitHub
parent 2e9c140282
commit b4f0ad183a
+1 -1
View File
@@ -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) => {