mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-21 02:33:32 +00:00
de8b36d65d
Add configurable model specifically for automatic remediation actions: Backend (internal/config/ai.go): - Add AutoFixModel field to AIConfig - Add GetAutoFixModel() getter with fallback chain: AutoFixModel -> PatrolModel -> Model Frontend (AISettings.tsx, types/ai.ts): - Add auto_fix_model to AISettings types - Add Auto-Fix Model dropdown (only shows when patrol_auto_fix enabled) - Falls back to patrol model if not set API (ai_handlers.go): - Add auto_fix_model to response and update request - Handle saving/loading the new field Rationale: - Auto-fix takes real actions, may warrant a more capable model - Patrol observation can use cheaper models for cost savings - Gives users granular control over model costs vs reliability - Model hierarchy: Chat > AutoFix > Patrol > Default
Internal API Package
This directory contains the API server implementation for Pulse.
Important Note About frontend-modern/
The frontend-modern/ subdirectory that appears here is:
- AUTO-GENERATED during builds
- NOT the source code - just a build artifact
- IN .gitignore - never committed
- REQUIRED BY GO - The embed directive needs it here
Frontend Development Location
👉 Edit frontend files at: /opt/pulse/frontend-modern/src/
Why This Structure?
Go's //go:embed directive has limitations:
- Cannot use
../paths to access parent directories - Cannot follow symbolic links
- Must embed files within the Go module
This is a known Go limitation and our structure works around it.