From f0b8bc6b27f830d86947f2d9e09b2425db29f1e6 Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Tue, 5 May 2026 12:24:18 +0000 Subject: [PATCH] refactor(cli): align question gating with upstream position MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move the Kilo question-tool boolean adjacent to `const cfg = yield* config.get()` matching upstream's placement (commit 9d3c81a68, 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. --- packages/opencode/src/tool/registry.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/opencode/src/tool/registry.ts b/packages/opencode/src/tool/registry.ts index 5bcc1ebe918..7fe3d39e83b 100644 --- a/packages/opencode/src/tool/registry.ts +++ b/packages/opencode/src/tool/registry.ts @@ -104,7 +104,7 @@ export const layer: Layer.Layer< const invalid = yield* InvalidTool const task = yield* TaskTool const read = yield* ReadTool - const question = yield* QuestionTool + const questiontool = yield* QuestionTool // kilocode_change: renamed to free `question` for the boolean below const todo = yield* TodoWriteTool const lsptool = yield* LspTool const plan = yield* PlanExitTool @@ -188,6 +188,10 @@ export const layer: Layer.Layer< } const cfg = yield* config.get() + // kilocode_change start + const question = + ["app", "cli", "desktop", "vscode"].includes(Flag.KILO_CLIENT) || Flag.KILO_ENABLE_QUESTION_TOOL + // kilocode_change end const tool = yield* Effect.all({ invalid: Tool.init(invalid), @@ -204,7 +208,7 @@ export const layer: Layer.Layer< code: Tool.init(codesearch), skill: Tool.init(skilltool), patch: Tool.init(patchtool), - question: Tool.init(question), + question: Tool.init(questiontool), // kilocode_change: renamed binding lsp: Tool.init(lsptool), plan: Tool.init(plan), suggest: Tool.init(suggesttool), // kilocode_change @@ -212,15 +216,11 @@ export const layer: Layer.Layer< const kilo = yield* KiloToolRegistry.build(kiloToolInfos, { agent: agents, truncate }) // kilocode_change - // kilocode_change start - const questionEnabled = - ["app", "cli", "desktop", "vscode"].includes(Flag.KILO_CLIENT) || Flag.KILO_ENABLE_QUESTION_TOOL - // kilocode_change end return { custom, builtin: [ tool.invalid, - ...(questionEnabled ? [tool.question] : []), + ...(question ? [tool.question] : []), tool.bash, tool.read, tool.glob,