feat(chat): surface model switch warning messages in chat (#1239)

This commit is contained in:
m57 authored and GitHub committed 2026-09-23 15:33:54 +03:00
1 parent 4a732870d7
commit 8cd1ec5298
3 files changed
+107 -1

No files matched your search

@@ -340,6 +340,19 @@ class ChatModelSwitchDelegate(
it.copy(modelSwitchConfirmMessage = confirmMessage)
}
}
} else {
if (pending != null && pending.sequence == modelSwitchSequence) {
val warning = (map["warning"] as? String)?.trim()
if (!warning.isNullOrBlank()) {
val formattedWarning =
if (warning.startsWith("⚠") || warning.startsWith("⚠️")) {
warning
} else {
"⚠ $warning"
}
addAssistantMessage(formattedWarning)
}
}
}
} else if (key == "fast") {
val rawVal = map["value"] as? String