fix(portable): Gemini keys, Telegram pairing UI, and config durability
Improve first-run and channel setup for non-technical users: detect newer Gemini key formats, pin Node 22.22.3, add Control Panel Telegram approve flow, and keep channels/models when config is rewritten. Persist uclaw wizard state via uclaw-meta.json so restarts skip language/persona prompts. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -46,10 +46,22 @@ function localeFromSystem() {
|
||||
}
|
||||
}
|
||||
|
||||
function localeFromMeta(configPath) {
|
||||
if (!configPath) return null;
|
||||
try {
|
||||
const metaPath = join(dirname(configPath), 'uclaw-meta.json');
|
||||
if (!existsSync(metaPath)) return null;
|
||||
return normalise(JSON.parse(readFileSync(metaPath, 'utf8'))?.locale);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
export function resolveLocale({ override, configPath } = {}) {
|
||||
return (
|
||||
normalise(override) ||
|
||||
localeFromConfig(configPath) ||
|
||||
localeFromMeta(configPath) ||
|
||||
localeFromSystem() ||
|
||||
FALLBACK
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user