optionsResponse protobus migration/removal (#3860)

This commit is contained in:
canvrno authored and GitHub committed 2025-05-29 22:47:22 -07:00
1 parent 915cf76f85
commit 8f72bf11f7
4 files changed
+16 -12

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
---
"claude-dev": patch
---
optionsResponse protobus migration
-5
View File
@@ -285,11 +285,6 @@ export class Controller {
}
await this.postStateToWebview()
break
case "optionsResponse":
if (this.task) {
await this.task.handleWebviewAskResponse("messageResponse", message.text || "", [])
}
break
case "fetchUserCreditsData": {
await this.fetchUserCreditsData()
break
-1
View File
@@ -22,7 +22,6 @@ export interface WebviewMessage {
| "updateSettings"
| "clearAllTaskHistory"
| "fetchUserCreditsData"
| "optionsResponse"
| "searchFiles"
| "grpc_request"
| "grpc_request_cancel"
@@ -1,6 +1,6 @@
import styled from "styled-components"
import { CODE_BLOCK_BG_COLOR } from "@/components/common/CodeBlock"
import { vscode } from "@/utils/vscode"
import { TaskServiceClient } from "@/services/grpc-client"
const OptionButton = styled.button<{ isSelected?: boolean; isNotSelectable?: boolean }>`
padding: 8px 12px;
@@ -56,14 +56,19 @@ export const OptionsButtons = ({
key={index}
isSelected={option === selected}
isNotSelectable={hasSelected || !isActive}
onClick={() => {
onClick={async () => {
if (hasSelected || !isActive) {
return
}
vscode.postMessage({
type: "optionsResponse",
text: option + (inputValue ? `: ${inputValue?.trim()}` : ""),
})
try {
await TaskServiceClient.askResponse({
responseType: "messageResponse",
text: option + (inputValue ? `: ${inputValue?.trim()}` : ""),
images: [],
})
} catch (error) {
console.error("Error sending option response:", error)
}
}}>
<span className="ph-no-capture">{option}</span>
</OptionButton>