From d44d0f61e4026da35c0d1a4acb87ba71ed6cd599 Mon Sep 17 00:00:00 2001 From: Clawd Date: Sun, 1 Mar 2026 08:31:52 -0800 Subject: 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) --- src/main/claude/index.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/main') 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({ // Load any custom system prompt for this phase (null → use default) const customSystemPrompt = getSetting(`systemPrompt.${session.phase}`) ?? undefined; + // Load global model override (empty string or null → let SDK use its default) + const configuredModel = getSetting("model") || undefined; + const phaseConfig = getPhaseConfig( session.phase as Phase, sessionDir, @@ -59,6 +62,7 @@ export async function sendMessage({ prompt: message, options: { cwd: project.path, + model: configuredModel, resume: session.claude_session_id ?? undefined, tools: phaseConfig.tools, permissionMode: phaseConfig.permissionMode, -- cgit v1.2.3