Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/hop/blob/main/Sources/LineBox.swift # hop Hop: a small native macOS launcher. Clipboard history, find, on-device dictation and your coding agent behind one key. Brought by drakestapleton Sign in to star 1 stars 1 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `hop / Sources / LineBox.swift` 9 lines ยท 343 bytes Raw Blame History 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 }