style(swift): apply lint and format cleanup

This commit is contained in:
Peter Steinberger
2026-03-03 03:07:46 +00:00
parent ba50dfaae3
commit 80efcb75c7
8 changed files with 15 additions and 19 deletions

View File

@@ -9,5 +9,4 @@ final class CanvasFileWatcher: @unchecked Sendable, SimpleFileWatcherOwner {
queueLabel: "ai.openclaw.canvaswatcher", queueLabel: "ai.openclaw.canvaswatcher",
onChange: onChange)) onChange: onChange))
} }
} }

View File

@@ -30,5 +30,4 @@ final class ConfigFileWatcher: @unchecked Sendable, SimpleFileWatcherOwner {
}, },
onChange: onChange)) onChange: onChange))
} }
} }

View File

@@ -124,12 +124,12 @@ enum ExecSystemRunCommandValidator {
let lower = token.lowercased() let lower = token.lowercased()
let flag = lower.split(separator: "=", maxSplits: 1).first.map(String.init) ?? lower let flag = lower.split(separator: "=", maxSplits: 1).first.map(String.init) ?? lower
if ExecEnvOptions.flagOnly.contains(flag) { if ExecEnvOptions.flagOnly.contains(flag) {
usesModifiers = true usesModifiers = true
idx += 1 idx += 1
continue continue
} }
if ExecEnvOptions.withValue.contains(flag) { if ExecEnvOptions.withValue.contains(flag) {
usesModifiers = true usesModifiers = true
if !lower.contains("=") { if !lower.contains("=") {
expectsOptionValue = true expectsOptionValue = true

View File

@@ -22,17 +22,17 @@ enum HostEnvSecurityPolicy {
"PS4", "PS4",
"GCONV_PATH", "GCONV_PATH",
"IFS", "IFS",
"SSLKEYLOGFILE" "SSLKEYLOGFILE",
] ]
static let blockedOverrideKeys: Set<String> = [ static let blockedOverrideKeys: Set<String> = [
"HOME", "HOME",
"ZDOTDIR" "ZDOTDIR",
] ]
static let blockedPrefixes: [String] = [ static let blockedPrefixes: [String] = [
"DYLD_", "DYLD_",
"LD_", "LD_",
"BASH_FUNC_" "BASH_FUNC_",
] ]
} }

View File

@@ -184,9 +184,9 @@ struct NodeMenuRowView: View {
VStack(alignment: .leading, spacing: 2) { VStack(alignment: .leading, spacing: 2) {
HStack(alignment: .firstTextBaseline, spacing: 8) { HStack(alignment: .firstTextBaseline, spacing: 8) {
Text(NodeMenuEntryFormatter.primaryName(self.entry)) Text(NodeMenuEntryFormatter.primaryName(self.entry))
.font(.callout.weight(NodeMenuEntryFormatter.isConnected(self.entry) ? .semibold : .regular)) .font(.callout.weight(NodeMenuEntryFormatter.isConnected(self.entry) ? .semibold : .regular))
.foregroundStyle(self.palette.primary) .foregroundStyle(self.palette.primary)
.lineLimit(1) .lineLimit(1)
.truncationMode(.middle) .truncationMode(.middle)
.layoutPriority(1) .layoutPriority(1)
@@ -195,9 +195,9 @@ struct NodeMenuRowView: View {
HStack(alignment: .firstTextBaseline, spacing: 6) { HStack(alignment: .firstTextBaseline, spacing: 6) {
if let right = NodeMenuEntryFormatter.headlineRight(self.entry) { if let right = NodeMenuEntryFormatter.headlineRight(self.entry) {
Text(right) Text(right)
.font(.caption.monospacedDigit()) .font(.caption.monospacedDigit())
.foregroundStyle(self.palette.secondary) .foregroundStyle(self.palette.secondary)
.lineLimit(1) .lineLimit(1)
.truncationMode(.middle) .truncationMode(.middle)
.layoutPriority(2) .layoutPriority(2)

View File

@@ -311,7 +311,7 @@ extension OnboardingView {
.font(.caption.monospaced()) .font(.caption.monospaced())
.foregroundStyle(.secondary) .foregroundStyle(.secondary)
.lineLimit(1) .lineLimit(1)
.truncationMode(.middle) .truncationMode(.middle)
} }
} }
Spacer(minLength: 0) Spacer(minLength: 0)

View File

@@ -172,9 +172,9 @@ actor VoicePushToTalk {
let adoptedPrefix = self.adoptedPrefix let adoptedPrefix = self.adoptedPrefix
let adoptedAttributed: NSAttributedString? = adoptedPrefix.isEmpty ? nil : VoiceOverlayTextFormatting let adoptedAttributed: NSAttributedString? = adoptedPrefix.isEmpty ? nil : VoiceOverlayTextFormatting
.makeAttributed( .makeAttributed(
committed: adoptedPrefix, committed: adoptedPrefix,
volatile: "", volatile: "",
isFinal: false) isFinal: false)
self.overlayToken = await MainActor.run { self.overlayToken = await MainActor.run {
VoiceSessionCoordinator.shared.startSession( VoiceSessionCoordinator.shared.startSession(
source: .pushToTalk, source: .pushToTalk,
@@ -406,5 +406,4 @@ actor VoicePushToTalk {
if suffix.isEmpty { return prefix } if suffix.isEmpty { return prefix }
return "\(prefix) \(suffix)" return "\(prefix) \(suffix)"
} }
} }

View File

@@ -773,5 +773,4 @@ actor VoiceWakeRuntime {
} }
#endif #endif
} }