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.

Restore integration card and Settings install checks from main

Louis Raille3d5ae74703d1
diff --git a/NotchBuddy/Sources/App/HookServer.swift b/NotchBuddy/Sources/App/HookServer.swift
index 5285a68b..a1c537f2 100644
--- a/NotchBuddy/Sources/App/HookServer.swift
+++ b/NotchBuddy/Sources/App/HookServer.swift
@@ -1584,37 +1584,6 @@ final class HookServer: @unchecked Sendable {
// MARK: Installed-state detection
- /// Single entry point used by voice commands and Settings pill rows.
- /// Returns true when the given pill's hooks/plugin are installed.
- /// Workspace pills (integration_claude, agent_cursor) use claudeHooksInstalled().
- /// Unknown pill ids return true (assumed not hook-dependent).
- static func hooksInstalled(for pillId: String) -> Bool {
- switch pillId {
- case "integration_claude", "agent_cursor":
- return claudeHooksInstalled()
- #if !APPSTORE
- case "agent_gemini":
- return geminiHooksInstalled()
- case "agent_antigravity":
- return agyHooksInstalled()
- case "agent_codex":
- return codexHooksInstalled()
- case "agent_copilot":
- return copilotHooksInstalled()
- case "agent_muse":
- return museHooksInstalled()
- case "agent_opencode":
- return openCodePluginInstalled()
- case "agent_amp":
- return ampPluginInstalled()
- case "agent_hermes":
- return hermesPluginInstalled()
- #endif
- default:
- return true
- }
- }
-
static func geminiHooksInstalled() -> Bool {
guard let data = try? Data(contentsOf: geminiSettingsURL),
let settings = (try? JSONSerialization.jsonObject(with: data)) as? [String: Any],
diff --git a/NotchBuddy/Sources/App/IslandViewContent.swift b/NotchBuddy/Sources/App/IslandViewContent.swift
index 6d030fd9..a6b39ca2 100644
--- a/NotchBuddy/Sources/App/IslandViewContent.swift
+++ b/NotchBuddy/Sources/App/IslandViewContent.swift
@@ -1719,7 +1719,81 @@ struct IntegrationCardView: View {
@State private var githubDetailSection: GitHubDetailSection = .myPRs
private var isConfigured: Bool {
- HookServer.hooksInstalled(for: task.id)
+ switch task.id {
+ // Cursor sessions are Claude Code running in Cursor's integrated terminal,
+ // so the Cursor pill is set up exactly when the Claude Code hooks are.
+ case "integration_claude", "agent_cursor":
+ return HookServer.claudeHooksInstalled()
+ case "agent_codex":
+ #if !APPSTORE
+ return HookServer.codexHooksInstalled()
+ #else
+ return false
+ #endif
+ case "agent_gemini":
+ #if !APPSTORE
+ return HookServer.geminiHooksInstalled()
+ #else
+ return false
+ #endif
+ case "agent_antigravity":
+ #if !APPSTORE
+ return HookServer.agyHooksInstalled()
+ #else
+ return false
+ #endif
+ case "agent_copilot":
+ #if !APPSTORE
+ return HookServer.copilotHooksInstalled()
+ #else
+ return false
+ #endif
+ case "agent_muse":
+ #if !APPSTORE
+ return HookServer.museHooksInstalled()
+ #else
+ return false
+ #endif
+ case "agent_opencode":
+ #if !APPSTORE
+ return HookServer.openCodePluginInstalled()
+ #else
+ return false
+ #endif
+ case "agent_amp":
+ #if !APPSTORE
+ return HookServer.ampPluginInstalled()
+ #else
+ return false
+ #endif
+ case "agent_hermes":
+ #if !APPSTORE
+ return HookServer.hermesPluginInstalled()
+ #else
+ return false
+ #endif
+ case "agent_claude-desktop":
+ return true // nothing to install: the relay tags desktop sessions on its own
+ case "integration_music":
+ #if !APPSTORE
+ return true // Apple Music is always installed on macOS
+ #else
+ return false
+ #endif
+ case "ai_anthropic": return KeychainStore.shared.get("anthropic-api-key") != nil
+ case "ai_google": return KeychainStore.shared.get("google-api-key") != nil
+ case "ai_openai": return KeychainStore.shared.get("openai-api-key") != nil
+ case "ai_ollama": return !AppState.shared.ollamaServerURL.isEmpty
+ case "ai_lmstudio": return !AppState.shared.lmstudioServerURL.isEmpty
+ case "integration_resend": return KeychainStore.shared.get("resend-api-key") != nil
+ case "integration_n8n": return KeychainStore.shared.get("n8n-api-key") != nil
+ case "integration_vercel": return KeychainStore.shared.get("vercel-token") != nil
+ case "integration_github": return KeychainStore.shared.get("github-token") != nil
+ case "integration_stripe": return KeychainStore.shared.get("stripe-api-key") != nil
+ case "integration_notion": return KeychainStore.shared.get("notion-api-key") != nil
+ case "integration_calcom": return KeychainStore.shared.get("calcom-api-key") != nil
+ default: return false
+ }
}
private var openURL: URL? {
diff --git a/NotchBuddy/Sources/App/SettingsView.swift b/NotchBuddy/Sources/App/SettingsView.swift
index 7211e6b9..ddbaf97a 100644
--- a/NotchBuddy/Sources/App/SettingsView.swift
+++ b/NotchBuddy/Sources/App/SettingsView.swift
@@ -1901,7 +1901,13 @@ struct SettingsView: View {
if isMain { return nil }
if def.comingSoon { return String(localized: "Coming soon") }
#if !APPSTORE
- if !HookServer.hooksInstalled(for: def.id) { return String(localized: "Hooks not installed") }
+ if def.id == "agent_gemini" && !HookServer.geminiHooksInstalled() { return String(localized: "Hooks not installed") }
+ if def.id == "agent_antigravity" && !HookServer.agyHooksInstalled() { return String(localized: "Hooks not installed") }
+ if def.id == "agent_codex" && !HookServer.codexHooksInstalled() { return String(localized: "Hooks not installed") }
+ if def.id == "agent_copilot" && !HookServer.copilotHooksInstalled() { return String(localized: "Hooks not installed") }
+ if def.id == "agent_muse" && !HookServer.museHooksInstalled() { return String(localized: "Hooks not installed") }
+ if def.id == "agent_opencode" && !HookServer.openCodePluginInstalled() { return String(localized: "Plugin not installed") }
+ if def.id == "agent_amp" && !HookServer.ampPluginInstalled() { return String(localized: "Plugin not installed") }
if def.id == SpotifyController.pillId && !SpotifyController.shared.isInstalled { return String(localized: "Not installed") }
#endif
if def.category == .ai {