Go to file
caoqianming 514d36c481 core(§7 Phase G G3): chat 只读页 + markdown + tool 折叠
- web/app.py 加 _get_md() 单例 MarkdownIt(gfm-like + linkify +
  breaks,html=False 禁内联 HTML 防 XSS),fenced code 走 pygments
  _pygments_highlight 回调(codehilite cssclass)。
- load_chat_messages(tid):PG idx asc 读 messages。
  build_chat_blocks(messages):system / tool 不入 block(tool 内嵌进
  assistant.tool_call.result),user / assistant text 走 md 渲染,
  orphan tool_call → [no result]。_args_preview 60 字截断,
  _pretty_json 解析失败 fallback 原串。
- /tasks/{id} 渲染 chat.html;删 task_placeholder.html。
- chat.html:.msg 卡片(user 浅蓝 / assistant 白底),tool_call 用
  <details> 默认折叠(无 JS,浏览器原生);summary 显示 tool 名 +
  args 前 60 字预览,展开看 args_pretty + result。
- CSS 加 .body 内 markdown 元素样式(table / blockquote / code / pre
  / strikethrough)+ .codehilite 浅色 token 配色(keyword/string/
  comment/function/number/operator,余下黑色)。
- requirements: markdown-it-py[linkify] / mdit-py-plugins / pygments。

Smoke 28 路径全绿(in-process Starlette TestClient):4 display
blocks aggregation + GFM 特性(table/fence/autolink/strikethrough/
bold)+ tool 配对(命中 + orphan [no result])+ HTML 含 <details>/
tool-badge/codehilite/<s> + 空 task 文案 + invalid UUID 404 + util
单测(args_preview/pretty_json/render_md 边界)。版本 0.2 → 0.3。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 08:38:31 +08:00
config Initial import: zcbot personal task agent 2026-05-06 11:02:59 +08:00
core core(§7 B Step 6): no-subtask 前缀嵌套校验 2026-05-14 11:59:37 +08:00
db/migrations core(§7 B Step 1): Storage 基建 — SQLAlchemy ORM + alembic + db CLI 2026-05-14 10:41:44 +08:00
prompts/system 修三处 v3 遗留: Iconify 不触发 / mkdir -p 误创目录 / 平台无知 2026-05-06 13:12:17 +08:00
skills proposal: 阶段二每段卡点附"下一段要点预告" 2026-05-08 16:11:18 +08:00
tools 修三处 v3 遗留: Iconify 不触发 / mkdir -p 误创目录 / 平台无知 2026-05-06 13:12:17 +08:00
web core(§7 Phase G G3): chat 只读页 + markdown + tool 折叠 2026-05-15 08:38:31 +08:00
.gitignore 添加col.ps1到gitignore 2026-05-08 08:03:49 +08:00
CLAUDE.md core(§7 B Step 4): --task-dir 双形态 + RUN.md 运行手册 2026-05-14 11:38:05 +08:00
DESIGN.md core(§7 B Step 3): TaskState ORM + Web UI 设计 (Phase G) 2026-05-14 11:25:53 +08:00
PROGRESS.md core(§7 Phase G G3): chat 只读页 + markdown + tool 折叠 2026-05-15 08:38:31 +08:00
RUN.md core(§7 Phase G G3): chat 只读页 + markdown + tool 折叠 2026-05-15 08:38:31 +08:00
alembic.ini core(§7 B Step 1): Storage 基建 — SQLAlchemy ORM + alembic + db CLI 2026-05-14 10:41:44 +08:00
cli.py core(§7 Phase G G1): Web UI 脚手架 + cli.py web 子命令 2026-05-14 13:37:54 +08:00
main.py core(§7 B Step 6): no-subtask 前缀嵌套校验 2026-05-14 11:59:37 +08:00
requirements.txt core(§7 Phase G G3): chat 只读页 + markdown + tool 折叠 2026-05-15 08:38:31 +08:00