Skip to content

feat(desktop): optionally summarize context after the first answer - #677

Merged
huichen merged 3 commits into
mainfrom
feat/first-turn-summary
Sep 17, 2026
Merged

huichen merged 3 commits into
mainfrom
feat/first-turn-summary

Conversation

@huichen

@huichen huichen commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add a persisted, default-off General setting for first-answer context summarization (English and Chinese).
  • Reuse the existing standalone compaction API only after a new conversation’s first run succeeds; later turns, failed/cancelled turns, old history and duplicate completion events do not trigger it.
  • Run the trigger in the desktop backend so it does not depend on the foreground chat view; summary failures preserve the successful answer.

Validation

  • Desktop: TypeScript typecheck, ESLint, 128 Vitest files / 1084 tests passed.
  • Desktop backend (Rust 1.97.0): cargo fmt --check, cargo clippy --all-targets -- -D warnings, cargo test passed (1275 library tests plus binary/integration tests).
  • Regression tests cover default-off persistence, first-turn-only behavior, duplicate completion, unsuccessful turns, existing history and compaction rejection.
  • No live GUI walkthrough performed.

@huichen
huichen enabled auto-merge (squash) September 17, 2026 01:05
@huichen

huichen commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator Author

Fixed the non-GUI CI build failure by sharing the existing compaction implementation in agent_bridge rather than calling a GUI-only Tauri wrapper.

Revalidated with Rust 1.97.0: cargo fmt --check; clippy --all-targets -D warnings with both default and --no-default-features; full cargo test in both configurations (1275 GUI library tests / 1007 non-GUI library tests plus binary/integration targets, all passed).

@huichen
huichen merged commit 4de22a4 into main Sep 17, 2026
12 checks passed
@huichen
huichen deleted the feat/first-turn-summary branch September 17, 2026 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant