···2626 // Send
2727 public static let emptyInput = "EMPTY_INPUT"
2828 public static let sendFailed = "SEND_FAILED"
2929+ public static let waitTimeout = "WAIT_TIMEOUT"
29303031 // Key
3132 public static let invalidRepeat = "INVALID_REPEAT"
+15-1
supacode/CLIService/Shared/InputModels.swift
···2424 }
2525}
26262727+public enum InputSource: String, Codable, Sendable {
2828+ case argv
2929+ case stdin
3030+}
3131+2732public struct SendInput: Codable, Sendable {
2833 public let selector: TargetSelector
2934 public let text: String
3035 public let trailingEnter: Bool
3636+ public let source: InputSource
3737+ public let wait: Bool
3838+ public let timeoutSeconds: Int?
31393240 public init(
3341 selector: TargetSelector = .none,
3442 text: String,
3535- trailingEnter: Bool = true
4343+ trailingEnter: Bool = true,
4444+ source: InputSource = .argv,
4545+ wait: Bool = true,
4646+ timeoutSeconds: Int? = nil
3647 ) {
3748 self.selector = selector
3849 self.text = text
3950 self.trailingEnter = trailingEnter
5151+ self.source = source
5252+ self.wait = wait
5353+ self.timeoutSeconds = timeoutSeconds
4054 }
4155}
4256