feat: 新增第 8 个内置 tab「文件追踪」——移植 dsh-file-trace 插件

- 数据层:直接折叠会话事件日志(tool/call + tool/result 对)提取文件操作,
  与仓库「读事件日志而非动注册表」的取向一致;含错误文本捕获与
  running 态实时更新(ctx.on('session/event'),不可见时暂停、恢复时追平)
- 视图:操作列表 + 底部可拖拽 diff 面板;行级 diff(删红/增绿/改蓝)+
  行内字符级高亮;读取视图带真实行号;失败操作统一展示真实错误文本
- 语法着色:轻量分词器(关键字/字符串/数字/类型/函数/注释/预处理),
  色相经 color-mix 落在 diff 三色之间的空档;跨行块注释状态按行序推导
- 单实例 tab,+ 菜单 order 55,角标显示操作数;设置页可整体关闭
  (与独立维护的 dsh-file-trace 插件共存)
- i18n:10 个新 key 同步全部 21 个词典;builtins 测试 7→8;
  README/指南内置清单同步
This commit is contained in:
lhh010
2026-08-30 20:59:50 +08:00
parent 3aab7ca3a5
commit 02d3936b92
31 changed files with 1658 additions and 15 deletions
+10
View File
@@ -17,6 +17,16 @@
/** The th dictionary (key-set-equal to zh, enforced by the type annotation in locales.ts). */
export const th: Record<string, string> = {
files: 'ไฟล์',
fileTrace: 'ติดตามไฟล์',
fileTraceEmpty: 'ยังไม่มีการดำเนินการไฟล์ในเซสชันนี้',
fileTraceRead: 'อ่าน',
fileTraceWrite: 'เขียน',
fileTraceEdit: 'แก้ไข',
fileTraceRunning: 'กำลังทำงาน',
fileTraceError: 'ข้อผิดพลาด',
fileTraceFold: '{count} บรรทัด… คลิกเพื่อขยาย',
fileTraceContext: 'บริบท',
fileTracePriorUnknown: 'เนื้อหาก่อนแก้ไขอยู่นอกหน้าต่าง แสดงเป็นเพิ่มใหม่ทั้งหมด',
explorer: 'ตัวสำรวจ',
git: 'การควบคุมซอร์ส',
terminal: 'เทอร์มินัล',