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