mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #727] [CLOSED] Add opt-in durable chat history, legacy import and browser compaction #2792
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#2792
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/727
Author: @medking82
Created: 10/4/2026
Status: ❌ Closed
Base:
main← Head:codex/chat-memory📝 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)📄 Description
This is a Draft for integration discussion because durable chat storage and compaction overlap #696, #680 and #350. It offers a bounded alternative focused on preserving full legacy branches and making retained history available through read-only MCP memory. Maintainers can assess whether to combine the pieces with those proposals.
The existing web chat retains a single browser conversation. With an explicit
chat_archive_pathor--chat-archive, this adds a local SQLite archive, conversation and branch selection, Rename, import and full JSON backup. Without that option, existing single-chat/New chat/Undo behavior remains available.Behavior and preservation
currNodepath are retained.LlamaUi/LlamacppWebuiIndexedDB, exported JSON/JSONL and Strata backups. Baseline Strata browser records with name-only attachments retain their raw source and visibly mark missing content; malformed or unsupported legacy formats fail atomically. Remote image URLs are retained without fetching them merely to display history; historical tool calls remain archive data.memory__searchandmemory__recallreuse the existing MCP loop, preserve configured providers, and return bounded read-only text with chat/branch/message coordinates and continuation offsets. Literal search supports Chinese text; image bytes are omitted from tool results.trusted_origins. A reverse proxy must preserve Host. No account system, filesystem coding agent, external storage service or new inference provider is added.Limits
The 100 MB cap applies to the whole SQLite database, including duplicated search text, so usable payload capacity is lower; memory results are limited to 12,000 characters. Capacity errors return safe JSON and preserve committed history. Without a configured archive, oversized full-media browser saves preserve the text fallback and display an explicit warning. Retrieval is selective and can miss facts; persistence is not a disk-failure backup. API traffic is not automatically archived. Drafts persist on chat saves/actions; this does not add continuous autosave of unsent edits. Browser compaction is lossy, although full originals remain available. Oversized recent turns may still need shortening.
This contribution is independent of document extraction and adaptive memory budgeting and leaves C++ kernels, model precision, context configuration and lazy vision unchanged. The
/strataalias and retirement worker support the transition from an old root UI without deleting legacy browser databases or caches.Current upstream integration
Head
23f4e24809ccf0fdbcf7a511484b1b23e36d4fc9integrates upstreammain=6f32ec070f23ced9f50e704d854d775da52591ab(0.1.39). The server import/POST conflicts retain both the archive routes and upstream Responses API. Upstream Monitor Conversation cache/MCP and About Model settings remain available. The PR remains Draft because the integration/overlap discussion above is still open.Template-aware counting now uses upstream
Service.encode_prompt, matching actual inference when prompts quote thinking tags or use the trailing effort turn. Two HTTP regressions reproduced the previous undercounts (47 versus 60, and 191 versus 408) before the fix; both now match completion usage. Counting still does not load the model or invoke tools/vision.Current validation
The earlier frozen archive fixture additionally verified all 16 originals and both branches survived compaction, Chinese Rename/reload, Restore, inactive branch selection and repeated legacy import. Those older results are retained separately; manual import, branch selection and mobile layouts were not repeated in this integration, and the Node import/library/context checks passed.
One independent Native Review completed with Claude Opus 5.5 on frozen commit
bba531515cc7d8032fddf514b1bbf60c6fd15144: three P2 and two P3 findings, no P0/P1. Its same-round Gemini Flash/high attempt failed withnative_output_truncated; that failure is retained and is not treated as completed review evidence. All five findings were adjudicated and corrected in follow-up commitba290b6afe141af6271e5fcee075562794d8a5ab, with its then-current deterministic validation rerun. That Native Review is historical evidence for its frozen input; the current bounded upstream integration has the separate checks above and was not submitted to another model review.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.