Save a default model per user, set from Settings

This commit is contained in:
Ian Gulliver
2026-10-18 00:57:51 -07:00
parent 17f09ecb7c
commit 10c6c84f74
10 changed files with 395 additions and 257 deletions
+2 -1
View File
@@ -291,7 +291,8 @@ struct ComposerView: View {
let offered = live.map { s in models.filter { vendorOf($0) == s.vendor.rawValue } } ?? models
let options = !current.isEmpty && !offered.contains(current) ? [current] + offered : offered
let modelKey = "message:\(live?.id ?? key)"
return ModelState(live: live, current: current, options: options, modelKey: modelKey, selected: pick ?? modelChoices[modelKey] ?? (current.isEmpty ? options[0] : current))
let fresh = live == nil ? store.defaultModel : options[0]
return ModelState(live: live, current: current, options: options, modelKey: modelKey, selected: pick ?? modelChoices[modelKey] ?? (current.isEmpty ? fresh : current))
}
var body: some View {