Compare commits

...
Author SHA1 Message Date
0xtoshii ff53a59be2 condense text 2025-05-12 16:09:20 -07:00
0xtoshii 6d4e18e0f6 changeset 2025-05-12 16:03:36 -07:00
0xtoshii 9554e8c29d proto for condense 2025-05-12 16:03:03 -07:00
7 changed files with 27 additions and 7 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"claude-dev": patch
---
convert condense command to use grpc
+1
View File
@@ -10,4 +10,5 @@ import "common.proto";
service SlashService {
// Sends button click message
rpc reportBug(StringRequest) returns (Empty);
rpc condense(StringRequest) returns (Empty);
}
-3
View File
@@ -271,9 +271,6 @@ export class Controller {
// initializing new instance of Cline will make sure that any agentically running promises in old instance don't affect our new task. this essentially creates a fresh slate for the new task
await this.initTask(message.text, message.images)
break
case "condense":
this.task?.handleWebviewAskResponse("yesButtonClicked")
break
case "apiConfiguration":
if (message.apiConfiguration) {
await updateApiConfiguration(this.context, message.apiConfiguration)
+10
View File
@@ -0,0 +1,10 @@
import { Controller } from ".."
import { StringRequest, Empty } from "../../../shared/proto/common"
/**
* Command slash command logic
*/
export async function condense(controller: Controller, request: StringRequest): Promise<Empty> {
await controller.task?.handleWebviewAskResponse("yesButtonClicked")
return Empty.create()
}
+2
View File
@@ -3,10 +3,12 @@
// Import all method implementations
import { registerMethod } from "./index"
import { condense } from "./condense"
import { reportBug } from "./reportBug"
// Register all slash service methods
export function registerAllMethods(): void {
// Register each method with the registry
registerMethod("condense", condense)
registerMethod("reportBug", reportBug)
}
+8
View File
@@ -24,5 +24,13 @@ export const SlashServiceDefinition = {
responseStream: false,
options: {},
},
condense: {
name: "condense",
requestType: StringRequest,
requestStream: false,
responseType: Empty,
responseStream: false,
options: {},
},
},
} as const
+1 -4
View File
@@ -556,10 +556,7 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
})
break
case "condense":
vscode.postMessage({
type: "condense",
text: lastMessage?.text,
})
await SlashServiceClient.condense({ value: lastMessage?.text }).catch((err) => console.error(err))
break
case "report_bug":
await SlashServiceClient.reportBug({ value: lastMessage?.text }).catch((err) => console.error(err))