Change resetTask to clearTask

This commit is contained in:
Saoud Rizwan
2024-07-09 15:11:53 -04:00
parent 4310d82d27
commit caca0ca606
2 changed files with 4 additions and 4 deletions

View File

@@ -37,7 +37,7 @@ export function activate(context: vscode.ExtensionContext) {
vscode.commands.registerCommand("claude-dev.plusButtonTapped", async () => { vscode.commands.registerCommand("claude-dev.plusButtonTapped", async () => {
const message = "claude-dev.plusButtonTapped!" const message = "claude-dev.plusButtonTapped!"
//vscode.window.showInformationMessage(message) //vscode.window.showInformationMessage(message)
await provider.resetTask() await provider.clearTask()
await provider.postStateToWebview() await provider.postStateToWebview()
await provider.postMessageToWebview({ type: "action", action: "plusButtonTapped"}) await provider.postMessageToWebview({ type: "action", action: "plusButtonTapped"})
}) })

View File

@@ -53,7 +53,7 @@ export class SidebarProvider implements vscode.WebviewViewProvider {
}) })
// if the extension is starting a new session, clear previous task state // if the extension is starting a new session, clear previous task state
this.resetTask() this.clearTask()
} }
async tryToInitClaudeDevWithTask(task: string) { async tryToInitClaudeDevWithTask(task: string) {
@@ -197,7 +197,7 @@ export class SidebarProvider implements vscode.WebviewViewProvider {
this.claudeDev?.handleWebviewAskResponse(message.askResponse!, message.text) this.claudeDev?.handleWebviewAskResponse(message.askResponse!, message.text)
break break
case "abortTask": case "abortTask":
await this.resetTask() await this.clearTask()
await this.postStateToWebview() await this.postStateToWebview()
break break
// Add more switch case statements here as more webview message commands // Add more switch case statements here as more webview message commands
@@ -219,7 +219,7 @@ export class SidebarProvider implements vscode.WebviewViewProvider {
}) })
} }
async resetTask() { async clearTask() {
this.claudeDev = undefined this.claudeDev = undefined
await this.setClaudeMessages([]) await this.setClaudeMessages([])
} }