From 6598e4a235f3eaad654495736dcab326c72192f4 Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Thu, 30 Apr 2026 09:46:23 +0000 Subject: [PATCH 1/2] refactor(cli): inline question-tool client gating Moves the `questionEnabled` check back inline in `tool/registry.ts` instead of delegating to `KiloToolRegistry.question()`. The extracted helper changed the shape of the upstream line, making the shared file harder to rebase during opencode merges. Inlining keeps the diff local to that one line (just adding "vscode" to the allowed clients) so future merges conflict less. --- packages/opencode/src/kilocode/tool/registry.ts | 9 +++------ packages/opencode/src/tool/registry.ts | 3 ++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/opencode/src/kilocode/tool/registry.ts b/packages/opencode/src/kilocode/tool/registry.ts index a57dc60a6b6..ffa8bb339ee 100644 --- a/packages/opencode/src/kilocode/tool/registry.ts +++ b/packages/opencode/src/kilocode/tool/registry.ts @@ -37,7 +37,9 @@ export namespace KiloToolRegistry { function semanticTool(deps: Deps) { return Effect.gen(function* () { - const ready = yield* Effect.tryPromise(() => import("@/kilocode/indexing").then((mod) => mod.KiloIndexing.ready())).pipe( + const ready = yield* Effect.tryPromise(() => + import("@/kilocode/indexing").then((mod) => mod.KiloIndexing.ready()), + ).pipe( Effect.catch((err) => Effect.sync(() => { log.warn("semantic search unavailable", { err }) @@ -66,11 +68,6 @@ export namespace KiloToolRegistry { }) } - /** Override question-tool client gating (adds "vscode" to allowed clients) */ - export function question(): boolean { - return ["app", "cli", "desktop", "vscode"].includes(Flag.KILO_CLIENT) || Flag.KILO_ENABLE_QUESTION_TOOL - } - /** Plan tool is always registered in Kilo (gated by agent permission instead) */ export function plan(): boolean { return true diff --git a/packages/opencode/src/tool/registry.ts b/packages/opencode/src/tool/registry.ts index e7980135f7f..fe251506df1 100644 --- a/packages/opencode/src/tool/registry.ts +++ b/packages/opencode/src/tool/registry.ts @@ -188,7 +188,8 @@ export const layer: Layer.Layer< } const cfg = yield* config.get() - const questionEnabled = KiloToolRegistry.question() // kilocode_change + const questionEnabled = + ["app", "cli", "desktop", "vscode"].includes(Flag.KILO_CLIENT) || Flag.KILO_ENABLE_QUESTION_TOOL // kilocode_change: add "vscode" to allowed clients // kilocode_change start const tool = yield* Effect.all({ From a715467968970ac254d503cfa922950e92bb187d Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Thu, 30 Apr 2026 09:49:10 +0000 Subject: [PATCH 2/2] chore(cli): use block kilocode_change markers --- packages/opencode/src/tool/registry.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/opencode/src/tool/registry.ts b/packages/opencode/src/tool/registry.ts index fe251506df1..59314ba7c32 100644 --- a/packages/opencode/src/tool/registry.ts +++ b/packages/opencode/src/tool/registry.ts @@ -188,8 +188,10 @@ export const layer: Layer.Layer< } const cfg = yield* config.get() + // kilocode_change start: add "vscode" to allowed clients const questionEnabled = - ["app", "cli", "desktop", "vscode"].includes(Flag.KILO_CLIENT) || Flag.KILO_ENABLE_QUESTION_TOOL // kilocode_change: add "vscode" to allowed clients + ["app", "cli", "desktop", "vscode"].includes(Flag.KILO_CLIENT) || Flag.KILO_ENABLE_QUESTION_TOOL + // kilocode_change end // kilocode_change start const tool = yield* Effect.all({