Commit Graph

4 Commits

Author SHA1 Message Date
Pine 172ea59649 feat(ui): 语言切换/循环模式/项目目录/设置页/插件市场/聊天组件等前端更新 2026-09-08 00:11:22 +08:00
Pine 29b1c7a3da fix(files): 消除重复'文件'菜单,新 Files 页参考旧页补下载与路径
问题:上游合并后 /files(FilesWorkspace 新页)与 /workspace(旧版
核心文件页)同时存在于侧边栏,nav.files 与 nav.workspace 中文标签均为
'文件',导致'当前助理设置'分组下出现两个'文件'菜单;OS 桌面模式
OS_APPS 同样注册了两个'文件'应用。

修复:
- builtinMenu.ts / osApps.ts:移除 core.workspace 菜单项与应用注册,
  侧边栏只保留一个'文件'入口(/files 新页)。/workspace 路由保留可深链。
- FilesNavigator 工具栏:参考旧页新增'下载'按钮(/workspace/download
  打包下载工作区,复用旧页 message 流程,含 DownloadCancelledError 处理)。
- FilesPage 页头:参考旧页新增'工作区路径'副标题展示(经
  /workspace/coding-project 获取 workspace_dir,长路径截断 hover 见全)。

验证:tsc 0 错;files-workspace/os/layouts 39 文件 227 测试全过;下载端点
经 8093 代理返回 200 有效 zip。
2026-09-04 16:54:59 +08:00
Pine 55f8d9f81f feat(workspace): port session project-dirs, fix 404s, add Tauri dir picker
C-port the upstream /chats/{id}/project-dirs feature so the chat-scoped
project directory binding is fully functional on the cloud backend:

- services/project_directory.py (new): lean cloud adaptation of the
  upstream module — normalize (dedupe/resolve/max 10), meta read for the
  persisted override, effective resolution (session > agent > workspace),
  nesting detection.
- chats/manager.py: set_session_project_dirs + get_session_project_dirs
  persist the override in ChatSpec.meta[runtime_context] under the lock
  (one-way migration: list supersedes legacy scalar).
- chats/api.py: GET/PUT/DELETE /{chat_id}/project-dirs + deprecated
  /{chat_id}/project-dir views, with 422 on missing dirs and response
  models matching the merged frontend (exists/nested_with/is_workspace).
- runtime/builder.py: session override feeds the per-turn coding project
  dir (weakest source; fork/ACP still win), so bound directories actually
  take effect for the chat's tools.
- Fix A: frontend projectDirectoryApi paths /workspace/project-directory*
  -> /workspace/coding-project* (cloud backend already exposes these).
- Fix B: add POST /workspace/coding-project/browse-dirs/create for the
  file-browser 'new folder' action (validated name, 409/403/500 mapping).
- Tauri system directory picker: 'Choose folder' button in the project
  directory panel calls the @tauri-apps/plugin-dialog native directory
  dialog (capability dialog:allow-open already granted), queueing the
  pick as a session binding or the agent draft; hidden outside the Tauri
  runtime; i18n across all 6 locales.

Verified: backend restart + curl (GET/PUT/DELETE project-dirs, deprecated
views, browse-dirs/create, 422/409/400 cases), dev-proxy end-to-end,
frontend tsc clean, vitest 25/25, production build 2m06s.
2026-09-04 14:30:32 +08:00
Pine 8ecc37630a feat(pineagents): 跟随上游 v2.2.0 引入 Files 工作区并迁移 Coding 页(阶段 1)
- 引入 features/files-workspace + features/project-directory + pages/Files(上游 v2.2.0 纯增量)
- 新增依赖:three/3d-force-graph/three-spritetext/motion(MemoryGraph 3D 记忆图)
- 同步上游伴生模块(upstream_only):workspace.ts/git.ts/markdown.ts/codingTabsStore/useWorkspaceWatch/
  FilePreview/TabbedEditor/GitPanel/codingMode*/agents.ts/vite-env.d.ts/api/types/workspace
- api/types/agents.ts 按 A 桶裁决合并:保留云超服 deletable + 吸收上游 Mailbox/MemoryGraph 类型
- Coding 页迁入 Files:删除 pages/Coding/index.tsx + FileTree,/coding 路由移除,
  codingMode 模式导航重定向到 /files(Sidebar/Chat/builtinRoutes/CodingModeToggle)
- builtinMenu 增加 core.files 菜单入口(agent-group 下 order 5)
- locales 合并 files.* 键(zh/en/vi 用上游,lo/my/th 用 en 占位待翻译)
- 测试适配:ResponseArtifactList 深层 chat import 改为相对路径(本地 chat stub 配置所致)
- 验证:tsc 0 错误、vite build 通过、files-workspace/project-directory/stores/locales 测试通过
  (sidebarModeStore 失败为预存在、与本次无关)
2026-09-04 02:51:07 +08:00