mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-01-30 06:12:06 +00:00
Adds a settings system for global configuration with YOLO mode toggle and
model selection. Simplifies the agent control UI by removing redundant
status indicator and pause functionality.
## Settings System
- New SettingsModal with YOLO mode toggle and model selection
- Settings persisted in SQLite (registry.db) - shared across all projects
- Models fetched from API endpoint (/api/settings/models)
- Single source of truth for models in registry.py - easy to add new models
- Optimistic UI updates with rollback on error
## Agent Control Simplification
- Removed StatusIndicator ("STOPPED"/"RUNNING" label) - redundant
- Removed Pause/Resume buttons - just Start/Stop toggle now
- Start button shows flame icon with fiery gradient when YOLO mode enabled
## Code Review Fixes
- Added focus trap to SettingsModal for accessibility
- Fixed YOLO button color contrast (WCAG AA compliance)
- Added model validation to AgentStartRequest schema
- Added model to AgentStatus response
- Added aria-labels to all icon-only buttons
- Added role="radiogroup" to model selection
- Added loading indicator during settings save
- Added SQLite timeout (30s) and retry logic with exponential backoff
- Added thread-safe database engine initialization
- Added orphaned lock file cleanup on server startup
## Files Changed
- registry.py: Model config, Settings CRUD, SQLite improvements
- server/routers/settings.py: New settings API
- server/schemas.py: Settings schemas with validation
- server/services/process_manager.py: Model param, orphan cleanup
- ui/src/components/SettingsModal.tsx: New modal component
- ui/src/components/AgentControl.tsx: Simplified to Start/Stop only
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
25 lines
621 B
Python
25 lines
621 B
Python
"""
|
|
API Routers
|
|
===========
|
|
|
|
FastAPI routers for different API endpoints.
|
|
"""
|
|
|
|
from .agent import router as agent_router
|
|
from .assistant_chat import router as assistant_chat_router
|
|
from .features import router as features_router
|
|
from .filesystem import router as filesystem_router
|
|
from .projects import router as projects_router
|
|
from .settings import router as settings_router
|
|
from .spec_creation import router as spec_creation_router
|
|
|
|
__all__ = [
|
|
"projects_router",
|
|
"features_router",
|
|
"agent_router",
|
|
"spec_creation_router",
|
|
"filesystem_router",
|
|
"assistant_chat_router",
|
|
"settings_router",
|
|
]
|