mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1507] [CLOSED] # Chat: a context gauge, per-request timings, and conversation compaction #3498
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#3498
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/1507
Author: @orangeswim
Created: 10/8/2026
Status: ❌ Closed
Base:
main← Head:context-and-compaction-v2📝 Commits (3)
d93c2baChat: a context gauge by the inputbf06bdbChat + Monitor: per-request timings, and PP t/s in the requests tablec4d6cdbChat: conversation compaction📊 Changes
8 files changed (+486 additions, -21 deletions)
View changed files
📝
docs/DETAILS.md(+4 -1)➕
serve/test_compaction.py(+30 -0)📝
serve/web/app.css(+39 -0)📝
serve/web/app.js(+233 -18)➕
serve/web/compact-prompt.js(+20 -0)➕
serve/web/compaction.js(+42 -0)📝
serve/web/index.html(+11 -2)➕
serve/web/test_compaction.mjs(+107 -0)📄 Description
Chat: a context gauge, per-request timings, and conversation compaction
Re-opening of #350, which GitHub closed when main's history was cleaned up (not a rejection, per the heads-up there). Same change, rebuilt on the new main as three commits, one per feature. No server change.
What it adds:
2.4k/200K) showing how much of the context window the conversation uses. Amber at 70% of the window, red at 90%. Updates after each reply; passive.web/compaction.js, tested byweb/test_compaction.mjs(run throughserve/test_compaction.pysounittest discoverpicks them up).Notes for this rebase:
apiMessages) was resolved by folding #1392's "the answer being asked for now is not history yet" rule into the new callback form.compaction.jsno longer drops error turns itself — it only decides which messages the summary replaces; the converter decides how a turn is sent (so a turn with no answer text still goes back as an empty assistant turn, as on main).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.