native macOS codings agent orchestrator prowl.onev.cat
Something went wrong. Try again.
Swift
1234567891011121314151617181920212223242526272829// ProwlCLI/Commands/FocusCommand.swift
import ArgumentParserimport ProwlCLIShared
struct FocusCommand: ParsableCommand { static let configuration = CommandConfiguration( commandName: "focus", abstract: "Focus a worktree, tab, or pane and bring app to front." )
@OptionGroup var selector: SelectorOptions @OptionGroup var options: GlobalOptions
@Argument(help: "Target pane/tab UUID or worktree id/name/path (auto-resolved).") var target: String?
mutating func run() throws { try CLIExecution.run(command: "focus", output: options.outputMode, colorEnabled: options.colorEnabled) { let sel = try selector.resolve(positionalTarget: target) let envelope = CommandEnvelope( output: options.outputMode, command: .focus(FocusInput(selector: sel)) ) try CLIRunner.execute(envelope) } }}