From 385ecbb8da5c33fcc6f33f1f06262e00ac76d7fc Mon Sep 17 00:00:00 2001 From: kang Date: Sat, 9 May 2026 19:04:28 +0800 Subject: [PATCH] auto-save 2026-05-09 19:04 (~6) --- .memory/worklog.json | 14 ++-- RULES.md | 4 +- src/app.js | 6 +- src/index.html | 159 ++++++++++++++++++++++++++++++------------- src/styles.css | 129 +++++++++++++++++++++++++++++++++++ src/sw.js | 2 +- 6 files changed, 254 insertions(+), 60 deletions(-) diff --git a/.memory/worklog.json b/.memory/worklog.json index 7bc336f..34517ac 100644 --- a/.memory/worklog.json +++ b/.memory/worklog.json @@ -1,12 +1,5 @@ { "entries": [ - { - "files_changed": 1, - "hash": "bf5eb1e", - "message": "auto-save 2026-05-07 18:06 (~1)", - "ts": "2026-05-07T18:06:58+08:00", - "type": "commit" - }, { "files_changed": 1, "hash": "d05884a", @@ -3459,6 +3452,13 @@ "type": "session-heartbeat", "message": "Codex 会话活跃 · 最近命令:codex · 分支 master · 2 项未提交变更 · 最近提交:auto-save 2026-05-09 18:53 (~1)", "files_changed": 2 + }, + { + "ts": "2026-05-09T18:58:57+08:00", + "type": "commit", + "message": "auto-save 2026-05-09 18:58 (~2)", + "hash": "9f4d1d2", + "files_changed": 2 } ] } diff --git a/RULES.md b/RULES.md index aa4d62d..4ebbff4 100644 --- a/RULES.md +++ b/RULES.md @@ -14,9 +14,9 @@ - 飞书事件回调(`cli_a97764e101b95be9`):https://hermes.kang-kang.com/feishu/events/cli_a97764e101b95be9 - 飞书主动通知:https://hermes.kang-kang.com/feishu/notify - 飞书机器人列表:https://hermes.kang-kang.com/feishu/apps(只读展示 App ID / 回调地址,不含 Secret / Token) -- 爱马仕前端「设置 → 飞书集成」可自助添加 / 更新飞书机器人;Secret / Token 只写入服务器 `/etc/hermes-feishu-bridge.env` +- 爱马仕前端「集成 → 飞书集成」可自助添加 / 更新飞书机器人;Secret / Token 只写入服务器 `/etc/hermes-feishu-bridge.env` - 爱马仕前端「设置 → 连接」可自助维护 API 地址 / API Key 并测试连接;「对话 → 存周报」和「设置 → 周报记录」会在本地保存任务描述、上下文片段和最终周报 -- 当前前端静态壳缓存版本:`hermes-ui-v13` +- 当前前端静态壳缓存版本:`hermes-ui-v14` - 文档 / 解析:https://styles.kang-kang.com - 管理后台:待定 - 代码仓:https://git.kang-kang.com/kangwan/hermes-glass-ui-personal diff --git a/src/app.js b/src/app.js index 659115b..a207ca2 100644 --- a/src/app.js +++ b/src/app.js @@ -358,10 +358,8 @@ function switchTab(name, options = {}) { if (name === "cron") refreshCron(); if (name === "memory") refreshMemory(); if (name === "tools") refreshTools(); - if (name === "settings") { - renderWeeklyReports(); - refreshFeishuApps(); - } + if (name === "integrations") refreshFeishuApps(); + if (name === "settings") renderWeeklyReports(); if (name === "runs") setTimeout(() => document.getElementById("runPrompt")?.focus(), 50); if (name === "dashboard" && _dashboardDirty) { // 推迟到下一帧,避免阻塞切换动画 diff --git a/src/index.html b/src/index.html index be456f4..b03f34d 100644 --- a/src/index.html +++ b/src/index.html @@ -62,6 +62,10 @@ Agent + + +
+
+
只显示 App ID、回调地址和服务状态;Secret 与 Token 只保存在服务器环境文件。
+
+
+
打开集成页后自动读取飞书桥接服务。
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ +
保存前会校验 App ID / Secret;成功后复制回调地址到飞书事件配置。
+
+
+
+ + + +
@@ -1115,52 +1228,6 @@ git push # Gitea kangwan/hermes-glass-ui-personal
- -
-
-
- -
-
-
飞书集成
-
当前已接入的飞书机器人和事件回调地址
-
-
-
-
-
只显示 App ID、回调地址和服务状态;Secret 与 Token 只保存在服务器环境文件。
- -
-
-
打开设置页后自动读取飞书桥接服务。
-
-
-
- - -
-
- - -
-
- - -
-
- -
保存前会校验 App ID / Secret;成功后复制回调地址到飞书事件配置。
-
-
-
-
-
diff --git a/src/styles.css b/src/styles.css index 63cdda7..5ae1b81 100644 --- a/src/styles.css +++ b/src/styles.css @@ -2136,6 +2136,135 @@ a { color: var(--orange-3); text-decoration: none; } overflow-wrap: anywhere; } +/* ========== 机器人集成 ========== */ +.integrations-scroll { + flex: 1 1 auto; + min-height: 0; + overflow-y: auto; + padding: 4px 8px 8px 0; + display: grid; + grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); + gap: 16px; + align-content: start; +} +.integration-grid { + display: grid; + grid-template-columns: 1fr; + gap: 12px; + align-content: start; +} +.integration-channel-card, +.integration-panel { + background: var(--card-bg); + border: 1px solid var(--line); + border-radius: 18px; + min-width: 0; +} +.integration-channel-card { + padding: 16px; + display: flex; + flex-direction: column; + gap: 10px; + transition: border-color 0.2s, background 0.2s; +} +.integration-channel-card.active { + border-color: rgba(255,105,0,0.4); + background: rgba(255,105,0,0.08); + box-shadow: inset 0 0 0 1px rgba(255,105,0,0.12); +} +.integration-channel-card.muted { + opacity: 0.72; +} +.integration-channel-head { + display: flex; + align-items: flex-start; + justify-content: space-between; + gap: 10px; +} +.integration-channel-icon { + width: 38px; + height: 38px; + border-radius: 12px; + background: linear-gradient(135deg, rgba(255,105,0,0.18), rgba(255,136,48,0.06)); + border: 1px solid var(--line-strong); + color: var(--orange-3); + display: flex; + align-items: center; + justify-content: center; + flex: 0 0 38px; +} +.integration-channel-icon svg { width: 20px; height: 20px; } +.integration-status { + flex: 0 0 auto; + border-radius: 999px; + padding: 4px 8px; + font-size: 11px; + font-weight: 800; +} +.integration-status.ready { + border: 1px solid rgba(80,220,140,0.32); + background: rgba(80,220,140,0.1); + color: #68d391; +} +.integration-status.pending { + border: 1px solid var(--line); + background: rgba(255,255,255,0.035); + color: var(--text-dim2); +} +.integration-channel-title { + color: var(--text); + font-size: 15px; + font-weight: 800; + letter-spacing: -0.2px; +} +.integration-channel-desc { + color: var(--text-dim2); + font-size: 12px; + line-height: 1.55; + overflow-wrap: anywhere; +} +.integration-panel { + display: flex; + flex-direction: column; + min-height: 0; +} +.integration-panel-head { + display: flex; + align-items: flex-start; + justify-content: space-between; + gap: 16px; + padding: 18px 22px 16px; + border-bottom: 1px solid var(--line); + min-width: 0; +} +.integration-panel-title { + color: var(--text); + font-size: 16px; + font-weight: 800; + letter-spacing: -0.25px; +} +.integration-panel-desc { + color: var(--text-dim2); + font-size: 12px; + line-height: 1.45; + margin-top: 3px; +} +.integration-panel-body { + padding: 18px 22px 22px; + display: flex; + flex-direction: column; + gap: 16px; + min-width: 0; +} +@media (max-width: 980px) { + .integrations-scroll { + grid-template-columns: 1fr; + } + .integration-grid { + grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); + } +} + /* ========== 设置 ========== */ .settings-scroll { flex: 1 1 auto; diff --git a/src/sw.js b/src/sw.js index 339fa34..e99e41a 100644 --- a/src/sw.js +++ b/src/sw.js @@ -1,6 +1,6 @@ // 爱马仕 Hermes · 轻量 Service Worker // 静态壳走 network-first(拿不到再回退缓存),API 直通 -const CACHE = "hermes-ui-v13"; +const CACHE = "hermes-ui-v14"; const ASSETS = [ "./", "./index.html",