Problem to solve / 要解决的问题
windows/tauri/src/features/ai/(113 个文件)是历史遗留代码。#440 已判定它"裁剪自其他开源项目,不作为本方案的参考依据",但它仍然留在仓库里参与构建,而且会误导人。
它现在的实际状态是没有后端的前端 :
前端调用 get_acp_status、acp_*、get_available_agents 等命令,但 windows/tauri/src-tauri 从未实现过这些命令:platform.rs 只特判 ai_commit_*,translate() 里没有任何 agent 命令,未命中时会直接返回 Windows platform command is not implemented。
backend-capabilities.ts 里 agent: false,capabilityForCommand 会把上述命令全部判成 agent 能力并在 invoke 前直接拒绝;defaultSettings.coreFeatures.aiChat 也是 false。
windows/tauri/src/mocks/tauri-api-mock.ts 用 mock 顶替了这些命令,文件注释写得很直白:"allows the UI to compile and run without the Rust backend"。
造成的影响:
Proposed solution / 建议方案
请维护者二选一,选完我来执行:
删除 (倾向):移除 windows/tauri/src/features/ai/,同步清理 backend-capabilities.ts 的 agent 判定、tauri-api-mock.ts、i18n 文案、设置页 ai-settings、sidebar-history 的 agent 会话分支、pane-container 的 agent tab 分支及相关测试。
隔离 :移到明确的遗留目录并在 docs/ 标注为非参考实现,写清它不接任何后端。保留的唯一理由是参考 UI 形状,而 [Feature] Agent 对话模块:以 ACP 客户端方式接入外部 Agent #440 已经判定不能参考。
需要先确认的边界
windows/tauri/src/features/editor/inline-edit/* 会 import features/ai 的 provider 代码(provider-fetch、ai-token-service、use-available-providers 等),fixed 与 settings-effects.ts 也有引用。如果 inline edit 是打算保留的产品能力,这部分 provider/HTTP 代码需要先搬到中立目录,删除范围只覆盖 Agent 与 chat 相关文件。
Target platform / 目标平台
Windows
Additional context / 补充信息
[Feature] Agent 对话模块:以 ACP 客户端方式接入外部 Agent #440 原文:"Windows 端 windows/tauri/src/features/ai/ 为历史遗留代码(裁剪自其他开源项目),不作为本方案的参考依据 。"
引入路径:92386cf1 Merge pull request #95 from saltFishCode/preview/0.3.0-win-fish。
配套 issue:Windows Agent 对话面板接入共享 ACP host。
Problem to solve / 要解决的问题
windows/tauri/src/features/ai/(113 个文件)是历史遗留代码。#440 已判定它"裁剪自其他开源项目,不作为本方案的参考依据",但它仍然留在仓库里参与构建,而且会误导人。它现在的实际状态是没有后端的前端:
get_acp_status、acp_*、get_available_agents等命令,但windows/tauri/src-tauri从未实现过这些命令:platform.rs只特判ai_commit_*,translate()里没有任何 agent 命令,未命中时会直接返回Windows platform command is not implemented。backend-capabilities.ts里agent: false,capabilityForCommand会把上述命令全部判成 agent 能力并在 invoke 前直接拒绝;defaultSettings.coreFeatures.aiChat也是false。windows/tauri/src/mocks/tauri-api-mock.ts用 mock 顶替了这些命令,文件注释写得很直白:"allows the UI to compile and run without the Rust backend"。造成的影响:
platform_invoke和translate()才发现是死代码。Proposed solution / 建议方案
请维护者二选一,选完我来执行:
windows/tauri/src/features/ai/,同步清理backend-capabilities.ts的 agent 判定、tauri-api-mock.ts、i18n 文案、设置页ai-settings、sidebar-history的 agent 会话分支、pane-container的 agent tab 分支及相关测试。docs/标注为非参考实现,写清它不接任何后端。保留的唯一理由是参考 UI 形状,而 [Feature] Agent 对话模块:以 ACP 客户端方式接入外部 Agent #440 已经判定不能参考。需要先确认的边界
windows/tauri/src/features/editor/inline-edit/*会 importfeatures/ai的 provider 代码(provider-fetch、ai-token-service、use-available-providers等),fixed与settings-effects.ts也有引用。如果 inline edit 是打算保留的产品能力,这部分 provider/HTTP 代码需要先搬到中立目录,删除范围只覆盖 Agent 与 chat 相关文件。Target platform / 目标平台
Windows
Additional context / 补充信息
windows/tauri/src/features/ai/为历史遗留代码(裁剪自其他开源项目),不作为本方案的参考依据。"92386cf1 Merge pull request #95 from saltFishCode/preview/0.3.0-win-fish。