SPB Git

spb/zyquo-local Public MIT

Native macOS AI chat that runs LLMs 100% locally on Apple Silicon with MLX — no cloud, no API keys.

Swift 97.2% Shell 1.8% Makefile 1%

phase8: coherence sweep — syntax palette into ZyquoTheme tokens, user-facing filename naming

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
simon-pierre boucher committed 12 days ago (Jul 30, 2026) parent 5c5ed69

Showing 3 changed files with +14 and −5

modified Sources/ZyquoLocal/DesignSystem/ZyquoTheme.swift +9 −0
@@ -105,6 +105,15 @@ enum ZyquoTheme {
105 105 static let shadowRadius: CGFloat = 12
106 106 static let shadowY: CGFloat = 2
107 107
108 + // MARK: - Syntax highlighting palette (code blocks)
109 +
110 + enum Syntax {
111 + static let comment = NSColor(hex: 0x8A948F)
112 + static let keyword = NSColor(hex: 0x0E86C4)
113 + static let number = NSColor(hex: 0xC47A0E)
114 + static let string = NSColor(hex: 0x2FA36B)
115 + }
116 +
108 117 // MARK: - Helpers
109 118
110 119 /// Appearance-adaptive color from light/dark hex values.
modified Sources/ZyquoLocal/Views/Chat/MarkdownText.swift +4 −4
@@ -256,7 +256,7 @@ enum SyntaxHighlighter {
256 256 let trimmed = line.trimmingCharacters(in: .whitespaces)
257 257 if trimmed.hasPrefix("//") || trimmed.hasPrefix("#") || trimmed.hasPrefix("--") {
258 258 var comment = AttributedString(line)
259 comment.foregroundColor = NSColor(hex: 0x8A948F)
259 + comment.foregroundColor = ZyquoTheme.Syntax.comment
260 260 return comment
261 261 }
262 262
@@ -267,9 +267,9 @@ enum SyntaxHighlighter {
267 267 func flushWord(_ word: String) {
268 268 var part = AttributedString(word)
269 269 if keywords.contains(word) {
270 part.foregroundColor = NSColor(hex: 0x0E86C4)
270 + part.foregroundColor = ZyquoTheme.Syntax.keyword
271 271 } else if word.first?.isNumber == true, Double(word) != nil {
272 part.foregroundColor = NSColor(hex: 0xC47A0E)
272 + part.foregroundColor = ZyquoTheme.Syntax.number
273 273 }
274 274 result += part
275 275 }
@@ -278,7 +278,7 @@ enum SyntaxHighlighter {
278 278 guard !current.isEmpty else { return }
279 279 if inString != nil {
280 280 var part = AttributedString(current)
281 part.foregroundColor = NSColor(hex: 0x2FA36B)
281 + part.foregroundColor = ZyquoTheme.Syntax.string
282 282 result += part
283 283 } else {
284 284 flushWord(current)
modified Sources/ZyquoLocal/Views/Settings/SettingsView.swift +1 −1
@@ -293,7 +293,7 @@ private struct AdvancedSettings: View {
293 293 private func exportAll() {
294 294 let panel = NSSavePanel()
295 295 panel.allowedContentTypes = [.json]
296 panel.nameFieldStringValue = "ZyquoLocal-conversations.json"
296 + panel.nameFieldStringValue = "Zyquo Local Conversations.json"
297 297 guard panel.runModal() == .OK, let url = panel.url else { return }
298 298 let encoder = JSONEncoder()
299 299 encoder.dateEncodingStrategy = .iso8601
300 300