Status: done
Implemented by subagent and committed as ee2334f feat: add prompt workspace persistence.
Main-session verification:
uv run pytest tests/test_websocket_api.py
uv run pytest
Results:
14 passed, 1 warning in 0.23s25 passed, 1 warning in 0.18sImprove prompt and pre-message editing with browser-side persistence and reusable prompt sets.
The original requirement expects editing multiple system prompts and pre-messages. The MVP supports editing them, but every refresh loses the setup. A local prompt workspace lets a debugger quickly switch between prompt configurations without introducing a backend database.
This todo covers:
localStorage.This todo does not cover:
src/agent_lab/presentation/static/index.htmlsrc/agent_lab/presentation/static/app.jssrc/agent_lab/presentation/static/styles.css only if needed for compact layout.tests/test_websocket_api.py or a new focused static UI test.docs/plans/todos.md.Use localStorage key agent-lab.prompt-sets.v1. Store JSON:
{
"sets": {
"default debugger": {
"system_prompts": ["..."],
"pre_messages": [{"role": "user", "content": "..."}],
"chat_agent": {"model": "", "temperature": 0.2, "max_tokens": 800},
"event_agent": {"enabled_tools": ["handoff_note"], "max_event_loops": 3}
}
}
}
The UI should include:
Saving reads the current form. Loading restores fields and tool checkboxes after tools are loaded. Deleting removes the selected set.
index.html contains prompt workspace controls.app.js contains agent-lab.prompt-sets.v1 and functions for save/load/delete./api/tools finishes.Run:
uv run pytest tests/test_websocket_api.py
uv run pytest
If successful, commit implementation files only with message:
git commit -m "feat: add prompt workspace persistence"
Expected result: