feat(acp): epic #978 — /compact, /model fuzzy, provider auto-discovery, /clear persistence#986
Merged
feat(acp): epic #978 — /compact, /model fuzzy, provider auto-discovery, /clear persistence#986
Conversation
…y, /clear persistence Phase 2 (#979): /compact triggers AgentContext::compact_context() via agent-loop sentinel; graceful no-op when history is below minimum threshold; emits UsageUpdate. Phase 3 (#981): /clear sentinel now also clears in-memory AgentContext state and calls memory.delete_conversation() to remove SQLite session events; token counter resets. Phase 4 (#980): /model resolves model IDs with case-insensitive multi-token substring match after exact match fails; returns error with candidate list on ambiguous input. Phase 6 (#983): LlmProvider::list_models() default method; discover_models_from_config() auto-populates available_models at session start when config list is empty; static override takes precedence.
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
/compactcommand triggersAgentContext::compact_context()via agent-loop sentinel; graceful no-op when history is below minimum threshold; emitsUsageUpdateafter compaction/clearnow also clears in-memoryAgentContextstate and callsmemory.delete_conversation()to remove SQLite session events; token counter resets/modelresolves model IDs with case-insensitive multi-token substring match after exact match fails; returns error with candidate list on ambiguous inputLlmProvider::list_models()default method added;discover_models_from_config()auto-populatesavailable_modelsat session start when config list is empty; static config override takes precedenceAcceptance Criteria
/compacttriggers compaction and responds with status; graceful no-op for short sessions/cleardeletes events fromacp_session_events; new messages start fresh context/model claude opusresolves to the latest opus model; ambiguous input returns candidate list[acp] available_models→ model picker auto-populated from provider listcargo +nightly fmt --checkpassescargo clippy --workspace -- -D warningspasses (zero warnings)cargo nextest run --workspace --lib --binspasses (2918/2918 tests)Files Changed
crates/zeph-acp/src/agent.rs—/compact,/clearsentinel dispatch,/modelfuzzy matching,discover_models_from_config()crates/zeph-core/src/agent/mod.rs— sentinel interception in agent loopcrates/zeph-core/src/agent/context.rs—clear_history()methodcrates/zeph-llm/src/provider.rs—LlmProvider::list_models()default methodcrates/zeph-llm/src/{compatible,openai,router}.rs—list_models()implementationssrc/acp.rs—discover_models_from_config()integration