2.9 KiB
2.9 KiB
Implementation Plan: Saved System Prompt Presets
Phase 1: Foundation & Data Model
- Task: Define the
Presetdata model and storage logic.- Create
src/models.py(if not existing) or update it with aPresetdataclass/Pydantic model. - Implement
PresetManagerin a new filesrc/presets.pyto handle loading/saving topresets.tomlandproject_presets.toml. - Implement the inheritance logic where project presets override global ones.
- Create
- Task: Write unit tests for
PresetManager.- Test loading global presets.
- Test loading project presets.
- Test the override logic (same name).
- Test saving/updating presets.
- Task: Conductor - User Manual Verification 'Phase 1: Foundation & Data Model' (Protocol in workflow.md)
Phase 2: UI: Settings Integration
- Task: Add Preset Dropdown to Global AI Settings.
- Modify
gui_2.pyto include a dropdown in the "AI Settings" panel. - Populated the dropdown with available global presets.
- Modify
- Task: Add Preset Dropdown to Project Settings.
- Modify
gui_2.pyto include a dropdown in the "Project Settings" panel. - Populated the dropdown with available project-specific presets (including overridden globals).
- Modify
- Task: Implement "Auto-Load" logic.
- When a preset is selected, update the active system prompt and model settings in
gui_2.py.
- When a preset is selected, update the active system prompt and model settings in
- Task: Write integration tests for settings integration using
live_gui.- Verify global dropdown shows global presets.
- Verify project dropdown shows project + global presets.
- Verify selecting a preset updates the UI fields (prompt, temperature).
- Task: Conductor - User Manual Verification 'Phase 2: UI: Settings Integration' (Protocol in workflow.md)
Phase 3: UI: Preset Manager Modal
- Task: Create the
PresetManagerModalingui_2.py(or a separate module).- Implement a list view of all presets (global and project).
- Implement "Add", "Edit", and "Delete" functionality.
- Ensure validation for unique names.
- Task: Add a button to open the manager modal from the settings panels.
- Task: Write integration tests for the Preset Manager using
live_gui.- Verify creating a new preset adds it to the list and dropdown.
- Verify editing an existing preset updates it correctly.
- Verify deleting a preset removes it from the list and dropdown.
- Task: Conductor - User Manual Verification 'Phase 3: UI: Preset Manager Modal' (Protocol in workflow.md)
Phase 4: Final Integration & Polish
- Task: Ensure robust error handling for missing or malformed
.tomlfiles. - Task: Final UI polish (spacing, icons, tooltips).
- Task: Run full suite of relevant tests.
- Task: Conductor - User Manual Verification 'Phase 4: Final Integration & Polish' (Protocol in workflow.md)