Repository navigation
fix(agent): first /acp under opencode v2 shows the idle notice, not 'no status panel' - #882
Conversation
… model request
Before the conversation's first model request the proxy knows no ACP session;
handlePluginStatus answers that with HTTP 404 {ok:false}. shared.fetchStatus()
soft-fails every non-2xx into undefined, so the v2 renderer fell through both
the panel and the ok===false branches and printed 'proxy returned no status
panel' instead of the friendly idle line.
Handle the undefined result explicitly: probe the manifest, and when it
answers render 'billion-context@<v> — proxy connected, no ACP session yet…';
when nothing answers, say the proxy is unreachable. Second-and-later calls were
already correct (panel or ok:false path). Same soft-fail contract as v1's
inline fetch, without changing the endpoint's wire semantics.
d596604
into
2026-09-15_opencode-native-plugin
[bot] 🏷 Reviewed PR #882 (single commit Diff cleanliness — clean. Two files, +41 lines, every line on-topic: Correctness — verified against the actual wire contract, not just the description:
Edge case I traced (no action needed): a genuinely unreachable proxy makes Tests — the new test mirrors the real contract precisely (fake proxy 404s Verification: typecheck clean ·
Verdict: correct, minimal, well-tested, CI green — ready to merge once #850 lands. Per project rules I don't merge PRs myself; please merge it yourself (after #850): #882 一句话总结:修复了 opencode v2 在首次模型请求前执行 |
|
这个我已经合并了,但是明显有问题。 这个东西明细是被复制粘贴很多次,在不同的插件实现上复制粘贴。而不是一个整体 |
Stacked on #850 head (which already carries the #875 no-wake + #878 visible-panel fixes).
Fixes #881.
Before the conversation's first model request the proxy knows no ACP session and answers the status query with HTTP 404 {ok:false}. shared.fetchStatus() soft-fails every non-2xx into undefined - indistinguishable from 'proxy unreachable' - so the v2 renderer fell through both the panel branch and the ok===false branch into 'bili: proxy returned no status panel'. V1's inline fetch reads the body regardless of status code, which is why only V2 misbehaved; second-and-later /acp calls were always fine.
Fix (client-side, src/agent/opencode-v2.ts): handle the undefined result explicitly - probe /__bili/plugin/manifest first, and when it answers render the friendly 'billion-context@ — proxy connected, no ACP session yet. Send a model request, then run /acp again.' line; when nothing answers, report the proxy as unreachable. Endpoint wire semantics untouched (the shared 404 contract is relied on by dsh/pi consumers and e2e fakes).
Tests: fake proxy now serves a 404 {ok:false} status for an idle conversation id plus a live manifest; new test asserts the versioned idle notice on description, inert body, resume:false. Suite 18/18, typecheck clean, full npm test green.
Verified shape matches the expected user-visible string exactly.