From 14d840589cca779a04fe3cfe628166a4dec9056b Mon Sep 17 00:00:00 2001 From: v6ole Date: Thu, 18 Jun 2026 17:27:04 +0800 Subject: [PATCH] v2.3: hardcoded Chinese UI + transparent PI background --- com.streamdock.ai-monitor.sdPlugin/en.json | 13 +++++++++++- .../plugin/index.js | 13 ++++++++++++ .../propertyInspector/monitor/index.html | 21 +++++++++---------- com.streamdock.ai-monitor.sdPlugin/zh_CN.json | 13 +++++++++++- 4 files changed, 47 insertions(+), 13 deletions(-) diff --git a/com.streamdock.ai-monitor.sdPlugin/en.json b/com.streamdock.ai-monitor.sdPlugin/en.json index 98604dc..9e5ee40 100644 --- a/com.streamdock.ai-monitor.sdPlugin/en.json +++ b/com.streamdock.ai-monitor.sdPlugin/en.json @@ -1,4 +1,15 @@ { "Name": "AI Monitor", "Description": "Real-time AI agent workflow status on N4" -} \ No newline at end of file +} +{ + "Name": "AI Monitor", + "Description": "Real-time AI agent workflow status on N4", + "Ready": "Ready", + "Prompt": "Prompt", + "Thinking": "Thinking", + "Working": "Working", + "Typing": "Typing", + "Done": "Done", + "Error": "Error" +} diff --git a/com.streamdock.ai-monitor.sdPlugin/plugin/index.js b/com.streamdock.ai-monitor.sdPlugin/plugin/index.js index 83574dc..82b860d 100644 --- a/com.streamdock.ai-monitor.sdPlugin/plugin/index.js +++ b/com.streamdock.ai-monitor.sdPlugin/plugin/index.js @@ -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 } diff --git a/com.streamdock.ai-monitor.sdPlugin/propertyInspector/monitor/index.html b/com.streamdock.ai-monitor.sdPlugin/propertyInspector/monitor/index.html index 11b1a24..c42c3d8 100644 --- a/com.streamdock.ai-monitor.sdPlugin/propertyInspector/monitor/index.html +++ b/com.streamdock.ai-monitor.sdPlugin/propertyInspector/monitor/index.html @@ -1,4 +1,4 @@ - + @@ -6,7 +6,7 @@ AI Monitor Settings - +
1000ms
- + \ No newline at end of file diff --git a/com.streamdock.ai-monitor.sdPlugin/zh_CN.json b/com.streamdock.ai-monitor.sdPlugin/zh_CN.json index 50a7b19..6a6014d 100644 --- a/com.streamdock.ai-monitor.sdPlugin/zh_CN.json +++ b/com.streamdock.ai-monitor.sdPlugin/zh_CN.json @@ -1,4 +1,15 @@ { "Name": "AI 监控", "Description": "在 N4 上实时显示 AI Agent 工作流状态" -} \ No newline at end of file +} +{ + "Name": "AI 监控", + "Description": "在 N4 上实时显示 AI Agent 工作流状态", + "Ready": "就绪", + "Prompt": "输入", + "Thinking": "思考", + "Working": "工作", + "Typing": "回复", + "Done": "完成", + "Error": "错误" +}