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:
1 parent
3fd672c999
commit
0bbd6e75de
12 files changed
+537
-62
No files matched your search
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user