interplane.Get Omega
Read in your language

hop

Hop: a small native macOS launcher. Clipboard history, find, on-device dictation and your coding agent behind one key.

Brought by drakestapleton

branch main Branches Tags History

hop / Sources / LineBox.swift

9 lines · 343 bytes Raw Blame History
1import Foundation
2
3/// Thread-safe line collector for command output.
4final 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}