Windows: Opencode ACP agents fail with "Command not found" yet available in system and user path

未关闭
#1,237 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
kotlin, operating-systems, shell

调研方向

Start with ExternalAcpAgentService.kt, especially the ensureState logic around the command-not-found error, and trace how the IDE process resolves opencode on Windows. Review AcpAgentService.kt and the external-agent configuration entry points, then reproduce with where opencode and opencode acp --help from the same IDE environment. Done means the plugin reliably launches the installed executable, including when it is available through the Windows PATH or an absolute executable path, with regression coverage for the lookup behavior.

由索引模型根据 Issue 内容生成。

描述

bug
What happened?

Hi,

I was trying to connect the opencode acp to proxyAi but i always get the following message :

OpenCode unavailable. Command 'opencode' not found. Ensure it is installed and available to the IDE process. You can also point the runtime to an absolute executable path.

I am running phpstorm on windows 11, with proxyAi 3.8.0-241.1
opencode was installed using chocolatey,
chocolatey bin folder is available in the sytem and user path
('where opencode' is working in cmd console, as well as 'opencode --version', or 'opencode acp --help')

I couldn't find the option to force the opencode.exe path in the plugin settings.

Did I miss something ?

Thanks in advance.

Relevant log output or stack trace
java.lang.IllegalStateException: Command 'opencode' not found. Ensure it is installed and available to the IDE process. You can also point the runtime to an absolute executable path.
	at ee.carlrobert.codegpt.agent.external.ExternalAcpAgentService.ensureState(AcpAgentService.kt:248)
	at ee.carlrobert.codegpt.agent.external.ExternalAcpAgentService.ensureSessionReady(AcpAgentService.kt:223)
	at ee.carlrobert.codegpt.agent.external.ExternalAcpAgentService.runPromptLoop(AcpAgentService.kt:80)
	at ee.carlrobert.codegpt.agent.AgentService$submitExternalMessage$1.invokeSuspend(AgentService.kt:249)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
	at kotlinx.coroutines.internal.SoftLimitedDispatcher$Worker.run(SoftLimitedDispatcher.kt:130)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:610)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:1188)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:775)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:762)
Steps to reproduce

Have opencode installed using chocolatey
choco install opencode
Activate ProxyAi plugin in phpstorm
Activate Opencode acp in proxyAi plugin Options
Select Opencode in the Agent dropdown menu

CodeGPT version

3.8.2-261

Operating System

Windows

主要语言
Kotlin
星标
1.9k
派生
401
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

carlrobertoh/ProxyAI 的其他 Issue

查看 carlrobertoh/ProxyAI 的全部 Issue

相似的 Issue

更多 Kotlin Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。