@trops/dash-core 0.1.389 → 0.1.390
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/electron/index.js +30 -0
- package/dist/electron/index.js.map +1 -1
- package/package.json +1 -1
package/dist/electron/index.js
CHANGED
|
@@ -51545,6 +51545,36 @@ const cliController$2 = {
|
|
|
51545
51545
|
sessions.set(widgetUuid, capturedSessionId);
|
|
51546
51546
|
}
|
|
51547
51547
|
|
|
51548
|
+
// Claude Code's stream-json emits complete-message envelopes
|
|
51549
|
+
// ({"type": "assistant", "message": {content: [...]}}) rather
|
|
51550
|
+
// than the granular content_block_start/delta/stop events used
|
|
51551
|
+
// by the raw Anthropic streaming API. We handle both shapes —
|
|
51552
|
+
// the complete-message path is the one that actually fires in
|
|
51553
|
+
// CLI mode today (the content_block_* branches remain in case a
|
|
51554
|
+
// future CLI version or --include-partial-messages flag brings
|
|
51555
|
+
// back the granular form).
|
|
51556
|
+
if (parsed.type === "assistant" && parsed.message?.content) {
|
|
51557
|
+
for (const block of parsed.message.content) {
|
|
51558
|
+
if (block?.type === "text" && block.text) {
|
|
51559
|
+
// Emit as a single delta so the renderer sees the text.
|
|
51560
|
+
// (Granular deltas aren't produced in this mode.)
|
|
51561
|
+
safeSend(win, LLM_STREAM_DELTA$2, {
|
|
51562
|
+
requestId,
|
|
51563
|
+
text: block.text,
|
|
51564
|
+
});
|
|
51565
|
+
} else if (block?.type === "tool_use" && block.id && block.name) {
|
|
51566
|
+
safeSend(win, LLM_STREAM_TOOL_CALL$2, {
|
|
51567
|
+
requestId,
|
|
51568
|
+
toolUseId: block.id,
|
|
51569
|
+
toolName: block.name,
|
|
51570
|
+
serverName: "Claude Code",
|
|
51571
|
+
input: block.input || {},
|
|
51572
|
+
});
|
|
51573
|
+
}
|
|
51574
|
+
}
|
|
51575
|
+
continue;
|
|
51576
|
+
}
|
|
51577
|
+
|
|
51548
51578
|
// Map CLI stream-json events to IPC events
|
|
51549
51579
|
if (parsed.type === "content_block_delta") {
|
|
51550
51580
|
if (parsed.delta?.type === "text_delta" && parsed.delta.text) {
|