Problem to solve / 要解决的问题
Windows 端目前没有可用的 Agent 对话能力,而 macOS 已经有完整的 Agent 侧栏(#894 引入 macos/Sources/Lithe/Views/Agent/ 与 macos/Sources/LitheAgentConversationModule/,AgentConversationEntryPolicy.rightSidebar),并在 #950 补上了 Codex 本机订阅与对话框内额度显示。
Windows 侧现在的状态是前端有壳、后端没有 :
windows/tauri/src/config/backend-capabilities.ts 里 agent: false(提示"待开发"),defaultSettings.coreFeatures.aiChat 默认 false。
windows/tauri/src/platform/tauri-core.ts 的 capabilityForCommand 把 acp_*、codex_*、_chat、get_available_agents 全部判成 agent 能力并直接拒绝,所以这些调用到不了任何后端。
windows/tauri/src-tauri 从来没有过 agent/ACP 模块:platform.rs 的 platform_invoke 只特判 ai_commit_*,其余走 translate() → lithe_core::execute_json,而 translate() 里没有任何 agent 命令,未命中的命令直接返回 Windows platform command is not implemented。
windows/tauri/src/features/ai/ 是历史遗留代码,[Feature] Agent 对话模块:以 ACP 客户端方式接入外部 Agent #440 已明确判定不作为参考依据。
后果:Windows 用户完全没有 Agent 对话能力;两端如果各自实现 ACP,协议行为和进程清理容易分叉。
Proposed solution / 建议方案
按 #440 的分期,在 Windows 上接入已经存在的共享实现,不新写第二套 ACP 客户端:
后端桥(一期) :在 windows/tauri/src-tauri 增加 Agent host 适配,复用 rust/lithe-agent-host 的 AgentHandle(open / send / close),事件形状严格使用 shared/fixtures/agent/acp-events-v1.json,与 macOS 走 lithe_agent_open_json / lithe_agent_send_json / lithe_agent_close 的链路等价。命令面只保留 open/send/close 这类长生命周期入口,不给每个共享 Core 操作加 Tauri command。
能力开关 :打开 backend-capabilities.ts 的 agent 能力,并把 Windows 的默认开关策略写进 Agent Note。
前端面板(后续) :按 Windows 约定(features/、ui/、platform/)新写 React 面板,覆盖 macOS 已有能力:会话列表与历史、消息流、工具证据与权限确认、模型/权限/思考配置、供应商配置(本机 Codex/Claude 与自定义)、Codex 订阅登录、对话框内订阅额度、上下文用量。
需要维护者先定的两件事
Windows 的落点是右栏面板(对齐 macOS 的 rightSidebar)还是编辑器 tab?现有 features/ai 是 tab 模型,直接沿用会把一个已被判定为遗留的设计固化下来。
共享 host 在 Windows 上的进程树回收与 PATH/Node 探测需要实机验收:kill_tree 的信号写死 SIGKILL,rust/lithe-agent-host/src/environment.rs 的 search_path 与 login shell 环境有 cfg(unix) 分支。
明确不做
Target platform / 目标平台
Windows
Additional context / 补充信息
Problem to solve / 要解决的问题
Windows 端目前没有可用的 Agent 对话能力,而 macOS 已经有完整的 Agent 侧栏(#894 引入
macos/Sources/Lithe/Views/Agent/与macos/Sources/LitheAgentConversationModule/,AgentConversationEntryPolicy.rightSidebar),并在 #950 补上了 Codex 本机订阅与对话框内额度显示。Windows 侧现在的状态是前端有壳、后端没有:
windows/tauri/src/config/backend-capabilities.ts里agent: false(提示"待开发"),defaultSettings.coreFeatures.aiChat默认false。windows/tauri/src/platform/tauri-core.ts的capabilityForCommand把acp_*、codex_*、_chat、get_available_agents全部判成 agent 能力并直接拒绝,所以这些调用到不了任何后端。windows/tauri/src-tauri从来没有过 agent/ACP 模块:platform.rs的platform_invoke只特判ai_commit_*,其余走translate()→lithe_core::execute_json,而translate()里没有任何 agent 命令,未命中的命令直接返回Windows platform command is not implemented。windows/tauri/src/features/ai/是历史遗留代码,[Feature] Agent 对话模块:以 ACP 客户端方式接入外部 Agent #440 已明确判定不作为参考依据。后果:Windows 用户完全没有 Agent 对话能力;两端如果各自实现 ACP,协议行为和进程清理容易分叉。
Proposed solution / 建议方案
按 #440 的分期,在 Windows 上接入已经存在的共享实现,不新写第二套 ACP 客户端:
windows/tauri/src-tauri增加 Agent host 适配,复用rust/lithe-agent-host的AgentHandle(open/send/close),事件形状严格使用shared/fixtures/agent/acp-events-v1.json,与 macOS 走lithe_agent_open_json/lithe_agent_send_json/lithe_agent_close的链路等价。命令面只保留 open/send/close 这类长生命周期入口,不给每个共享 Core 操作加 Tauri command。backend-capabilities.ts的 agent 能力,并把 Windows 的默认开关策略写进 Agent Note。features/、ui/、platform/)新写 React 面板,覆盖 macOS 已有能力:会话列表与历史、消息流、工具证据与权限确认、模型/权限/思考配置、供应商配置(本机 Codex/Claude 与自定义)、Codex 订阅登录、对话框内订阅额度、上下文用量。需要维护者先定的两件事
rightSidebar)还是编辑器 tab?现有features/ai是 tab 模型,直接沿用会把一个已被判定为遗留的设计固化下来。kill_tree的信号写死SIGKILL,rust/lithe-agent-host/src/environment.rs的 search_path 与 login shell 环境有cfg(unix)分支。明确不做
windows/tauri/src/features/ai/(见配套 issue)。Target platform / 目标平台
Windows
Additional context / 补充信息
subscription.rs)。docs/development/platform-parity-matrix.md中 Windows 的 Agent 条目当前为"共享 host 已具备,UI 待接入"。windows/tauri/src-tauri/src/bin/下的假适配器(参照现有fake_dap_adapter.rs的做法)做确定性测试,不依赖用户机器上的真实 Agent。