Fix state management when starting new task with menu button

This commit is contained in:
Saoud Rizwan
2024-07-08 13:20:34 -04:00
parent 4da785b822
commit 6cace99030
3 changed files with 32 additions and 21 deletions

View File

@@ -34,10 +34,12 @@ export function activate(context: vscode.ExtensionContext) {
context.subscriptions.push(vscode.window.registerWebviewViewProvider(SidebarProvider.viewType, provider))
context.subscriptions.push(
vscode.commands.registerCommand("claude-dev.plusButtonTapped", () => {
vscode.commands.registerCommand("claude-dev.plusButtonTapped", async () => {
const message = "claude-dev.plusButtonTapped!"
vscode.window.showInformationMessage(message)
provider.postMessageToWebview({ type: "action", action: "plusButtonTapped"})
//vscode.window.showInformationMessage(message)
await provider.resetTask()
await provider.postStateToWebview()
await provider.postMessageToWebview({ type: "action", action: "plusButtonTapped"})
})
)