ui(macos): always enable deep links

This commit is contained in:
Peter Steinberger
2025-12-14 04:06:12 +00:00
parent 357a1a982b
commit 951993db17
3 changed files with 4 additions and 15 deletions

View File

@@ -26,7 +26,6 @@ let webChatPortKey = "clawdis.webChatPort"
let canvasEnabledKey = "clawdis.canvasEnabled" let canvasEnabledKey = "clawdis.canvasEnabled"
let cameraEnabledKey = "clawdis.cameraEnabled" let cameraEnabledKey = "clawdis.cameraEnabled"
let peekabooBridgeEnabledKey = "clawdis.peekabooBridgeEnabled" let peekabooBridgeEnabledKey = "clawdis.peekabooBridgeEnabled"
let deepLinkAgentEnabledKey = "clawdis.deepLinkAgentEnabled"
let deepLinkKeyKey = "clawdis.deepLinkKey" let deepLinkKeyKey = "clawdis.deepLinkKey"
let modelCatalogPathKey = "clawdis.modelCatalogPath" let modelCatalogPathKey = "clawdis.modelCatalogPath"
let modelCatalogReloadKey = "clawdis.modelCatalogReload" let modelCatalogReloadKey = "clawdis.modelCatalogReload"

View File

@@ -8,7 +8,6 @@ struct DebugSettings: View {
@AppStorage(modelCatalogPathKey) private var modelCatalogPath: String = ModelCatalogLoader.defaultPath @AppStorage(modelCatalogPathKey) private var modelCatalogPath: String = ModelCatalogLoader.defaultPath
@AppStorage(modelCatalogReloadKey) private var modelCatalogReloadBump: Int = 0 @AppStorage(modelCatalogReloadKey) private var modelCatalogReloadBump: Int = 0
@AppStorage(iconOverrideKey) private var iconOverrideRaw: String = IconOverrideSelection.system.rawValue @AppStorage(iconOverrideKey) private var iconOverrideRaw: String = IconOverrideSelection.system.rawValue
@AppStorage(deepLinkAgentEnabledKey) private var deepLinkAgentEnabled: Bool = false
@State private var modelsCount: Int? @State private var modelsCount: Int?
@State private var modelsLoading = false @State private var modelsLoading = false
@State private var modelsError: String? @State private var modelsError: String?
@@ -150,13 +149,6 @@ struct DebugSettings: View {
"to an already-running gateway " + "to an already-running gateway " +
"and will not start one itself.") "and will not start one itself.")
} }
GridRow {
self.gridLabel("Deep links")
Toggle("", isOn: self.$deepLinkAgentEnabled)
.labelsHidden()
.toggleStyle(.checkbox)
.help("Enables handling of clawdis://agent?... deep links to trigger an agent run.")
}
} }
let key = DeepLinkHandler.currentKey() let key = DeepLinkHandler.currentKey()
@@ -186,6 +178,10 @@ struct DebugSettings: View {
Spacer(minLength: 0) Spacer(minLength: 0)
} }
Text("Deep links (clawdis://…) are always enabled; the key controls unattended runs.")
.font(.caption2)
.foregroundStyle(.secondary)
VStack(alignment: .leading, spacing: 6) { VStack(alignment: .leading, spacing: 6) {
Text("Stdout / stderr") Text("Stdout / stderr")
.font(.caption.weight(.semibold)) .font(.caption.weight(.semibold))

View File

@@ -17,12 +17,6 @@ final class DeepLinkHandler {
deepLinkLogger.debug("ignored url \(url.absoluteString, privacy: .public)") deepLinkLogger.debug("ignored url \(url.absoluteString, privacy: .public)")
return return
} }
guard UserDefaults.standard.bool(forKey: deepLinkAgentEnabledKey) else {
self.presentAlert(
title: "Deep links are disabled",
message: "Enable “Allow URL scheme (agent)” in Clawdis Debug Settings to accept clawdis:// links.")
return
}
guard !AppStateStore.shared.isPaused else { guard !AppStateStore.shared.isPaused else {
self.presentAlert(title: "Clawdis is paused", message: "Unpause Clawdis to run agent actions.") self.presentAlert(title: "Clawdis is paused", message: "Unpause Clawdis to run agent actions.")
return return