feat: add default variant support in settings and UI components

This commit is contained in:
Bohdan Triapitsyn
2026-01-08 16:08:51 +02:00
parent 8e777a94c2
commit ab731fdc79
9 changed files with 330 additions and 95 deletions
+10 -4
View File
@@ -590,11 +590,17 @@ const sanitizeSettingsUpdate = (payload) => {
result.typographySizes = typography;
}
if (typeof candidate.defaultModel === 'string' && candidate.defaultModel.length > 0) {
result.defaultModel = candidate.defaultModel;
if (typeof candidate.defaultModel === 'string') {
const trimmed = candidate.defaultModel.trim();
result.defaultModel = trimmed.length > 0 ? trimmed : undefined;
}
if (typeof candidate.defaultAgent === 'string' && candidate.defaultAgent.length > 0) {
result.defaultAgent = candidate.defaultAgent;
if (typeof candidate.defaultVariant === 'string') {
const trimmed = candidate.defaultVariant.trim();
result.defaultVariant = trimmed.length > 0 ? trimmed : undefined;
}
if (typeof candidate.defaultAgent === 'string') {
const trimmed = candidate.defaultAgent.trim();
result.defaultAgent = trimmed.length > 0 ? trimmed : undefined;
}
if (typeof candidate.queueModeEnabled === 'boolean') {
result.queueModeEnabled = candidate.queueModeEnabled;