Commit Graph
3982 Commits
Author SHA1 Message Date
Classic298andClaude Opus 5 3749e7dc74 fix: stop streaming responses breaking on a duplicate output key (#29053)
* fix: stop streaming responses breaking on a duplicate output key

With reasoning-capable models the chat froze mid-stream: the first chunk of the answer appeared, nothing followed, and the whole message only showed up once generation finished. The browser console showed a Svelte each_key_duplicate error.

When a stream event addresses an output slot past the end of the array, the missing slots were filled with the event's own item, id included, so a gap of two left two entries claiming the same id. The next chunk for that item was matched by id, landed in the first of the two, and the rendered list ended up with two items sharing a key, which Svelte refuses to update.

Only the addressed slot now takes the event's item, and the slots before it are anonymous placeholders. Replayed the reported event sequence against the real code: keys are unique again and the chunks stay in order instead of being split across the copies.

* fix: stream reasoning deltas when the provider also sends reasoning_details

Providers such as OpenRouter emit reasoning_details alongside the reasoning
text on the same delta. Merging those details cleared the pending event
unconditionally, discarding the response.reasoning_text.delta that had just
been built, so the client received no reasoning until the response completed
and the thinking block only appeared after generation finished.

The event is now only dropped when the details were all there was to report.
Details persistence is unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014uuEg4AXPs9zE3vVUfN1Fj

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-08-27 18:25:49 -04:00
Timothy Jaeryang Baek ae549d3e4a refac 2026-08-27 16:41:43 -04:00
Timothy Jaeryang Baek 9d95a0148b refac 2026-08-27 16:06:25 -04:00
Timothy Jaeryang Baek 061fb43432 refac 2026-08-27 15:34:20 -04:00
Timothy Jaeryang Baek 5c62cc0517 chore: format 2026-08-25 16:53:53 -04:00
Timothy Jaeryang Baek f71e9570c0 refac 2026-08-25 16:52:31 -04:00
Timothy Jaeryang Baek 54d7a22370 refac 2026-08-25 16:34:49 -04:00
Timothy Jaeryang Baek 02400c7a50 refac 2026-08-25 15:15:18 -04:00
Timothy Jaeryang Baek f158f892f4 refac 2026-08-25 15:14:11 -04:00
Timothy Jaeryang Baek bc4c91e6d6 refac 2026-08-25 15:11:06 -04:00
Timothy Jaeryang Baek a21c8d15ee refac 2026-08-25 14:48:38 -04:00
Timothy Jaeryang Baek 3374b21a7d refac 2026-08-25 14:39:25 -04:00
Timothy Jaeryang Baek 92a1502126 refac 2026-08-25 14:22:20 -04:00
Timothy Jaeryang Baek 7198e9d0df refac 2026-08-25 14:06:25 -04:00
Timothy Jaeryang Baek d241df8d79 refac 2026-08-25 13:39:54 -04:00
Timothy Jaeryang Baek a4738e0459 refac 2026-08-25 12:45:12 -04:00
Timothy Jaeryang Baek 2f97c9fce3 refac 2026-08-25 10:00:43 -04:00
Timothy Jaeryang Baek aa3d569610 refac 2026-08-25 09:59:07 -04:00
Timothy Jaeryang Baek 2a0274a0a0 refac 2026-08-24 20:34:59 -04:00
Timothy Jaeryang Baek 11db926a7b refac 2026-08-24 19:20:24 -04:00
G30 e6648aefb5 fix: honor the terminal file browser filesystem root instead of clamping to home (#29006) 2026-08-24 17:55:51 -05:00
Timothy Jaeryang Baek e9efb95a9c refac 2026-08-24 18:17:11 -04:00
Timothy Jaeryang Baek 7a533d0d5b refac 2026-08-24 18:14:30 -04:00
Timothy Jaeryang Baek fd8cc2ba4a refac 2026-08-24 18:06:59 -04:00
G30 da9245626e fix: keep the viewport in place when older messages load above it (#28657) 2026-08-24 17:51:20 -04:00
Timothy Jaeryang Baek 8c1f3d3824 refac 2026-08-24 17:39:30 -04:00
Timothy Jaeryang Baek 8a170897ba refac 2026-08-24 07:28:09 -04:00
Timothy Jaeryang Baek 495296346e refac 2026-08-24 06:26:49 -04:00
Timothy Jaeryang Baek ef455fcef9 refac 2026-08-24 06:25:09 -04:00
Timothy Jaeryang Baek 978d257214 refac 2026-08-24 05:40:53 -04:00
Timothy Jaeryang Baek b30b11d4c9 refac 2026-08-23 16:01:36 -04:00
Timothy Jaeryang Baek e623c02acc refac 2026-08-23 15:06:30 -04:00
Timothy Jaeryang Baek 78f48a21ee refac 2026-08-23 14:40:48 -04:00
Timothy Jaeryang Baek 842c1f9d67 refac 2026-08-23 13:10:07 -04:00
Timothy Jaeryang Baek 0fb542b376 refac 2026-08-23 12:59:59 -04:00
Timothy Jaeryang Baek 3c66d639e3 refac 2026-08-23 12:33:34 -04:00
Timothy Jaeryang Baek c1c81f8127 refac 2026-08-23 03:40:40 -04:00
Timothy Jaeryang Baek f3f76095d1 refac 2026-08-23 02:34:08 -04:00
Timothy Jaeryang Baek 7abe11346a refac 2026-08-22 09:13:13 -04:00
Timothy Jaeryang Baek d17f06a235 refac 2026-08-22 08:43:46 -04:00
Timothy Jaeryang Baek 1b3b9375bb refac 2026-08-22 08:21:53 -04:00
Timothy Jaeryang Baek d7d935275a refac 2026-08-22 08:18:38 -04:00
G30 d2bc98eaeb fix: let the composer's model selector shrink so narrow containers keep every control visible (#28912) 2026-08-21 12:04:59 -07:00
Classic298 18c604baa9 fix: voice mode produces no audio when the task model returns empty content (#28724)
With "show emoji in call" enabled, voice mode stayed completely silent and no request ever reached the configured TTS server. Reasoning models served with a reasoning parser return `message.content` as null and put the text in `reasoning_content`, and the emoji helper called `.replace()` on that null value and threw.

The call overlay ran the emoji request first, inside the same `try` block as speech synthesis, so that error skipped the entire TTS section. The audio cache was never filled, and the playback loop kept re-queueing the same content every 200 ms without ever playing it. Read aloud was unaffected because it synthesizes speech directly, which is why the failure looked specific to voice mode.

Fixed on both sides: the optional chain in `generateEmoji` now covers `content`, and the emoji request in the call overlay gets its own catch, matching the speech synthesis call directly below it. An emoji failure now costs the emoji instead of the whole reply.
2026-08-20 13:03:55 -07:00
G30 a0e7d0e3a4 fix: send the model id when ejecting from the model selector (#28766) 2026-08-20 12:58:14 -07:00
Timothy Jaeryang Baek 8a42aa53e8 refac 2026-08-19 22:48:32 -07:00
Timothy Jaeryang Baek 46dce79eb0 refac 2026-08-19 22:28:41 -07:00
Timothy Jaeryang Baek 33dff414e8 refac 2026-08-19 16:35:49 -07:00
G30 dd7158b45f fix: clear the integrations search when leaving a section (#28812) 2026-08-19 16:14:53 -07:00
G30 bcb50fe7b0 fix: derive integrations toggle state from the selected ids (#28807) 2026-08-19 12:46:17 -05:00