diff options
| author | Clawd <ai@clawd.bot> | 2026-03-01 08:31:52 -0800 |
|---|---|---|
| committer | Clawd <ai@clawd.bot> | 2026-03-01 08:31:52 -0800 |
| commit | d44d0f61e4026da35c0d1a4acb87ba71ed6cd599 (patch) | |
| tree | 4d3eb7c1db6d71e25634848078ad1cfde57bad6d /src | |
| parent | afdf3d57cb7ae4cbf0a519d1b53872f151ecba87 (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 'src')
| -rw-r--r-- | src/main/claude/index.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/claude/index.ts b/src/main/claude/index.ts index 30a0f57..7867a9f 100644 --- a/src/main/claude/index.ts +++ b/src/main/claude/index.ts | |||
| @@ -48,6 +48,9 @@ export async function sendMessage({ | |||
| 48 | // Load any custom system prompt for this phase (null → use default) | 48 | // Load any custom system prompt for this phase (null → use default) |
| 49 | const customSystemPrompt = getSetting(`systemPrompt.${session.phase}`) ?? undefined; | 49 | const customSystemPrompt = getSetting(`systemPrompt.${session.phase}`) ?? undefined; |
| 50 | 50 | ||
| 51 | // Load global model override (empty string or null → let SDK use its default) | ||
| 52 | const configuredModel = getSetting("model") || undefined; | ||
| 53 | |||
| 51 | const phaseConfig = getPhaseConfig( | 54 | const phaseConfig = getPhaseConfig( |
| 52 | session.phase as Phase, | 55 | session.phase as Phase, |
| 53 | sessionDir, | 56 | sessionDir, |
| @@ -59,6 +62,7 @@ export async function sendMessage({ | |||
| 59 | prompt: message, | 62 | prompt: message, |
| 60 | options: { | 63 | options: { |
| 61 | cwd: project.path, | 64 | cwd: project.path, |
| 65 | model: configuredModel, | ||
| 62 | resume: session.claude_session_id ?? undefined, | 66 | resume: session.claude_session_id ?? undefined, |
| 63 | tools: phaseConfig.tools, | 67 | tools: phaseConfig.tools, |
| 64 | permissionMode: phaseConfig.permissionMode, | 68 | permissionMode: phaseConfig.permissionMode, |
