]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
ui: Improve performance when streaming (#25225)
authorNick Towle <redacted>
Fri, 3 Jul 2026 17:03:51 +0000 (10:03 -0700)
committerGitHub <redacted>
Fri, 3 Jul 2026 17:03:51 +0000 (19:03 +0200)
commitd4cff114c0084f1fbc9b4c62717eca8fb2ae494a
treeae801e8a809443dfa361b79bd54feba6d270d4a0
parentf113e02d5ab4c4910709d46e8d81af92ef945289
ui: Improve performance when streaming (#25225)

* ui: Improve performance when streaming

* ui: build sibling info map in branching utils

Moves the node map and sibling map construction from the
.by block into buildSiblingInfoMap() in branching.ts.

The map is built once per structural change and only read
afterwards, so it does not need SvelteMap reactivity. Keeping
the construction in plain TypeScript fixes the
svelte/prefer-svelte-reactivity lint error and groups the
branching logic where it already lives.

---------

Co-authored-by: Pascal <redacted>
tools/ui/src/lib/components/app/chat/ChatMessages/ChatMessages.svelte
tools/ui/src/lib/utils/branching.ts
tools/ui/src/lib/utils/index.ts