From 8a91208707bf264d9871fb6facd8d4877a805733 Mon Sep 17 00:00:00 2001 From: AgentCheckin Date: Mon, 19 Oct 2026 12:57:57 +0800 Subject: [PATCH] =?UTF-8?q?feat(qoder):=20=E8=B4=A6=E5=8F=B7=E8=A1=8C?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E3=80=8C=E5=AF=BC=E5=85=A5=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E8=BA=AB=E4=BB=BD=E3=80=8D=E2=80=94=E2=80=94=E6=8A=8A=E6=A1=8C?= =?UTF-8?q?=E9=9D=A2=E5=AE=A2=E6=88=B7=E7=AB=AF=E9=82=A3=E5=8F=B0=E6=9C=BA?= =?UTF-8?q?=E5=99=A8=E7=9A=84=20machineToken/Code/Type=20=E7=B2=98?= =?UTF-8?q?=E8=BF=9B=E6=9D=A5=E5=A4=8D=E7=94=A8=E5=85=B6=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E8=BA=AB=E4=BB=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AgentCheckin/app/www/assets/app.js | 22 +++++++++++++++++++++- AgentCheckin/manifest | 2 +- fnos-install.js | 2 +- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/AgentCheckin/app/www/assets/app.js b/AgentCheckin/app/www/assets/app.js index cad6e1c..2d41d62 100644 --- a/AgentCheckin/app/www/assets/app.js +++ b/AgentCheckin/app/www/assets/app.js @@ -210,7 +210,8 @@ '' + '' + (a.platform === "qoder" ? '' + - '' : "") + + '' + + '' : "") + '" + '' + ""; @@ -240,6 +241,25 @@ .catch(function (e) { toast(e.message, "err"); }) .finally(function () { btn.disabled = false; btn.textContent = "修复站点"; }); } + else if (act === "importdev") { + var raw = prompt("把 Qoder 桌面客户端机器上 runtime-info 输出的那一行 JSON 粘进来\n(需含 machineToken / machineCode / machineType):"); + if (!raw) return; + var obj = null; + try { obj = JSON.parse(raw.trim()); } catch (e) { + var m = raw.match(/\{[\s\S]*\}/); + if (m) { try { obj = JSON.parse(m[0]); } catch (e2) { obj = null; } } + } + if (!obj || !obj.machineToken || !obj.machineCode || !obj.machineType) { + toast("解析失败:需要包含 machineToken / machineCode / machineType", "err"); + return; + } + btn.disabled = true; btn.textContent = "导入中…"; + api("POST", "/qoder/import_device", { id: id, machineToken: obj.machineToken, + machineCode: obj.machineCode, machineType: obj.machineType }) + .then(function (d) { toast(d.message || "已导入设备身份", "ok"); }) + .catch(function (e) { toast(e.message, "err"); }) + .finally(function () { btn.disabled = false; btn.textContent = "导入设备身份"; }); + } else if (act === "toggle") { var acc = state.accounts.find(function (x) { return x.id === id; }); api("POST", "/accounts/update", { id: id, enabled: !acc.enabled }) diff --git a/AgentCheckin/manifest b/AgentCheckin/manifest index 198a1d1..8c4e752 100644 --- a/AgentCheckin/manifest +++ b/AgentCheckin/manifest @@ -1,5 +1,5 @@ appname = AgentCheckin -version = 1.4.1 +version = 1.4.2 display_name = Agent 签到助手 desc = AI 编程工具每日积分自动签到:TRAE(字节跳动)、WorkBuddy / CodeBuddy(腾讯)、Qoder(国内版 + 国际版每日 100 Credits)。多账号管理、多时段自动补签、积分看板、签到日志、Webhook 通知,数据全部保存在 NAS 本地。 platform = all diff --git a/fnos-install.js b/fnos-install.js index f6f0539..35904a0 100644 --- a/fnos-install.js +++ b/fnos-install.js @@ -27,7 +27,7 @@ const BASE = `https://${HOST}:${PORT}`; const USER = process.env.FNOS_USER; const PASS = process.env.FNOS_PASS; const APPNAME = "AgentCheckin"; -const VERSION = "1.4.1"; +const VERSION = "1.4.2"; const FPK = process.argv[2] || path.join(__dirname, "AgentCheckin", "AgentCheckin.fpk");