fix: resolve npx acp agents from npm prefix#151
Merged
xintaofei merged 2 commits intoxintaofei:mainfrom May 6, 2026
Merged
Conversation
Owner
|
谢佬pr,晚上我测试一下 |
0526e97 to
979a539
Compare
Contributor
Author
|
改成单次新对话 Agent 列表请求内,复用 npm global prefix 探测结果,避免重复执行 |
xintaofei
added a commit
that referenced
this pull request
May 6, 2026
- feat(login): localize the web login page across all 10 supported languages. - fix(acp): resolve `npx`-launched ACP agents from the npm prefix, and cache the resolution so agent listing no longer stalls on repeated lookups. Thanks to @Kwensiu for #151. - fix(chat): resume the original ACP session after a reconnect on new-conversation tabs, instead of starting a fresh session. - fix(chat): mark conversations as cancelled (not failed) when the user cancels a streaming turn, including the sidebar badge label. - fix(chat): surface agent turn failures with an explicit error state instead of leaving the turn silently pending review. - fix(chat): show the streaming thinking indicator while reasoning is in flight and hide the expand toggle when reasoning is empty. - fix(chat): correct the Claude Code agent icon hover title. ----------------------------- # 发布版本 0.11.7 - 功能(登录):Web 登录页已覆盖全部 10 种支持语言的本地化。 - 修复(ACP):通过 `npx` 启动的 ACP 代理改从 npm prefix 解析,并缓存解析结果,避免代理列表每次扫描时反复阻塞。感谢 @Kwensiu 在 #151 中的贡献。 - 修复(聊天):在"新建会话"标签页上重连后,恢复到原始 ACP 会话,而非新开一个会话。 - 修复(聊天):用户取消正在流式输出的回合时,会话状态标记为"已取消"而非"失败",侧边栏徽标文案同步更正。 - 修复(聊天):代理回合失败时显式呈现错误状态,不再静默停留在待审阅。 - 修复(聊天):推理过程中显示流式 thinking 指示器;推理内容为空时隐藏展开按钮。 - 修复(聊天):修正 Claude Code 代理图标的悬浮标题。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #150
描述
在生产环境中,部分 npm 安装的 ACP 智能体命令可能不在应用进程的 PATH 中。
例如 Claude/Gemini 的 shim 实际位于 npm global prefix 下,但桌面应用启动时无法通过 PATH 找到
导致即使设置页显示已安装,新建对话页仍提示对应 CLI 未安装
通过截图:
改动
npm prefix -g查看对应目录npm global prefix解析增加超时和进程内缓存,避免状态/列表接口反复同步执行 npmnpm shim是否可执行npm prefix解析、缓存失败重试和命令 shim 检测不一定是最优解,当前 PR 仅提供思路和在我环境下可生效的实现方式,没有进行多个环境的验证
其他
注意到这个提示,在当前修改后,会在每次新建对话时都会出现约 0.3s(当前搜索/回退所必须的耗时)。本身没有什么问题,但是我觉得可以后续为它添加一个 loading 状态/骨架,这样语义比较正确