feat(tasks): add read-only task file browser (GITHUB-3)

This commit is contained in:
ji ruo committed 2026-11-11 14:14:37 +08:00
1 parent 873e3a667b
commit 62ed7db7b2
14 files changed
+1567 -21

No files matched your search

+2 -1
View File
@@ -118,9 +118,10 @@ test("all task detail tabs render their English fixed UI", async () => {
["intercept", "InterceptTab"],
["report", "ReportTab"],
["graph", "GraphTab"],
["files", "FilesTab"],
]) {
const Component = load(base + `/src/app/(main)/function/tasks/detail/_tabs/${file}-tab.tsx`)[name];
const html = visible(render(Component, { taskId: "1" }));
const html = visible(render(Component, { taskId: "1", task: { id: "1", status: "done" }, active: true }));
assert.doesNotMatch(html, /[\p{Script=Han}]/u, `${name}: ${html}`);
}
const { IntelligencePanel } = load(base + "/src/components/intelligence-panel.tsx");
+59
View File
@@ -1,4 +1,63 @@
export const taskMessages = {
"taskFiles.tab": ["文件", "Files"],
"taskFiles.tree": ["目录树", "Directory tree"],
"taskFiles.recent": ["最近文件", "Recent files"],
"taskFiles.summary": ["{{count}} 个文件 · {{size}}", "{{count}} files · {{size}}"],
"taskFiles.refresh": ["刷新", "Refresh"],
"taskFiles.archiveAll": ["下载整个任务 ZIP", "Download task ZIP"],
"taskFiles.workspace": ["在工作空间中打开", "Open in workspace"],
"taskFiles.scope": [
"显示任务运行目录中的文件;写到目录外的文件不会出现在此处。",
"Files in this task’s run directory. Files written elsewhere are not included.",
],
"taskFiles.truncated": [
"仅显示最新的 2000 个文件;统计包含全部文件。",
"Showing the latest 2,000 files; totals include all files.",
],
"taskFiles.name": ["名称", "Name"],
"taskFiles.size": ["大小", "Size"],
"taskFiles.modified": ["修改时间", "Modified"],
"taskFiles.actions": ["操作", "Actions"],
"taskFiles.loading": ["正在加载…", "Loading…"],
"taskFiles.empty": [
"任务尚未产生文件或此目录为空。",
"This task has not produced files, or this directory is empty.",
],
"taskFiles.symlink": ["符号链接(不跟随)", "Symbolic link (not followed)"],
"taskFiles.intent": ["意图 #{{id}} · {{title}}", "Intent #{{id}} · {{title}}"],
"taskFiles.session": ["查看会话", "View session"],
"taskFiles.uploads": ["上传附件", "Uploaded attachments"],
"taskFiles.commands": ["命令输出", "Command output"],
"taskFiles.screenshots": ["报告截图", "Report screenshots"],
"taskFiles.archive": ["下载目录 ZIP", "Download directory ZIP"],
"taskFiles.download": ["下载", "Download"],
"taskFiles.copy": ["复制工作空间相对路径", "Copy workspace-relative path"],
"taskFiles.copied": ["路径已复制", "Path copied"],
"taskFiles.copyFailed": ["无法复制路径,请检查剪贴板权限。", "Could not copy the path. Check clipboard permissions."],
"taskFiles.tooLarge": ["文件超过 2 MiB,请下载后查看。", "This file exceeds 2 MiB. Download it to view."],
"taskFiles.binary": ["二进制文件,请下载后查看。", "Binary file. Download it to view."],
"taskFiles.imageFailed": [
"图片无法预览,文件可能已消失或内容不是支持的图片。",
"Cannot preview this image. It may be missing or contain unsupported data.",
],
"taskFiles.unavailable": [
"任务已删除或归档,或文件已不存在。",
"The task was deleted or archived, or the file no longer exists.",
],
"taskFiles.denied": ["无法访问该文件或符号链接目标。", "Access to this file or symbolic link target is denied."],
"taskFiles.invalidPath": ["路径无效或无法访问。", "Invalid or inaccessible path."],
"taskFiles.notFile": ["请选择普通文件。", "Select a regular file."],
"taskFiles.notDirectory": ["请选择目录进行打包。", "Select a directory to archive."],
"taskFiles.notImage": [
"仅支持 PNG、JPEG、WebP 和 GIF 图片预览。",
"Only PNG, JPEG, WebP and GIF images can be previewed.",
],
"taskFiles.failed": ["文件加载失败,请刷新重试。", "Could not load files. Refresh to try again."],
"taskFiles.pathGone": [
"部分目录已消失或无法访问,请重新选择目录。",
"Some directories are missing or inaccessible. Select another directory.",
],
"taskUI.filesDeleted": ["删除任务文件", "Task files deleted"],
"taskUI.taskDeleted": ["任务已删除", "Task deleted"],
"taskUI.created": ["已创建", "Created"],