aboutsummaryrefslogtreecommitdiffstats
path: root/renderer/src/components/SettingsPage.tsx
diff options
context:
space:
mode:
authorClawd <ai@clawd.bot>2026-03-01 08:31:52 -0800
committerClawd <ai@clawd.bot>2026-03-01 08:31:52 -0800
commitd44d0f61e4026da35c0d1a4acb87ba71ed6cd599 (patch)
tree4d3eb7c1db6d71e25634848078ad1cfde57bad6d /renderer/src/components/SettingsPage.tsx
parentafdf3d57cb7ae4cbf0a519d1b53872f151ecba87 (diff)
feat(settings): add configurable model selection
- Add Model settings section with free-text input for model override - Pass configured model through to SDK query() calls - Display active model badge in ActionBar next to token usage - Seed model state from DB on mount, update from system:init events - Empty/unset value uses SDK default (no breaking change)
Diffstat (limited to 'renderer/src/components/SettingsPage.tsx')
-rw-r--r--renderer/src/components/SettingsPage.tsx14
1 files changed, 12 insertions, 2 deletions
diff --git a/renderer/src/components/SettingsPage.tsx b/renderer/src/components/SettingsPage.tsx
index 9ebde44..d3ff4bf 100644
--- a/renderer/src/components/SettingsPage.tsx
+++ b/renderer/src/components/SettingsPage.tsx
@@ -1,8 +1,9 @@
1import React, { useState } from "react"; 1import React, { useState } from "react";
2import { SystemPromptsSettings } from "./settings/SystemPromptsSettings"; 2import { SystemPromptsSettings } from "./settings/SystemPromptsSettings";
3import { GitSettings } from "./settings/GitSettings"; 3import { GitSettings } from "./settings/GitSettings";
4import { ModelSettings } from "./settings/ModelSettings";
4 5
5type SettingsSection = "system-prompts" | "git"; 6type SettingsSection = "model" | "system-prompts" | "git";
6 7
7interface SettingsPageProps { 8interface SettingsPageProps {
8 onClose: () => void; 9 onClose: () => void;
@@ -10,7 +11,7 @@ interface SettingsPageProps {
10 11
11export function SettingsPage({ onClose }: SettingsPageProps) { 12export function SettingsPage({ onClose }: SettingsPageProps) {
12 const [activeSection, setActiveSection] = 13 const [activeSection, setActiveSection] =
13 useState<SettingsSection>("system-prompts"); 14 useState<SettingsSection>("model");
14 15
15 return ( 16 return (
16 <div className="settings-overlay"> 17 <div className="settings-overlay">
@@ -33,6 +34,14 @@ export function SettingsPage({ onClose }: SettingsPageProps) {
33 <nav className="settings-nav"> 34 <nav className="settings-nav">
34 <button 35 <button
35 className={`settings-nav-item${ 36 className={`settings-nav-item${
37 activeSection === "model" ? " active" : ""
38 }`}
39 onClick={() => setActiveSection("model")}
40 >
41 Model
42 </button>
43 <button
44 className={`settings-nav-item${
36 activeSection === "system-prompts" ? " active" : "" 45 activeSection === "system-prompts" ? " active" : ""
37 }`} 46 }`}
38 onClick={() => setActiveSection("system-prompts")} 47 onClick={() => setActiveSection("system-prompts")}
@@ -51,6 +60,7 @@ export function SettingsPage({ onClose }: SettingsPageProps) {
51 60
52 {/* Content */} 61 {/* Content */}
53 <div className="settings-content"> 62 <div className="settings-content">
63 {activeSection === "model" && <ModelSettings />}
54 {activeSection === "system-prompts" && <SystemPromptsSettings />} 64 {activeSection === "system-prompts" && <SystemPromptsSettings />}
55 {activeSection === "git" && <GitSettings />} 65 {activeSection === "git" && <GitSettings />}
56 </div> 66 </div>