Refactor commands

This commit is contained in:
Saoud Rizwan
2024-10-06 05:39:11 -04:00
parent c04dfc76cb
commit 5190d30ae3
9 changed files with 39 additions and 39 deletions

View File

@@ -19,15 +19,15 @@ const AppContent = () => {
switch (message.type) {
case "action":
switch (message.action!) {
case "settingsButtonTapped":
case "settingsButtonClicked":
setShowSettings(true)
setShowHistory(false)
break
case "historyButtonTapped":
case "historyButtonClicked":
setShowSettings(false)
setShowHistory(true)
break
case "chatButtonTapped":
case "chatButtonClicked":
setShowSettings(false)
setShowHistory(false)
break

View File

@@ -269,7 +269,7 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
case "tool":
case "resume_task":
case "mistake_limit_reached":
vscode.postMessage({ type: "askResponse", askResponse: "yesButtonTapped" })
vscode.postMessage({ type: "askResponse", askResponse: "yesButtonClicked" })
break
case "completion_result":
case "resume_completed_task":
@@ -299,7 +299,7 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
case "command":
case "tool":
// responds to the API with a "This operation failed" and lets it try again
vscode.postMessage({ type: "askResponse", askResponse: "noButtonTapped" })
vscode.postMessage({ type: "askResponse", askResponse: "noButtonClicked" })
break
}
setTextAreaDisabled(true)