Commit graph

5918 commits

Author SHA1 Message Date
Algorithm5838
fe837d80e7 fix: pass params when saving a temporary chat
The system prompt and other chat controls overrides were lost after
saving because `params` wasn't included in the `createNewChat` call.
2026-03-02 01:35:59 +03:00
Tim Baek
860a0b414e
Merge pull request #22111 from Algorithm5838/perf/debounce-get-contents
perf: use rAF to debounce getContents() during streaming
2026-03-02 01:28:15 +04:00
Shirasawa
67893b9a57
fix: fix memory leaking in CodeEditor (#22110) 2026-03-01 15:52:20 -05:00
Timothy Jaeryang Baek
2e8c4da17b refac 2026-03-01 14:45:35 -06:00
Timothy Jaeryang Baek
ff9f761d65 refac 2026-03-01 14:44:12 -06:00
Algorithm5838
6863ca482c perf: use rAF to debounce getContents() during streaming 2026-03-01 23:42:16 +03:00
Timothy Jaeryang Baek
5645d5bccc refac 2026-03-01 14:38:10 -06:00
Timothy Jaeryang Baek
201b93bfcc refac 2026-03-01 14:18:57 -06:00
Shirasawa
9904566513
fix: fix memory leaking in Chat.svelte (#21962)
* fix: fix memory leaking in Chat.svelte

* chore: remove useless chatIdUnsubscriber var

* fix: fix async tick
2026-03-01 15:04:47 -05:00
Classic298
597883a179
perf: use structuredClone and fast-path comparison in UserMessage (#22098)
Same optimization as the merged ResponseMessage PR: replace JSON.parse(JSON.stringify()) with structuredClone and add an O(1) fast-path check on content before falling back to full JSON.stringify comparison.
2026-03-01 14:46:05 -05:00
Timothy Jaeryang Baek
d415edcfcd chore: bump 2026-03-01 13:14:20 -06:00
Algorithm5838
e9011113b4
perf: skip redundant object spread in buildMessages (#22086) 2026-03-01 13:46:11 -05:00
Classic298
1b89bee098
perf: add fast-path comparison in MultiResponseMessages (#22100)
Same optimization as ResponseMessage: add O(1) fast-path check on content and done fields before falling back to full JSON.stringify comparison. Avoids expensive serialization when only content changes during streaming.
2026-03-01 13:44:59 -05:00
Timothy Jaeryang Baek
1db36b5eda refac
Co-Authored-By: Shirasawa <kaguyashirasawa@gmail.com>
2026-03-01 12:38:59 -06:00
Classic298
3569280c0b
perf: replace JSON.parse(JSON.stringify()) with structuredClone in Chat.svelte (#22102)
Replace 7 instances of JSON.parse(JSON.stringify()) deep cloning with the native structuredClone API. All are on cold paths (model selection, file preparation, history saving) but structuredClone is ~2x faster and more readable.
2026-03-01 13:37:20 -05:00
Classic298
a0d6c209c3
perf: fast-path token comparison in CodeBlock (#22101)
During streaming, every token change triggers a full JSON.stringify comparison on the code block token object. Add an O(1) fast-path check on token.text and token.raw — the fields that actually change during streaming — before falling back to the expensive JSON.stringify comparison for infrequent structural changes.
2026-03-01 13:37:10 -05:00
Classic298
73617ec7fa
perf: fast-path length check in StatusHistory comparison (#22103)
Add O(1) array length check before expensive JSON.stringify comparison. During streaming, status history typically only grows via appends, so a length mismatch catches most updates without serialization.
2026-03-01 13:36:42 -05:00
Shirasawa
6d7f21b57b
fix: fix memory leaking of SIdebar (#22082) 2026-03-01 13:35:09 -05:00
Peter L Jones
fe604a8a9b
bugfix: Prevent double toast on single hide/show toggle (#22079) 2026-03-01 13:34:45 -05:00
Timothy Jaeryang Baek
ddedceb7ad refac 2026-03-01 12:32:44 -06:00
Timothy Jaeryang Baek
18865a9fef refac 2026-03-01 12:30:03 -06:00
Timothy Jaeryang Baek
769ef856bc chore: format 2026-03-01 03:05:47 -06:00
Timothy Jaeryang Baek
ed1b959bc6 refac 2026-03-01 02:38:45 -06:00
Timothy Jaeryang Baek
d2b38127d0 refac 2026-03-01 02:37:21 -06:00
Timothy Jaeryang Baek
3d535db304 refac 2026-03-01 02:29:37 -06:00
Timothy Jaeryang Baek
234306ff57 refac 2026-03-01 02:08:41 -06:00
Timothy Jaeryang Baek
ae28e7d245 refac 2026-03-01 00:17:34 -06:00
Shirasawa
39b87d9683
fix: Fix memory leaking in MentionList.svelte (#21965) 2026-02-28 21:48:56 -06:00
Timothy Jaeryang Baek
e83f668107 refac 2026-02-28 21:40:13 -06:00
Timothy Jaeryang Baek
1357dc6737 chore: format 2026-02-28 21:28:59 -06:00
Timothy Jaeryang Baek
43c30428a6 refac 2026-02-28 21:16:53 -06:00
Timothy Jaeryang Baek
a3de0bcc58 refac 2026-02-28 19:22:35 -06:00
Classic298
30ae519226
perf: throttle message list rebuild to once per animation frame during streaming (#21885)
Messages.svelte rebuilds the message list by walking the parent chain and creating spread copies on every history.messages change. During streaming, this runs on every token — hundreds of times per second — even though each ResponseMessage already has its own reactive binding for content updates. Throttle the rebuild to once per animation frame (~60Hz) during content-only updates, while keeping immediate rebuilds for structural changes (currentId changes like chat switches, navigation, or new messages). Adds onDestroy cleanup for the pending rAF.
2026-02-28 18:09:43 -05:00
Timothy Jaeryang Baek
6b462ff121 refac 2026-02-28 13:40:06 -06:00
Timothy Jaeryang Baek
c3bac9aa62 refac 2026-02-28 13:30:28 -06:00
Algorithm5838
fc5f399573
perf: batch scrollToBottom during streaming via rAF (#21946) 2026-02-28 14:13:48 -05:00
Shirasawa
ff8cf80fb5
fix: fix memory leaking of Notes.svelte (#21963) 2026-02-28 14:09:43 -05:00
Algorithm5838
54cefedf53
perf: use structuredClone for message deep copies (#21948) 2026-02-28 14:09:29 -05:00
Shirasawa
5bb1c42fa8
fix: Fix memory leaking of MessageInput (#21968) 2026-02-28 14:03:08 -05:00
Shirasawa
242b3f0c01
fix: Fix Tooltip memory leaking and type define (#21969) 2026-02-28 14:01:28 -05:00
Shirasawa
144c0f3d76
fix: fix missing i18n keys (#21932) 2026-02-28 13:56:12 -05:00
Timothy Jaeryang Baek
c71beb0a7d refac 2026-02-28 02:05:22 -06:00
Timothy Jaeryang Baek
f5bf2a2ed7 refac 2026-02-28 00:41:10 -06:00
Timothy Jaeryang Baek
ab3f03bbd5 refac 2026-02-28 00:40:20 -06:00
Timothy Jaeryang Baek
5ac502e93f refac 2026-02-27 17:24:34 -06:00
Timothy Jaeryang Baek
c60b0fa0e3 refac 2026-02-27 17:20:49 -06:00
Timothy Jaeryang Baek
9544a80aa0 refac 2026-02-27 17:14:54 -06:00
Timothy Jaeryang Baek
83b17e2ac8 refac 2026-02-27 17:04:09 -06:00
Timothy Jaeryang Baek
3a6c88ade9 refac 2026-02-27 16:47:36 -06:00
Timothy Jaeryang Baek
3be06132db refac 2026-02-27 16:41:52 -06:00