Func pill: eyedropper (colour in many formats in a new brov-chat tab, HEX to clipboard, context for claude) and live Mac card (CPU, cores, RAM, SSD)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -45,6 +45,15 @@ final class ChatTabs {
|
||||
return c
|
||||
}
|
||||
|
||||
private var seeds: [UUID: String] = [:]
|
||||
|
||||
/// Context prepended to the first message sent from a tab (e.g. the picked colour).
|
||||
func seed(_ id: UUID, _ text: String) { seeds[id] = text }
|
||||
func takeSeed(_ id: UUID?) -> String? {
|
||||
guard let id else { return nil }
|
||||
return seeds.removeValue(forKey: id)
|
||||
}
|
||||
|
||||
func saveHistory(_ h: [ChatMessage], for id: UUID) { histories[id] = h }
|
||||
func history(for id: UUID) -> [ChatMessage] { histories[id] ?? [] }
|
||||
|
||||
@@ -73,6 +82,7 @@ final class ChatTabs {
|
||||
clis[id]?.cancel()
|
||||
clis.removeValue(forKey: id)
|
||||
histories.removeValue(forKey: id)
|
||||
seeds.removeValue(forKey: id)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user