From 2136fdd306c8fbc28a879babb676e55f4f07b580 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 8 Jun 2026 09:22:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(web):=20=E4=BF=AE=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=97=A0=E5=8F=8D=E5=BA=94(newtask.js=20=E6=BC=8F=20import=20$?= =?UTF-8?q?)+=20=E8=A1=A5=20favicon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit newtask.js 用了 dom.js 的 $ 简写却漏 import,模块加载即抛 ReferenceError: $ is not defined,中断 newtask 绑定及 auth/chat 链路 → 点登录无反应。补 import 与其余模块对齐。 另在 dev.html head 加内联 SVG favicon,消掉根 /favicon.ico 404。 Co-Authored-By: Claude Opus 4.8 (1M context) --- PROGRESS.md | 1 + web/static/dev.html | 1 + web/static/js/newtask.js | 1 + 3 files changed, 3 insertions(+) diff --git a/PROGRESS.md b/PROGRESS.md index f032cbc..7c0eb71 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -23,6 +23,7 @@ ### 2026-06-08 +- **修登录无反应(`$ is not defined`)+ 补 favicon 消 404**:`newtask.js` 用了 DOM 简写 `$`(`dom.js` 导出的 `getElementById`)却漏 import,模块加载到顶层 `$("hd-new").onclick` 即抛 `ReferenceError: $ is not defined`,中断 newtask 全部绑定及其 import 的 auth/chat 链路 → 点登录无反应。补 `import { $ } from "./dom.js"` 与其余模块对齐。另在 `dev.html` `` 加内联 SVG data-URI ``(蓝底白机器人),浏览器不再请求根 `/favicon.ico`,消掉 404;选内联 SVG 而非新增 `.ico` 文件 / 服务端路由,零新增文件零 app.py 改动。 - **新增 Codex 式 `task_progress` 进度工具 + Web 固定进度区**:`TaskProgressTool` 默认注册到 agent,支持 `set_plan/update_step/clear`,返回极短 UI-only 结果;上下文压缩对旧 `task_progress` tool_call/result 做专门折叠,避免进度历史长期占 prompt。前端新增 `progress.js` 做 task 级进度状态合并,修复 `update_step` 只带 `{id,status}` 时因缺标题不显示的问题;当前进度显示从助手消息内提升到 `#task-progress-dock`(对话流下方、输入框上方),历史消息内仍保留进度块作记录。system prompt + coding/ppt/proposal/analyze skill 加轻量使用约定,要求只在多步骤关键阶段少量更新。**部署侧补静态资源 no-cache**:`NoCacheStaticFiles` 替换默认 `StaticFiles`,让浏览器重新校验 `/static/*.js` 等资源,避免前端修复已部署但旧 `chat.js` 仍被缓存导致看不到进度区。校验:`pytest tests/test_context_compaction.py tests/test_task_progress_tool.py tests/test_executor_docker.py tests/test_static_vendor.py -v` 相关集通过;`node --test tests/frontend_task_progress.test.mjs` 2 过;`node --check web/static/js/chat.js web/static/js/progress.js` 过。 ### 2026-06-06 diff --git a/web/static/dev.html b/web/static/dev.html index 4402aaf..01367bc 100644 --- a/web/static/dev.html +++ b/web/static/dev.html @@ -4,6 +4,7 @@ zcbot 控制台 + diff --git a/web/static/js/newtask.js b/web/static/js/newtask.js index 940f81c..3f636e1 100644 --- a/web/static/js/newtask.js +++ b/web/static/js/newtask.js @@ -2,6 +2,7 @@ // 描述 / 智能体(skill)/ 模型 select,提交 POST /v1/tasks。 // 顶层自绑 hd-new 打开、nt-go 提交、各 input 联动;唯一对外导出 loadFolderSuggestions //(供 main enterApp 初始化顶部 filter-wd、files 复制/移动后刷新目录列表)。 +import { $ } from "./dom.js"; import { state } from "./state.js"; import { api } from "./api.js"; import { escapeHtml } from "./format.js";