mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #350] [CLOSED] Chat: a context gauge, per-request timings, and conversation compaction #2591
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2591
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/350
Author: @orangeswim
Created: 10/1/2026
Status: ❌ Closed
Base:
main← Head:context-and-compaction📝 Commits (10+)
5a30024calibrate: the engine's arguments come from the server's engine_args; a failed tuning says why (#447)9f60d13serve, setup: name the small split card that caps the prompt chunk; setup recommends the big card alone (#448)eb8da1d/metrics: each request's speculative draft counts, and their sums in the totals (#457)6a09387setup (--gguf-dir): GGUFs Strata cannot run are named as such, with the --family/--model to use (#444)d6a91e2docs: the Coder is weaker outside code, Chinese/CJK text included; the unpruned sizes for that (#438)d8d4ad3Merge branch 'f-135-eng' into rel-0.1.357b600d5Merge branch 'f-135-small' into rel-0.1.35d9ab843Engine 0.1.35: Windows AMD uses its bundled HIP runtime (#468 #461), the low-RAM resident mode on Windows 32 GB PCs (#467), fixes #460 #459 #446 #447 #457 #448 #444; setup requires it57bd713sycl: pipeline the expert cache's profile fill (model load 3-4x faster)e3bdd74A prompt cancelled mid-read is logged and recorded with the tokens it read (#471)📊 Changes
8 files changed (+409 additions, -19 deletions)
View changed files
📝
docs/DETAILS.md(+4 -2)➕
serve/test_compaction.py(+30 -0)📝
serve/web/app.css(+28 -5)📝
serve/web/app.js(+176 -12)➕
serve/web/compact-prompt.js(+20 -0)➕
serve/web/compaction.js(+40 -0)📝
serve/web/index.html(+5 -0)➕
serve/web/test_compaction.mjs(+106 -0)📄 Description
Chat: a context gauge, per-request timings, and conversation compaction
Follow-up to the prefill-speed PR (#163 took the Monitor half); this is everything
else from that review thread. No server change —
server.pyandtelemetry.pyare untouched.
Context gauge.
2.4k/200Kwith a fill bar next to the sampling button. Amberat 70% of the window, red at 90%. Updates from
usageafter each reply. Passive -it never triggers anything.
Request timings in chat. A chevron on each reply opens one muted line:
read 25,838 tokens @ 2,165 tok/s · 1,850 reused · TTFT 12.4 s · drafts 214 of 240 accepted. It is the response's existingtimingsblock (llama.cpp's names) -kept in localStorage with the message. The requests table gains a PP t/s column
beside decode, computed in the UI from the history fields the server already
returns (net of the reused cache share).
Compaction. The compact button summarizes the older turns:
message count, since six large pastes would defeat the fold; a single message
over twice the budget goes to the summarized part instead, however recent
seven sections (intent; facts and decisions; verbatim code and artifacts; all
user messages; errors and fixes; open items; current thread), told to extract
rather than describe and that it may be long - capped at 5k tokens, clamped to
the window's remaining room (the server 400s an over-window request), with a
warning when the cap truncates it. The prompt lives in its own file
(
web/compact-prompt.js), editable without touching app.js(client-built, never paraphrased), so the payload after any compaction is
exactly
[summary] + newer messagesnewest summary can be put back, and undo peels one layer at a time. The page
keeps every message, muted above the cut
display only, the API gets the full text
The payload's compaction rules live in
web/compaction.js(pure; loaded by theapp and by
web/test_compaction.mjs- the cut boundary, chained summaries,undo-after-a-merge, the full-coverage marker shape, corrupt-marker handling;
node serve/web/test_compaction.mjs), run with the suite throughserve/test_compaction.py(skips loudly where node is absent). All serve testspass unchanged.
AI Tooling
Claude-code with GLM-5.3, Strata qwen3.8-flash-next-coder-iq1_m
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.