mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-19 01:51:21 +08:00
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:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user