mirror of
https://github.com/zhukunpenglinyutong/jetbrains-cc-gui.git
synced 2026-11-02 12:12:26 +08:00
OpenCode 1.18 run --format json pushes each part only once with terminal state: text/reasoning arrive as complete parts and the tool part arrives as a single completed event. The parser assumed a two-phase started->completed tool flow, so it emitted orphan tool_results that never rendered, and the missing --thinking flag made the CLI suppress reasoning parts entirely. - classify events by part.type (text/reasoning/tool), keeping legacy top-level type matching as fallback - synthesize the tool_use + tool_result pair from the single terminal tool event, keyed on part.callID; started-dedup keeps future two-phase pushes converging on one card - pass the plugin thinking toggle down to --thinking (Java stdin -> channel -> argv); bypassPermissions maps to --auto - emit only the novel suffix when a part is re-pushed with cumulative text, so text never doubles in the UI - capture real 1.18.32 event samples and replay them as test fixtures The streaming toggle stays a documented no-op for OpenCode until a serve-based integration lands (see docs/plans plan for the matrix).
4 lines
1.0 KiB
JSON
4 lines
1.0 KiB
JSON
{"type":"step_start","timestamp":1790662444627,"sessionID":"ses_f1433d0b4ffeqPsO1S5RiM2ybC","part":{"id":"prt_0ebcc863b0015A5GRfLWlIlkob","messageID":"msg_0ebcc3431001Rzy63AKesXVRxE","sessionID":"ses_f1433d0b4ffeqPsO1S5RiM2ybC","snapshot":"56a4d4a7d4bdefc6e7d8e16ad87a3640c048686f","type":"step-start"}}
|
||
{"type":"text","timestamp":1790662445460,"sessionID":"ses_f1433d0b4ffeqPsO1S5RiM2ybC","part":{"id":"prt_0ebcc87ef001xvCmSQ68XrgHNP","messageID":"msg_0ebcc3431001Rzy63AKesXVRxE","sessionID":"ses_f1433d0b4ffeqPsO1S5RiM2ybC","type":"text","text":"17 × 23 = 17 × (20 + 3) = 340 + 51 = **391**","time":{"start":1790662445039,"end":1790662445455}}}
|
||
{"type":"step_finish","timestamp":1790662446931,"sessionID":"ses_f1433d0b4ffeqPsO1S5RiM2ybC","part":{"id":"prt_0ebcc8f4c0017ttbX09DrTIY4R","reason":"stop","snapshot":"56a4d4a7d4bdefc6e7d8e16ad87a3640c048686f","messageID":"msg_0ebcc3431001Rzy63AKesXVRxE","sessionID":"ses_f1433d0b4ffeqPsO1S5RiM2ybC","type":"step-finish","tokens":{"total":8779,"input":26,"output":35,"reasoning":14,"cache":{"write":0,"read":8704}},"cost":0}}
|