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 }