From 8b6a7e8bc37a6a1fe141a5e62c8d7e3cd2c53305 Mon Sep 17 00:00:00 2001 From: Augustin Date: Wed, 22 Apr 2026 20:57:25 +0200 Subject: [PATCH] fix: register missing /api/config/reset and /api/starship/apply-theme routes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add resetConfig and applyStarshipTheme to frontend api client - Register handleResetConfig and handleApplyStarshipTheme in server mux 💘 Generated with Crush Assisted-by: MiniMax-M2.7 via Crush --- internal/api/server.go | 2 ++ web/src/api/client.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/internal/api/server.go b/internal/api/server.go index 0a567a1..bfa7300 100644 --- a/internal/api/server.go +++ b/internal/api/server.go @@ -48,6 +48,8 @@ func (s *Server) routes() { s.mux.HandleFunc("/api/mcp/configure", s.handleMCPConfigure) s.mux.HandleFunc("/api/config/profile", s.handleSaveProfile) s.mux.HandleFunc("/api/config/provider", s.handleSaveProvider) + s.mux.HandleFunc("/api/config/reset", s.handleResetConfig) + s.mux.HandleFunc("/api/starship/apply-theme", s.handleApplyStarshipTheme) s.mux.HandleFunc("/api/providers/validate", s.handleValidateProvider) s.mux.HandleFunc("/api/update/run", s.handleRunUpdate) s.mux.HandleFunc("/api/chat", s.handleChat) diff --git a/web/src/api/client.js b/web/src/api/client.js index f8b43db..24a3601 100644 --- a/web/src/api/client.js +++ b/web/src/api/client.js @@ -28,6 +28,8 @@ const api = { savePreferences: (prefs) => request('/preferences', { method: 'PUT', body: JSON.stringify(prefs) }), saveProfile: (profile) => request('/config/profile', { method: 'PUT', body: JSON.stringify(profile) }), saveProvider: (provider) => request('/config/provider', { method: 'PUT', body: JSON.stringify(provider) }), + resetConfig: () => request('/config/reset', { method: 'POST' }), + applyStarshipTheme: (theme) => request('/starship/apply-theme', { method: 'POST', body: JSON.stringify({ theme }) }), validateProvider: (provider) => request('/providers/validate', { method: 'POST', body: JSON.stringify(provider) }), runUpdate: (tool) => request('/update/run', { method: 'POST', body: JSON.stringify({ tool: tool || '' }) }), runCommand: (command, cwd) => request('/terminal', { method: 'POST', body: JSON.stringify({ command, cwd }) }),