hop
Hop: a small native macOS launcher. Clipboard history, find, on-device dictation and your coding agent behind one key.
Brought by drakestapleton
| 1 | import Foundation |
| 2 | |
| 3 | /// Thread-safe line collector for command output. |
| 4 | final class LineBox: @unchecked Sendable { |
| 5 | private let l = NSLock() |
| 6 | private var lines: [String] = [] |
| 7 | func add(_ s: String) { l.lock(); lines.append(s); l.unlock() } |
| 8 | var text: String { l.lock(); defer { l.unlock() }; return lines.joined(separator: "\n") } |
| 9 | } |