Add os.Logger categories, OSSignposter wrapper and shortHash helper; enforce exact Debug/Release/install signatures; lint tests; update M0 docs and progress.
34 lines
1.0 KiB
Swift
34 lines
1.0 KiB
Swift
/// Signpost interval names from ARCHITECTURE §15.
|
|
public enum SignpostName: String, CaseIterable, Sendable {
|
|
/// Double-copy detection, from the second copy to a captured text.
|
|
case capture
|
|
/// Panel presentation.
|
|
case panel
|
|
/// An Ollama request, from send to the final delta.
|
|
case request
|
|
/// The first translation token.
|
|
case firstToken
|
|
/// The full translation of one chunk.
|
|
case translate
|
|
/// Output validation.
|
|
case validate
|
|
/// Writing the translation to the clipboard.
|
|
case copy
|
|
/// Accessibility or paste insertion.
|
|
case insert
|
|
|
|
/// `OSSignposter.beginInterval` requires a `StaticString`, so each case maps to its own literal.
|
|
public var literal: StaticString {
|
|
switch self {
|
|
case .capture: "capture"
|
|
case .panel: "panel"
|
|
case .request: "request"
|
|
case .firstToken: "firstToken"
|
|
case .translate: "translate"
|
|
case .validate: "validate"
|
|
case .copy: "copy"
|
|
case .insert: "insert"
|
|
}
|
|
}
|
|
}
|