File tree Expand file tree Collapse file tree
packages/opencode/src/acp Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,6 +46,13 @@ type ModelOption = { modelId: string; name: string }
4646
4747const DEFAULT_VARIANT_VALUE = "default"
4848
49+ function toolTitle ( part : MessageV2 . ToolPart ) : string {
50+ const state = part . state as MessageV2 . ToolStateCompleted
51+ if ( part . tool !== "bash" ) return state . title
52+ const cmd = state . input [ "command" ]
53+ return typeof cmd === "string" ? cmd : state . title
54+ }
55+
4956export namespace ACP {
5057 const log = Log . create ( { service : "acp-agent" } )
5158
@@ -321,7 +328,7 @@ export namespace ACP {
321328 status : "completed" ,
322329 kind,
323330 content,
324- title : part . state . title ,
331+ title : toolTitle ( part ) ,
325332 rawInput : part . state . input ,
326333 rawOutput : {
327334 output : part . state . output ,
@@ -803,7 +810,7 @@ export namespace ACP {
803810 status : "completed" ,
804811 kind,
805812 content,
806- title : part . state . title ,
813+ title : toolTitle ( part ) ,
807814 rawInput : part . state . input ,
808815 rawOutput : {
809816 output : part . state . output ,
You can’t perform that action at this time.
0 commit comments