v2.3: hardcoded Chinese UI + transparent PI background

This commit is contained in:
2026-06-18 17:27:04 +08:00
parent 42fac626ce
commit 14d840589c
4 changed files with 47 additions and 13 deletions
@@ -86,6 +86,19 @@ var STATUS = {
done: { title: 'Done', fill: '#22c55e', blink: true, breathe: false },
error: { title: 'Error', fill: '#ef4444', blink: false, breathe: false },
};
// ── Language support ─────────────────────────────────
var LANG = (function() { try { var info = JSON.parse(process.argv[9]); if (info && info.application && info.application.language) return info.application.language; } catch(_) {} return "en"; })();
function T(key) {
return key === "idle" ? (LANG === "zh_CN" ? "就绪" : "Ready") :
key === "prompt" ? (LANG === "zh_CN" ? "输入" : "Prompt") :
key === "thinking" ? (LANG === "zh_CN" ? "思考" : "Thinking") :
key === "working" ? (LANG === "zh_CN" ? "工作" : "Working") :
key === "typing" ? (LANG === "zh_CN" ? "回复" : "Typing") :
key === "done" ? (LANG === "zh_CN" ? "完成" : "Done") :
key === "error" ? (LANG === "zh_CN" ? "错误" : "Error") : key;
}
var PRIORITY = ['error','working','typing','thinking','prompt','done','idle'];
var states = {}; // per-context state: { agent, currentState, lastActivity, offsets, timer, logoUri }