From 6b105471cbf6067c4d1bff40db0d7b8357674e56 Mon Sep 17 00:00:00 2001 From: kang Date: Mon, 11 May 2026 16:09:23 +0800 Subject: [PATCH] auto-save 2026-05-11 16:09 (~4) --- .memory/worklog.json | 26 +++++++++++++------------- RULES.md | 2 +- src/index.html | 4 ++-- src/sw.js | 11 +++++------ 4 files changed, 21 insertions(+), 22 deletions(-) diff --git a/.memory/worklog.json b/.memory/worklog.json index e19bacb..2331561 100644 --- a/.memory/worklog.json +++ b/.memory/worklog.json @@ -1,18 +1,5 @@ { "entries": [ - { - "files_changed": 1, - "hash": "ee2e220", - "message": "auto-save 2026-05-10 07:45 (~1)", - "ts": "2026-05-10T07:45:42+08:00", - "type": "commit" - }, - { - "files_changed": 1, - "message": "Codex 会话活跃 · 最近命令:codex · 分支 master · 1 项未提交变更 · 最近提交:auto-save 2026-05-10 07:45 (~1)", - "ts": "2026-05-09T23:45:55Z", - "type": "session-heartbeat" - }, { "files_changed": 1, "message": "Codex 会话活跃 · 最近命令:codex · 分支 master · 1 项未提交变更 · 最近提交:auto-save 2026-05-10 07:45 (~1)", @@ -3260,6 +3247,19 @@ "message": "auto-save 2026-05-11 15:58 (~4)", "hash": "8f80417", "files_changed": 4 + }, + { + "ts": "2026-05-11T16:03:46+08:00", + "type": "commit", + "message": "auto-save 2026-05-11 16:03 (~5)", + "hash": "0b4d811", + "files_changed": 5 + }, + { + "ts": "2026-05-11T08:06:28Z", + "type": "session-heartbeat", + "message": "Codex 会话活跃 · 最近命令:codex · 分支 master · 1 项未提交变更 · 最近提交:auto-save 2026-05-11 16:03 (~5)", + "files_changed": 1 } ] } diff --git a/RULES.md b/RULES.md index 9422906..74413dd 100644 --- a/RULES.md +++ b/RULES.md @@ -20,7 +20,7 @@ - 爱马仕前端「仪表盘」活动热力图已重做为带摘要、月份标尺、紧凑格子和细分色阶的活动卡片 - 爱马仕前端「设置 → 连接」可自助维护 API 地址 / API Key 并测试连接;「对话 → 存周报」和「设置 → 周报记录」会在本地保存任务描述、上下文片段和最终周报 - 爱马仕前端「设置 → AI 模型接入」和「设置 → MCP 工具接入」可分别维护 LXC 内 `/opt/hermes-agent/config.yaml` 的 `model` 与 `mcp_servers` 块,保存后重启 Docker `hermes-agent` -- 当前前端静态壳缓存版本:`hermes-ui-v30` +- 当前前端静态壳缓存版本:`hermes-ui-v31` - 文档 / 解析:https://styles.kang-kang.com - 管理后台:待定 - 代码仓:https://git.kang-kang.com/kangwan/hermes-glass-ui-personal diff --git a/src/index.html b/src/index.html index 2867f38..e02d7ca 100644 --- a/src/index.html +++ b/src/index.html @@ -11,7 +11,7 @@ 爱马仕 · AI - + @@ -1408,6 +1408,6 @@ git push # Gitea kangwan/hermes-glass-ui-personal - + diff --git a/src/sw.js b/src/sw.js index fd04144..0f41950 100644 --- a/src/sw.js +++ b/src/sw.js @@ -1,11 +1,9 @@ // 爱马仕 Hermes · 轻量 Service Worker // 静态壳走 network-first(拿不到再回退缓存),API 直通 -const CACHE = "hermes-ui-v30"; +const CACHE = "hermes-ui-v31"; const ASSETS = [ - "./", - "./index.html", - "./styles.css?v=20260511-settings-v30", - "./app.js?v=20260511-settings-v30", + "./styles.css?v=20260511-settings-v31", + "./app.js?v=20260511-settings-v31", "./manifest.webmanifest", "./icon.svg", ]; @@ -32,8 +30,9 @@ self.addEventListener("fetch", (e) => { if (url.pathname.startsWith("/feishu/")) return; if (url.pathname.startsWith("/hermes-skills/")) return; if (e.request.method !== "GET") return; + if (e.request.mode === "navigate" || e.request.destination === "document") return; - // 静态壳:network-first,离线再回退到缓存 + // 静态资源:network-first,离线再回退缓存;HTML 导航始终交给 nginx。 e.respondWith( fetch(e.request) .then((res) => {