fix(cli): preserve built-in skill markdown

This commit is contained in:
marius-kilocode
2026-08-06 08:53:49 +02:00
parent b5b022fda5
commit 90ac91d501
3 changed files with 15 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@kilocode/cli": patch
---
Prevent built-in skill documentation examples from triggering shell permission prompts.
@@ -3,7 +3,7 @@
// Content is inlined at compile time via Bun's static import of .md files.
// Registered before all discovery phases so user skills with the same name override.
import KILO_CONFIG from "./kilo-config.md"
import KILO_CONFIG from "./kilo-config.md" with { type: "text" }
export interface BuiltinSkill {
name: string
+9 -2
View File
@@ -136,7 +136,7 @@ Use this skill.
)
// kilocode_change start
it.live("built-in kilo-config includes named command lookup guidance", () =>
it.live("built-in kilo-config keeps rendered shell examples inert", () =>
provideTmpdirInstance(
(dir) =>
Effect.gen(function* () {
@@ -157,9 +157,13 @@ Use this skill.
})).find((t) => t.id === SkillTool.id)
if (!tool) throw new Error("Skill tool not found")
const requests: Array<Omit<PermissionV1.Request, "id" | "sessionID" | "tool">> = []
const ctx: Tool.Context = {
...baseCtx,
ask: () => Effect.void,
ask: (req) =>
Effect.sync(() => {
requests.push(req)
}),
}
const result = yield* tool.execute({ name: "kilo-config" }, ctx)
@@ -170,6 +174,9 @@ Use this skill.
expect(result.output).toContain("~/.kilocode/")
expect(result.output).toContain("**/command/")
expect(result.output).toContain("explicit search")
expect(result.output).toContain("`` !`cmd` ``")
expect(result.output).not.toContain("[skill shell command failed]")
expect(requests.map((request) => request.permission)).toEqual(["skill"])
}),
{ git: true },
),