| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Sorry, something went wrong.
|
Runtime verification (reported by PR author): Tested on OpenCode Desktop 1.18.16 (Windows) with opencode-go/deepseek-v4-flash (1M context). The same prompt-layout patch was applied directly to the Desktop bundle (app.asar) for testing. Result: a ~350K-token session that previously would not compact correctly (the model answered an old question from the conversation instead of summarizing) now produces the proper anchored summary (## Objective / ## Important Details / ## Work State / ## Next Move / ## Relevant Files) via /compact. This confirms the ordering fix resolves the reported behavior on the exact model/stack from #41801. |
Sorry, something went wrong.
|
Yeah the smaller models are having issues, ty for pr going to do a bit more cleanup but ill add u as a coauthor on my version |
Sorry, something went wrong.
|
going to go w/ this PR instead (added u as a coauthor): |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Issue for this PR
Closes #41801
Refs #41268
Refs #41358
Refs #36682
Type of change
What does this PR do?
/compact (and auto-compaction) sends the summarization request as one user message: summary instruction first, then the serialized conversation. The conversation is formatted as a chat log ([User]: / [Assistant]:) and ends with a real user question from the past session, so the model answers that old question (or reproduces the transcript) instead of producing the summary — the instruction at the start is diluted, especially on 1M-context models like opencode-go/deepseek-v4-flash where the whole session fits.
The summary template itself says "using the conversation history above", i.e. history-first was the intended layout; the call site inverts it.
Change: put the conversation first, then "End of conversation history.", then the summary instruction + template, ending with an explicit guard that the history is reference material only and only the anchored summary must be output. Applied to both paths:
The experimental.session.compacting plugin hook still works; a plugin-provided prompt now lands after the history.
How did you verify your code works?
Screenshots / recordings
Not a UI change.
Checklist