fix: exempt kilo-* dirs from annotation check, add markers to session route

The kilo-sessions/ directory is entirely Kilo-specific and should not
require kilocode_change markers. Update isExempt() to also match
directories starting with 'kilo-'. Add block markers to the /viewed
route changes in session.ts.
This commit is contained in:
Evgeny Shurakov
2026-04-09 14:17:13 +02:00
parent 403bcc0ec4
commit 537db08447
2 changed files with 5 additions and 1 deletions
+3 -1
View File
@@ -22,6 +22,7 @@
* - packages/opencode/src/kilocode/**
* - packages/opencode/test/kilocode/**
* - Any path containing "kilocode" in directory or filename
* - Any path with a directory starting with "kilo-" (e.g. kilo-sessions/)
*/
import { spawnSync } from "node:child_process"
@@ -52,7 +53,7 @@ function changedFiles() {
function isExempt(file: string) {
const norm = file.replaceAll("\\", "/").toLowerCase()
return norm.split("/").some((part) => part.includes("kilocode"))
return norm.split("/").some((part) => part.includes("kilocode") || part.startsWith("kilo-"))
}
function isSource(file: string) {
@@ -180,6 +181,7 @@ console.error(
" - packages/opencode/src/kilocode/**",
" - packages/opencode/test/kilocode/**",
" - Any path containing 'kilocode' in the directory or filename",
" - Any directory starting with 'kilo-' (e.g. kilo-sessions/)",
"",
"See AGENTS.md for details.",
].join("\n"),