fix(vscode): pass workspace directory to question reply/reject HTTP calls

Without the directory header, the server falls back to process.cwd()
which resolves to a different Instance context than where the question
was created. The pending question lookup silently fails and the LLM
never receives the answer.
This commit is contained in:
Igor Šćekić
2026-02-12 13:36:58 +01:00
parent e0ce807e0b
commit 21f78ce9ee
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -736,7 +736,7 @@ export class KiloProvider implements vscode.WebviewViewProvider {
}
try {
await this.httpClient.replyToQuestion(requestID, answers)
await this.httpClient.replyToQuestion(requestID, answers, this.getWorkspaceDirectory())
} catch (error) {
console.error("[Kilo New] KiloProvider: Failed to reply to question:", error)
this.postMessage({ type: "questionError", requestID })
@@ -753,7 +753,7 @@ export class KiloProvider implements vscode.WebviewViewProvider {
}
try {
await this.httpClient.rejectQuestion(requestID)
await this.httpClient.rejectQuestion(requestID, this.getWorkspaceDirectory())
} catch (error) {
console.error("[Kilo New] KiloProvider: Failed to reject question:", error)
this.postMessage({ type: "questionError", requestID })
@@ -242,15 +242,15 @@ export class HttpClient {
/**
* Reply to a question request with user answers.
*/
async replyToQuestion(requestID: string, answers: string[][]): Promise<void> {
await this.request<void>("POST", `/question/${requestID}/reply`, { answers }, { allowEmpty: true })
async replyToQuestion(requestID: string, answers: string[][], directory: string): Promise<void> {
await this.request<void>("POST", `/question/${requestID}/reply`, { answers }, { directory, allowEmpty: true })
}
/**
* Reject (dismiss) a question request.
*/
async rejectQuestion(requestID: string): Promise<void> {
await this.request<void>("POST", `/question/${requestID}/reject`, {}, { allowEmpty: true })
async rejectQuestion(requestID: string, directory: string): Promise<void> {
await this.request<void>("POST", `/question/${requestID}/reject`, {}, { directory, allowEmpty: true })
}
// ============================================