feat: add session persistence to CLI
- Add save-only endpoint (POST /conversations/{id}/save) for persisting
messages without triggering agent execution
- Add sessions command to list previous conversation sessions
- Add --resume flag to chat command for resuming sessions by ID
- Buffer streamed responses and save after completion
- Update AGENTS.md with session commands and remove outdated limitation
- Add 3 new tests for save endpoint (208 total)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -88,13 +88,29 @@ cd webber-cli
|
||||
# Check API connection
|
||||
.venv/bin/webber-cli status
|
||||
|
||||
# Explore a directory
|
||||
.venv/bin/webber-cli explore "find all python files" -d ../webber-sandbox
|
||||
|
||||
# Interactive chat mode
|
||||
# Interactive chat (default mode - full capabilities)
|
||||
.venv/bin/webber-cli chat -d ../webber-sandbox
|
||||
|
||||
# Read-only mode (safe exploration and planning)
|
||||
.venv/bin/webber-cli chat --mode plan -d ../webber-sandbox
|
||||
|
||||
# Auto-accept mode (no approval prompts - use with caution)
|
||||
.venv/bin/webber-cli chat --mode auto_accept -d ../webber-sandbox
|
||||
|
||||
# List previous sessions
|
||||
.venv/bin/webber-cli sessions
|
||||
|
||||
# Resume a previous session
|
||||
.venv/bin/webber-cli chat --resume <session-id>
|
||||
```
|
||||
|
||||
**CLI Features:**
|
||||
- **Tab completion** for commands and file paths
|
||||
- **Command history** persisted to `~/.webber_history`
|
||||
- **Session persistence** - conversations saved and resumable
|
||||
- **Runtime mode switching** via `mode plan|default|auto_accept`
|
||||
- **Directory navigation** via `cd <path>`
|
||||
|
||||
**Note:** The API server must be running for CLI commands to work.
|
||||
|
||||
---
|
||||
@@ -153,9 +169,10 @@ pytest tests/ -v
|
||||
# 1. Load the template
|
||||
./sandbox.sh load calculator-cli
|
||||
|
||||
# 2. Have Webber explore it
|
||||
# 2. Have Webber explore it (plan mode = read-only)
|
||||
cd webber-cli
|
||||
.venv/bin/webber-cli explore "find all bugs in the code" -d ../webber-sandbox
|
||||
.venv/bin/webber-cli chat --mode plan -d ../webber-sandbox
|
||||
# Then ask: "find all bugs in the code"
|
||||
|
||||
# 3. Check TASKS.md for expected bugs
|
||||
cat ../webber-sandbox/TASKS.md
|
||||
@@ -258,7 +275,5 @@ cd webber-api
|
||||
## Known Limitations
|
||||
|
||||
1. **Model hallucination** - Mistral Nemo sometimes makes up file contents instead of using tool results
|
||||
2. **No conversation memory** - CLI chat mode doesn't persist between sessions
|
||||
3. **No streaming** - Responses appear all at once
|
||||
|
||||
See `webber-api/docs/COVERAGE.md` for full feature coverage status.
|
||||
|
||||
Reference in New Issue
Block a user