Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Cleanup] 处理 windows/tauri/src/features/ai 历史遗留 AI 前端(无后端、默认不可用)

Open
#957 3 comments 0 reactions 0 assignees View on GitHub

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

platform:windows review: medium
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 / 建议方案

请维护者二选一,选完我来执行:

  1. 删除(倾向):移除 windows/tauri/src/features/ai/,同步清理 backend-capabilities.ts 的 agent 判定、tauri-api-mock.ts、i18n 文案、设置页 ai-settings、sidebar-history 的 agent 会话分支、pane-container 的 agent tab 分支及相关测试。
  2. 隔离:移到明确的遗留目录并在 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from 1lck/Lithe-IDEA

All issues in 1lck/Lithe-IDEA

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.