Skip to content

refactor(cli): inline override predicates in tool registry#9900

Open
kilo-code-bot[bot] wants to merge 4 commits intomainfrom
mark/inline-tool-registry-overrides
Open

refactor(cli): inline override predicates in tool registry#9900
kilo-code-bot[bot] wants to merge 4 commits intomainfrom
mark/inline-tool-registry-overrides

Conversation

@kilo-code-bot
Copy link
Copy Markdown
Contributor

@kilo-code-bot kilo-code-bot Bot commented May 5, 2026

Summary

  • Inline question(), plan(), and e2e() gating in packages/opencode/src/tool/registry.ts instead of calling them through KiloToolRegistry. These are overrides of upstream tool gating; extracting them was quiet on textual merges but would silently discard Kilo's intent if upstream restructured the gating. Inlining forces a textual conflict at the exact site upstream is editing.
  • Additive extractions (build/infos/extra) stay in KiloToolRegistry — they have no upstream peer to conflict with.
  • Tighten the kilocode_change start/end blocks around Effect.all and the return to per-line markers so unrelated upstream edits don't land inside Kilo-owned scope.

Inline question/plan/e2e gating expressions at call sites in the shared
tool registry instead of routing them through KiloToolRegistry. These are
overrides of upstream tool gating — hiding them behind extracted predicates
accepts upstream textual merges cleanly but silently drops Kilo's intent
when upstream restructures the gating. Inlining forces a textual conflict
when upstream touches the same logic, which is the review step we want.

Additive extractions (build/infos/extra) stay in KiloToolRegistry — those
don't have an upstream peer to conflict with.

Also tighten the kilocode_change markers around the Effect.all and return
blocks to per-line markers so unrelated upstream edits don't land inside
Kilo-owned scope.
@kilo-code-bot
Copy link
Copy Markdown
Contributor Author

kilo-code-bot Bot commented May 5, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • packages/opencode/src/tool/registry.ts

Reviewed by gpt-5.5-20260423 · 233,316 tokens

kilo-code-bot Bot added 3 commits May 5, 2026 11:44
Move the Kilo question-tool boolean adjacent to `const cfg = yield* config.get()`
matching upstream's placement (commit 9d3c81a, right after `const config = await
Config.get()`). When upstream's version eventually merges in, the two lines land
next to each other and produce a localized textual conflict — instead of silently
coexisting as dead upstream code plus our divergent gating.

Rename `const question = yield* QuestionTool` to `questiontool` (matching our
existing `lsptool`/`suggesttool` pattern) so the `question` identifier is free
for the boolean, aligning exactly with upstream's naming.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant