feat: add Russian localization and independent STT languages
This commit is contained in:
@@ -233,6 +233,10 @@ export const ROLE_SLOT: Readonly<Record<ModelRole, ModelSlotName>> = {
|
||||
export interface GeneralSettings {
|
||||
/** Auto-update the app (default ON). Mechanism ships in a later wave. */
|
||||
autoUpdate?: boolean;
|
||||
/** Absent = browser/system language (English for unsupported languages). */
|
||||
language?: "en" | "ru";
|
||||
/** Independent dictation language; absent = browser/system language. */
|
||||
sttLanguage?: "en" | "ru";
|
||||
}
|
||||
|
||||
/** Agent settings — everything about the non-conversation machinery. */
|
||||
@@ -377,7 +381,7 @@ export interface UserSettings {
|
||||
* prompts default off — hence their absence here. */
|
||||
export interface FactorySettings {
|
||||
version: number;
|
||||
general: Required<GeneralSettings>;
|
||||
general: GeneralSettings & { autoUpdate: boolean };
|
||||
appearance: {
|
||||
mode: "dark" | "light";
|
||||
background: string | null;
|
||||
@@ -441,6 +445,9 @@ function sanitizeGeneral(raw: Record<string, unknown>): GeneralSettings {
|
||||
const out: GeneralSettings = {};
|
||||
const autoUpdate = boolOrDrop(raw.autoUpdate);
|
||||
if (autoUpdate !== undefined) out.autoUpdate = autoUpdate;
|
||||
for (const key of ["language", "sttLanguage"] as const) {
|
||||
if (raw[key] === "en" || raw[key] === "ru") out[key] = raw[key];
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user