[Cleanup] 处理 windows/tauri/src/features/ai 历史遗留 AI 前端(无后端、默认不可用)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust, tauri, typescript
- Domain
- desktop
Research direction
Start with windows/tauri/src/features/ai/, platform.rs, translate(), backend-capabilities.ts, and the listed inline-edit imports; read #440 before choosing deletion or isolation. Map the provider dependencies and agent/chat references, then remove or isolate the agreed scope, clean the named settings, mock, i18n, sidebar, pane, and test references, and run the frontend typecheck and tests.
Written by the indexing model from the issue text.
Description
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"。
造成的影响:
- 贡献者会误判 Windows 已经有 Agent 实现。我就因此把它当成可复用的地基,直到翻了
platform_invoke和translate()才发现是死代码。 - 它仍然参与 typecheck 和前端测试,是纯维护成本。
- 将来做 Windows Agent 面板时,很容易被人顺手复用,等于把 #440 已经否掉的设计带回来。
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 形状,而 #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 / 补充信息
- #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。
- Dominant language
- TypeScript
- Stars
- 1.8k
- Forks
- 151
- Avg merge
- 7h 51m
- Merged PRs (30d)
- 351
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from 1lck/Lithe-IDEA
-
area:editor bug P0 platform:macos review: low
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
1lck/Lithe-IDEA#1118 · 2 comments ·
Maintainers usually reply within 1 day
-
area:editor issue-form:feature P1 platform:windows review: low
Difficulty 3/5 1-2 days Newbie friendliness 52/100
1lck/Lithe-IDEA#1129 ·
Maintainers usually reply within 1 day
-
area:editor issue-form:feature P1 platform:windows review: low
Difficulty 4/5 3-5 days Newbie friendliness 48/100
1lck/Lithe-IDEA#1128 ·
Maintainers usually reply within 1 day
-
[Feature] 修复commit区按钮、弹窗、下拉框样式Possibly taken @arkleselect claimed this 1 day ago. Openarea:ui enhancement issue-form:feature P1 platform:macos review: medium
1lck/Lithe-IDEA#1125 · 1 assignee ·
Maintainers usually reply within 1 day
-
[Bug] Windows 版本对比重复显示相同内容Possibly taken @puppyben1 claimed this 1 day ago. Openarea:git bug P0 platform:windows review: low
Difficulty 3/5 1-2 days Newbie friendliness 38/100
1lck/Lithe-IDEA#1123 · 4 comments ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
core
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
vectorize-io/hindsight#5457 ·
Maintainers usually reply within 1 day
-
beginner friendly community contributions-welcome good first issue hacktoberfest help wanted testing up-for-grabs
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
lukilabs/beautiful-mermaid#160 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
rescript-lang/rescript-lang.org#1420 ·
Maintainers usually reply within 2 days