Skip to content

A tiny friend in your Mac's notch and on your iPhone that keeps an eye on your AI coding agents: Claude Code, Codex, Cursor, Gemini CLI, Antigravity and more. Approve from the notch or your Lock Screen.

Make the Claude model configurable in Settings (Opus 5.5 by default)

rouderz5fee966be94e
diff --git a/NotchBuddy/Sources/App/AppState.swift b/NotchBuddy/Sources/App/AppState.swift
index 0b803627..baafa7eb 100644
--- a/NotchBuddy/Sources/App/AppState.swift
+++ b/NotchBuddy/Sources/App/AppState.swift
@@ -74,6 +74,12 @@ final class AppState: ObservableObject {
didSet { UserDefaults.standard.set(soundEnabled, forKey: "soundEnabled") }
}
+ // Claude model used by the chat and the search — persisted
+ static let defaultClaudeModel = "claude-opus-5-5"
+ @Published var claudeModel: String = AppState.defaultClaudeModel {
+ didSet { UserDefaults.standard.set(claudeModel, forKey: "claudeModel") }
+ }
+
// Sound volume (0–0.2) — persisted, synced to SoundEngine
@Published var soundVolume: Double = 0.12 {
didSet {
@@ -188,6 +194,8 @@ final class AppState: ObservableObject {
if let v = ud.object(forKey: "soundEnabled") as? Bool { soundEnabled = v }
if let v = ud.object(forKey: "soundVolume") as? Double { soundVolume = v }
+ if let v = ud.string(forKey: "claudeModel"),
+ !v.trimmingCharacters(in: .whitespaces).isEmpty { claudeModel = v }
// Migrate old 60s default → 15s
if let v = ud.object(forKey: "autoCloseInterval") as? Double {
autoCloseInterval = (v == 60) ? 15 : v
diff --git a/NotchBuddy/Sources/App/ClaudeService.swift b/NotchBuddy/Sources/App/ClaudeService.swift
index 503582be..9961cfb7 100644
--- a/NotchBuddy/Sources/App/ClaudeService.swift
+++ b/NotchBuddy/Sources/App/ClaudeService.swift
@@ -108,7 +108,11 @@ final class ClaudeService {
private let endpoint = URL(string: "https://api.anthropic.com/v1/messages")!
private let anthropicVersion = "2023-06-01"
- private let model = "claude-sonnet-4-6"
+ /// Chosen in Settings; falls back to the default when the field is left empty.
+ private var model: String {
+ let m = AppState.shared.claudeModel.trimmingCharacters(in: .whitespacesAndNewlines)
+ return m.isEmpty ? AppState.defaultClaudeModel : m
+ }
var apiKey: String? { KeychainStore.shared.get("anthropic-api-key") }
diff --git a/NotchBuddy/Sources/App/SettingsView.swift b/NotchBuddy/Sources/App/SettingsView.swift
index 3fdb5045..9b24e49b 100644
--- a/NotchBuddy/Sources/App/SettingsView.swift
+++ b/NotchBuddy/Sources/App/SettingsView.swift
@@ -5,6 +5,23 @@ import AppKit
struct SettingsView: View {
@ObservedObject private var state = AppState.shared
@State private var apiKey: String = KeychainStore.shared.get("anthropic-api-key") ?? ""
+
+ // Claude model — presets plus a free field for any other model ID
+ private static let modelPresets: [(id: String, label: String)] = [
+ ("claude-opus-5-5", "Claude Opus 5.5"),
+ ("claude-fable-5-1", "Claude Fable 5.1"),
+ ("claude-sonnet-5-5", "Claude Sonnet 5.5"),
+ ("claude-haiku-4-5", "Claude Haiku 4.5"),
+ ]
+ private static let customModelTag = "__custom__"
+ @State private var modelChoice: String = {
+ let m = AppState.shared.claudeModel
+ return SettingsView.modelPresets.contains { $0.id == m } ? m : SettingsView.customModelTag
+ }()
+ @State private var customModel: String = {
+ let m = AppState.shared.claudeModel
+ return SettingsView.modelPresets.contains { $0.id == m } ? "" : m
+ }()
@State private var launchAtStartup: Bool = (SMAppService.mainApp.status == .enabled)
@State private var statusMessage: String = ""
@State private var showDiff: Bool = false
@@ -56,6 +73,32 @@ struct SettingsView: View {
statusMessage = "✓ Key saved."
}
.buttonStyle(.borderedProminent)
+
+ Divider().padding(.vertical, 2)
+
+ Picker("Model", selection: $modelChoice) {
+ ForEach(Self.modelPresets, id: \.id) { preset in
+ Text(preset.label).tag(preset.id)
+ }
+ Text("Custom…").tag(Self.customModelTag)
+ }
+ .onChange(of: modelChoice) { _, choice in
+ if choice != Self.customModelTag {
+ state.claudeModel = choice
+ } else {
+ applyCustomModel(customModel)
+ }
+ }
+
+ if modelChoice == Self.customModelTag {
+ TextField("Model ID (e.g. claude-opus-5-5)", text: $customModel)
+ .textFieldStyle(.roundedBorder)
+ .onChange(of: customModel) { _, value in applyCustomModel(value) }
+ }
+
+ Text("Used by the chat and the search. Fable needs access on your API account.")
+ .font(.system(size: 11))
+ .foregroundColor(.secondary)
}
.padding(6)
}
@@ -344,6 +387,11 @@ struct SettingsView: View {
// MARK: - Actions
+ private func applyCustomModel(_ value: String) {
+ let id = value.trimmingCharacters(in: .whitespacesAndNewlines)
+ if !id.isEmpty { state.claudeModel = id }
+ }
+
private func toggleStartup(_ on: Bool) {
do {
if on { try SMAppService.mainApp.register() }