fix(chat): harden inline tool call streaming

Telegram streaming callbacks now enqueue cancellable rendering rather than performing network I/O while draining the authoritative model stream. Final edit failures fall back to normal split delivery.

Completed tool events now correlate inputs by call ID and expose only bounded, conservative parameter shapes. Tool-call visibility is snapshotted per reply so reloads cannot change an in-flight turn.
This commit is contained in:
sam committed 2026-08-14 04:52:48 +10:00
1 parent 3fd672c999
commit 0bbd6e75de
12 files changed
+537 -62

No files matched your search

+2
View File
@@ -12,11 +12,13 @@ export function appendToolCall(host, event) {
const name = event?.tool ?? "";
if (!host || !name) return null;
const parameters = event.parameters ?? "";
const summary = event.text ?? "";
const line = el(
"div.chat-tool",
el("span.chat-tool-icon", "🔧"),
el("span.chat-tool-name", name),
parameters && el("code.chat-tool-parameters", parameters),
el("span.chat-tool-summary", summary),
);
// A failure reads as a completed step unless it is marked as one.