feat(ux): session recap — /recap command and auto-summary on resume#3136
Merged
feat(ux): session recap — /recap command and auto-summary on resume#3136
Conversation
Implements issue #3064. When returning to an existing conversation, Zeph now generates a brief recap before accepting input. The /recap slash command triggers an on-demand summary at any time. Key changes: - New [session.recap] config section (on_resume, max_tokens, recap_provider, max_input_messages) wired via AgentSessionConfig - generate_recap_text / build_recap reuse session_digest pipeline - Auto-recap gated on conversation_id + cached_session_digest presence, not message count; errors swallowed silently with tracing::warn! - /recap command registered in agent registry; command path surfaces a neutral scrubbed error message on failure - C3-bis fix: load_and_cache_session_digest always loads when conversation_id is set; context/assembly injection still gated on digest_config.enabled to avoid regression - format_and_sanitize_conversation helper (scrub_content + ContentSanitizer) shared across all three digest paths - --init wizard step for new recap options - --migrate-config step (idempotent) - Live testing playbook and coverage-status entry added Closes #3064 Related: #3130 (deferred TUI multi-session groundwork from #3057)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/recapslash command that generates a brief summary of the current session on demandsession.recap.on_resume+ persisted digest)[session.recap]config section:on_resume,max_tokens,provider,max_input_messagesload_and_cache_session_digestnow always loads whenconversation_idexists; context injection remains gated onmemory.digest.enabledto avoid regressionformat_and_sanitize_conversationhelper shared across all three digest paths (credential redaction + injection-pattern stripping before LLM)/recaperror path surfaces a neutral scrubbed message; auto-resume errors swallowed withtracing::warn!Issues
Closes #3064
Related: #3130 (TUI multi-session groundwork, deferred from #3057)
Test plan
cargo +nightly fmt --check— cleancargo clippy --all-targets --all-features --workspace -- -D warnings— zero warningscargo nextest run --workspace --all-features --lib --bins— 8243 passed.local/testing/playbooks/session-recap.md:/recapmid-session — verify on-demand recap emittedsession.recap.on_resume = false— verify banner suppressed on resumememory.digest.enabled— verify digest not injected into context