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

Đang mở
#1,237 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
kotlin, operating-systems, shell

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Kotlin
Star
1.9k
Fork
401
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của carlrobertoh/ProxyAI

Tất cả issue của carlrobertoh/ProxyAI

Issue tương tự

Thêm issue về Kotlin

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.