feat: 文件浏览器支持图片预览并更新发布包
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
{"file":".trellis/spec/backend/quality-guidelines.md","reason":"遵循现有后端配置和回归约定"}
|
||||
{"file":".planning/codex-native-update-plan/findings.md","reason":"官方默认开关与实际链路证据"}
|
||||
23
.trellis/tasks/09-30-codex-native-update-plan/prd.md
Normal file
23
.trellis/tasks/09-30-codex-native-update-plan/prd.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# 恢复 Codex 原生计划工具
|
||||
|
||||
用户发现 PlanList 不显示,要求查清官方 update_plan 是否被取消或替换,修复后重新打包提交推送并重启服务;不要安排额外审计。
|
||||
|
||||
## 已确认原因
|
||||
|
||||
官方 Codex 0.157.1 的 tools.update_plan.enabled 缺省为 false;当前 ccweb 没有显式开启。YOLO 不控制该工具的注册。
|
||||
|
||||
## 实现要求
|
||||
|
||||
1. 在 server.js 的 codexAppThreadConfig 中显式开启原生计划工具,覆盖 thread/start、thread/resume 和 thread/fork。
|
||||
2. 在 lib/agent-runtime.js 的 Codex CLI 参数路径加入 -c tools.update_plan.enabled=true。
|
||||
3. 在现有回归中断言发送的配置确实包含开关;验证正常 YOLO 和恢复路径。
|
||||
4. 不更改用户全局配置,不把 MCP 兜底是否调用作为原生修复验收标准。
|
||||
5. 保留既有 PlanList 事件处理,修改范围保持在相关启动配置和回归断言。
|
||||
|
||||
## 验收
|
||||
|
||||
- 现有回归断言线程配置和 CLI 参数显式开启 update_plan。
|
||||
- 项目回归通过,发布包重新生成并提交推送。
|
||||
- 重启符合项目会话状态限制并检查服务可用性。
|
||||
|
||||
用户最新要求收敛到配置修复,停止二进制探针测试。
|
||||
14
.trellis/tasks/09-30-codex-native-update-plan/task.json
Normal file
14
.trellis/tasks/09-30-codex-native-update-plan/task.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"id": "codex-native-update-plan",
|
||||
"name": "codex-native-update-plan",
|
||||
"title": "恢复 Codex 原生 update_plan",
|
||||
"status": "in_progress",
|
||||
"priority": "P1",
|
||||
"creator": "codex",
|
||||
"assignee": "codex",
|
||||
"createdAt": "2026-09-30",
|
||||
"completedAt": null,
|
||||
"base_branch": "main",
|
||||
"relatedFiles": ["server.js", "lib/agent-runtime.js", "scripts/regression.js"],
|
||||
"notes": "官方0.157.1缺省关闭原生计划工具;修复配置并验证实际请求。用户要求不安排额外审计。"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{"_example": "Fill with {\"file\": \"<path>\", \"reason\": \"<why>\"}. Put spec/research files only — no code paths. Run `python3 .trellis/scripts/get_context.py --mode packages` to list available specs. Delete this line once real entries are added."}
|
||||
{"file": ".trellis/spec/frontend/quality-guidelines.md", "reason": "前端质量检查"}
|
||||
{"file": ".trellis/spec/backend/quality-guidelines.md", "reason": "服务端质量检查"}
|
||||
@@ -0,0 +1,3 @@
|
||||
{"_example": "Fill with {\"file\": \"<path>\", \"reason\": \"<why>\"}. Put spec/research files only — no code paths. Run `python3 .trellis/scripts/get_context.py --mode packages` to list available specs. Delete this line once real entries are added."}
|
||||
{"file": ".trellis/spec/frontend/quality-guidelines.md", "reason": "前端质量与资源生命周期约束"}
|
||||
{"file": ".trellis/spec/backend/quality-guidelines.md", "reason": "服务端边界校验与错误处理约束"}
|
||||
20
.trellis/tasks/10-05-file-browser-image-preview/prd.md
Normal file
20
.trellis/tasks/10-05-file-browser-image-preview/prd.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# 文件浏览器支持图片预览
|
||||
|
||||
## 目标
|
||||
|
||||
在 cc-web 文件浏览器中点击常见图片文件时,在现有预览面板内显示图片;文本文件预览保持不变。
|
||||
|
||||
## 范围
|
||||
|
||||
- 支持 PNG、JPEG/JPG、GIF、WebP、BMP、SVG、AVIF 图片。
|
||||
- 图片读取必须沿用 Bearer 登录态、会话工作目录根约束和现有路径穿越防护。
|
||||
- 图片响应设置正确 MIME 类型,并限制最大预览大小为 20 MiB;超出时返回明确错误。
|
||||
- 前端复用现有文件选择流程,通过带鉴权的请求取得图片。栅格图片使用临时对象 URL 展示,并在切换文件、关闭浏览器和请求过期时释放;SVG 使用隔离来源的 data URL 展示。
|
||||
- 文本预览、二进制文件拒绝和现有移动端切换行为保持不变。
|
||||
|
||||
## 验收
|
||||
|
||||
- 点击上述格式的有效图片显示在预览面板,并显示文件名、大小、格式等元信息。
|
||||
- 图片加载失败显示中文错误状态,旧图片不会残留。
|
||||
- 越界路径、未登录请求、目录路径和超大图片不能绕过现有安全限制。
|
||||
- 回归测试覆盖图片响应、MIME、大小限制、路径边界和前端关键契约。
|
||||
26
.trellis/tasks/10-05-file-browser-image-preview/task.json
Normal file
26
.trellis/tasks/10-05-file-browser-image-preview/task.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"id": "file-browser-image-preview",
|
||||
"name": "file-browser-image-preview",
|
||||
"title": "文件浏览器支持图片预览",
|
||||
"description": "文件浏览器预览常见图片格式,沿用会话授权与工作目录边界。",
|
||||
"status": "in_progress",
|
||||
"dev_type": null,
|
||||
"scope": null,
|
||||
"package": null,
|
||||
"priority": "P2",
|
||||
"creator": "shiyue",
|
||||
"assignee": "shiyue",
|
||||
"createdAt": "2026-10-05",
|
||||
"completedAt": null,
|
||||
"branch": null,
|
||||
"base_branch": "main",
|
||||
"worktree_path": null,
|
||||
"commit": null,
|
||||
"pr_url": null,
|
||||
"subtasks": [],
|
||||
"children": [],
|
||||
"parent": null,
|
||||
"relatedFiles": [],
|
||||
"notes": "",
|
||||
"meta": {}
|
||||
}
|
||||
Reference in New Issue
Block a user