feat(macos): move camera setting to General

This commit is contained in:
Peter Steinberger
2025-12-14 03:32:56 +00:00
parent 7dd8a7f2e3
commit 3729d269d0
4 changed files with 8 additions and 18 deletions

View File

@@ -186,7 +186,7 @@ enum ControlRequestHandler {
}
private static func cameraEnabled() -> Bool {
UserDefaults.standard.object(forKey: cameraEnabledKey) as? Bool ?? false
UserDefaults.standard.object(forKey: cameraEnabledKey) as? Bool ?? true
}
private static func handleCanvasShow(

View File

@@ -9,7 +9,6 @@ struct DebugSettings: View {
@AppStorage(modelCatalogReloadKey) private var modelCatalogReloadBump: Int = 0
@AppStorage(iconOverrideKey) private var iconOverrideRaw: String = IconOverrideSelection.system.rawValue
@AppStorage(canvasEnabledKey) private var canvasEnabled: Bool = true
@AppStorage(cameraEnabledKey) private var cameraEnabled: Bool = false
@AppStorage(deepLinkAgentEnabledKey) private var deepLinkAgentEnabled: Bool = false
@State private var modelsCount: Int?
@State private var modelsLoading = false
@@ -49,7 +48,6 @@ struct DebugSettings: View {
self.pathsSection
self.quickActionsSection
self.canvasSection
self.cameraSection
self.experimentsSection
Spacer(minLength: 0)
@@ -573,20 +571,6 @@ struct DebugSettings: View {
}
}
private var cameraSection: some View {
GroupBox("Camera") {
VStack(alignment: .leading, spacing: 10) {
Toggle("Allow Camera (agent)", isOn: self.$cameraEnabled)
.toggleStyle(.checkbox)
.help("When off, camera requests return “Camera disabled by user”.")
Text("Allows Clawdis to capture a photo or short video via the built-in camera.")
.font(.caption)
.foregroundStyle(.secondary)
}
}
}
private var experimentsSection: some View {
GroupBox("Experiments") {
Grid(alignment: .leadingFirstTextBaseline, horizontalSpacing: 14, verticalSpacing: 10) {

View File

@@ -3,6 +3,7 @@ import SwiftUI
struct GeneralSettings: View {
@ObservedObject var state: AppState
@AppStorage(cameraEnabledKey) private var cameraEnabled: Bool = true
@ObservedObject private var healthStore = HealthStore.shared
@ObservedObject private var gatewayManager = GatewayProcessManager.shared
// swiftlint:disable:next inclusive_language
@@ -58,6 +59,11 @@ struct GeneralSettings: View {
subtitle: "Allow the agent to show and control the Canvas panel.",
binding: self.$state.canvasEnabled)
SettingsToggleRow(
title: "Allow Camera",
subtitle: "Allow the agent to capture a photo or short video via the built-in camera.",
binding: self.$cameraEnabled)
SettingsToggleRow(
title: "Enable Peekaboo Bridge",
subtitle: "Allow signed tools (e.g. `peekaboo`) to drive UI automation via PeekabooBridge.",

View File

@@ -126,7 +126,7 @@ struct SettingsRootView: View {
enum SettingsTab: CaseIterable {
case general, tools, sessions, cron, config, instances, voiceWake, permissions, debug, about
static let windowWidth: CGFloat = 658 // +10% (tabs fit better)
static let windowHeight: CGFloat = 718 // +15%
static let windowHeight: CGFloat = 790 // +10%
var title: String {
switch self {
case .general: "General"