fix(opencode-subagent): pass global through forDeletion#1645
Conversation
subagents-processor.ts calls forDeletion with global: this.global, but OpenCodeSubagent.forDeletion did not destructure it, so the flag was silently dropped and the constructed placeholder always defaulted to global: false. Mirror the fix already applied to KiloSubagent.forDeletion in PR dyoshikawa#1635 — destructure global from the params and forward it to the constructor. No behavior change for project-scope deletion; closes the second follow-up item tracked in dyoshikawa#1639.
|
Thank you for your contribution! Unfortunately, you currently have 3 open PRs (including this one), which exceeds the limit of 2 for external contributors. Please wait for an existing PR to be reviewed/merged, or close one before opening a new one. See CONTRIBUTING.md for details. |
|
Closing this proactively — the github-actions bot flagged that I'm well over the 2-PR limit for external contributors documented in CONTRIBUTING.md. I opened these nine PRs in one batch without spotting that rule first, which was my mistake — sorry for the noise. The patch in this PR is ready as-is ( Keeping #1643 ( |
Summary
Addresses follow-up item 2 from #1639.
SubagentsProcessor.loadToolFiles({ forDeletion: true })builds deletion placeholders via:KiloSubagent.forDeletionalready destructuresglobaland forwards it to the constructor (PR #1635).OpenCodeSubagent.forDeletiondid not, so the flag was silently dropped and the resulting placeholder always defaulted toglobal: false. This patch mirrors the kilo precedent — destructureglobal = falsefrom the params, forward it on the constructor call.No behavior change for project-scope deletions (which were always the default anyway). Removes the inconsistency between the two opencode-style classes called out in #1639.
Test plan
pnpm cicheck(fmt + oxlint + eslint + tsgo + 5550 vitest + cspell + secretlint) passes locally on Node 22.Refs #1639 (item 2 of 2 — the
KiloSubagent.validate()schema-override item is out of scope here).