Mathias Fredriksson
3c36790c86
fix(coderd/x/chatd): coalesce deltas when persisting interrupted turns ( #29661 )
...
An interrupted turn was stored with one ChatMessagePart per streamed
delta, while a completed turn gets one part per block. One 28,539
character interrupted response became 3,987 parts and 1 MB of JSON,
and a /messages page with such turns reached 11.7 MB. Whitespace-only
deltas were separate parts too, and prompt replay skips whitespace-only
parts, so words and paragraphs ran together in the next turn's prompt.
Adjacent deltas of the same type are now joined into one part. A text
run ends at another part type, a tool result or a narration change. A
reasoning run ends where CreatedAt, the block's start time, changes.
Adjacent text blocks still merge because text deltas have no block
identity. Rows already stored are not rewritten.
2026-10-23 23:59:37 +03:00
..
2026-10-19 14:02:46 +11:00
2026-10-06 22:50:28 +02:00
2026-10-22 07:17:24 +00:00
2026-09-21 12:26:09 +02:00
2026-10-22 11:04:09 +07:00
2026-10-23 23:59:37 +03:00
2026-09-29 18:46:41 -07:00
2026-10-22 11:04:09 +07:00
2026-10-14 22:39:00 +02:00
2026-09-28 09:25:01 +00:00
2026-10-13 13:49:12 +02:00
2026-10-21 10:34:57 +02:00
2026-10-13 13:49:12 +02:00
2026-10-22 11:04:09 +07:00
2026-07-02 11:22:56 +01:00
2026-10-23 12:53:40 +11:00
2026-08-25 16:57:27 +07:00
2026-07-29 11:39:12 +00:00
2026-10-22 07:55:42 +00:00
2026-10-22 07:55:42 +00:00
2026-09-28 09:25:01 +00:00
2026-10-01 16:42:51 +02:00
2026-10-01 16:42:51 +02:00
2026-10-01 16:42:51 +02:00
2026-10-01 16:42:51 +02:00
2026-10-23 19:32:08 +07:00
2026-10-20 09:29:57 +00:00
2026-10-01 16:40:24 +02:00
2026-10-01 16:40:24 +02:00
2026-10-01 16:40:24 +02:00
2026-09-30 11:53:57 -05:00
2026-10-13 22:57:46 +02:00
2026-10-22 11:04:09 +07:00
2026-10-20 22:11:25 +00:00
2026-09-05 11:39:10 +02:00
2026-10-23 19:32:08 +07:00
2026-09-18 15:24:15 +10:00
2026-10-20 21:43:20 +00:00
2026-10-23 12:53:40 +11:00
2026-07-20 19:49:19 +02:00
2026-10-20 13:06:57 +02:00
2026-10-13 13:49:12 +02:00
2026-10-13 13:49:12 +02:00
2026-08-20 20:54:52 +00:00
2026-08-24 11:20:26 +01:00
2026-10-12 09:53:45 +11:00
2026-09-02 13:38:14 +02:00
2026-09-02 13:38:14 +02:00
2026-09-02 13:38:14 +02:00
2026-10-21 14:18:12 +00:00
2026-10-21 14:18:12 +00:00
2026-10-19 14:02:47 +11:00
2026-10-02 12:58:53 +00:00
2026-10-14 14:55:29 -07:00
2026-10-14 14:55:29 -07:00
2026-10-13 13:49:12 +02:00
2026-09-30 11:53:58 -05:00
2026-08-26 13:33:13 +02:00
2026-10-22 07:55:42 +00:00
2026-10-20 09:29:57 +00:00
2026-10-11 19:57:49 +02:00
2026-10-05 11:47:24 -07:00
2026-10-22 07:55:42 +00:00
2026-10-22 11:04:09 +07:00
2026-10-12 09:53:45 +11:00
2026-10-23 12:53:40 +11:00
2026-10-12 09:53:45 +11:00
2026-09-26 21:39:40 +02:00
2026-06-22 19:26:34 -06:00
2026-10-13 13:49:12 +02:00
2026-08-26 11:57:56 -06:00
2026-10-23 12:53:40 +11:00
2026-10-23 12:53:40 +11:00
2026-10-11 19:57:49 +02:00
2026-10-11 19:57:49 +02:00
2026-10-19 14:02:47 +11:00
2026-09-14 10:51:22 +02:00
2026-08-18 19:12:47 +02:00
2026-10-19 12:38:17 +00:00
2026-10-19 12:38:17 +00:00
2026-10-19 12:38:17 +00:00
2026-09-14 10:51:22 +02:00
2026-10-23 23:59:37 +03:00
2026-10-23 23:59:37 +03:00
2026-10-12 09:53:44 +11:00
2026-10-12 09:53:44 +11:00
2026-09-30 11:53:58 -05:00
2026-09-18 15:22:02 +01:00
2026-09-30 11:53:58 -05:00
2026-10-20 13:06:57 +02:00
2026-10-11 19:57:49 +02:00
2026-10-11 19:57:49 +02:00
2026-10-23 19:32:08 +07:00
2026-07-29 11:39:12 +00:00
2026-09-30 12:20:03 +02:00
2026-10-21 19:47:50 +07:00
2026-10-21 19:47:50 +07:00
2026-10-23 19:32:08 +07:00
2026-10-21 19:47:50 +07:00
2026-09-26 21:39:40 +02:00
2026-10-13 13:49:12 +02:00
2026-10-13 13:49:12 +02:00
2026-10-20 22:11:25 +00:00
2026-10-02 12:58:53 +00:00
2026-10-20 22:11:25 +00:00
2026-09-21 15:58:18 +02:00
2026-10-19 14:02:46 +11:00
2026-09-28 09:25:01 +00:00
2026-10-01 16:42:51 +02:00
2026-07-29 11:39:12 +00:00
2026-10-22 07:55:42 +00:00
2026-10-23 19:32:08 +07:00
2026-10-23 19:32:08 +07:00
2026-09-30 11:53:58 -05:00
2026-09-30 11:53:58 -05:00
2026-07-29 11:39:12 +00:00
2026-09-28 09:25:01 +00:00
2026-09-28 09:25:01 +00:00
2026-10-02 13:02:41 +02:00
2026-10-19 19:15:56 +02:00
2026-10-19 19:15:56 +02:00
2026-10-05 11:47:24 -07:00
2026-09-04 08:55:15 +01:00
2026-10-01 14:10:21 +02:00
2026-10-19 14:02:46 +11:00
2026-10-19 14:02:46 +11:00
2026-10-19 14:02:46 +11:00
2026-07-18 20:45:13 +02:00
2026-10-19 14:02:46 +11:00
2026-09-11 20:17:23 +00:00
2026-09-25 15:30:21 +01:00
2026-07-18 20:45:13 +02:00
2026-10-22 07:55:42 +00:00
2026-10-05 11:47:24 -07:00
2026-10-15 14:39:21 +11:00
2026-09-24 14:02:06 +10:00
2026-10-15 14:39:21 +11:00
2026-10-02 12:58:53 +00:00
2026-09-17 15:09:19 +02:00
2026-09-17 15:09:19 +02:00
2026-10-16 21:20:00 +00:00
2026-10-16 21:20:00 +00:00
2026-10-20 20:10:13 +02:00
2026-10-23 19:32:08 +07:00
2026-09-27 16:38:30 +02:00
2026-09-30 11:53:58 -05:00
2026-09-30 11:53:58 -05:00
2026-10-01 16:42:51 +02:00
2026-10-11 19:57:49 +02:00