From e6760ed6cc3e194ccaee515f8a4afee12ba38371 Mon Sep 17 00:00:00 2001 From: Toshii <94262432+0xToshii@users.noreply.github.com> Date: Mon, 30 Jun 2025 11:33:00 -0700 Subject: [PATCH] race (#4583) --- src/core/controller/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index 688c818b..9d4530e8 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -702,7 +702,7 @@ export class Controller { await setTimeoutPromise(100) // Post message to webview with the selected code - const fileMention = this.getFileMentionFromPath(filePath) + const fileMention = await this.getFileMentionFromPath(filePath) let input = `${fileMention}\n\`\`\`\n${code}\n\`\`\`` if (diagnostics) { @@ -739,7 +739,7 @@ export class Controller { await vscode.commands.executeCommand("claude-dev.SidebarProvider.focus") await setTimeoutPromise(100) - const fileMention = this.getFileMentionFromPath(filePath) + const fileMention = await this.getFileMentionFromPath(filePath) const problemsString = this.convertDiagnosticsToProblemsString(diagnostics) await this.initTask(`Fix the following code in ${fileMention}\n\`\`\`\n${code}\n\`\`\`\n\nProblems:\n${problemsString}`) @@ -918,7 +918,7 @@ export class Controller { if (this.task) { await telemetryService.sendCollectedEvents(this.task.taskId) } - this.task?.abortTask() + await this.task?.abortTask() this.task = undefined // removes reference to it, so once promises end it will be garbage collected }