mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-08-30 17:14:40 +08:00
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:
@@ -971,6 +971,7 @@ export const SessionRoutes = lazy(() =>
|
||||
)
|
||||
.post(
|
||||
"/viewed",
|
||||
// kilocode_change start
|
||||
describeRoute({
|
||||
summary: "Set viewed sessions",
|
||||
description: "Notify the server which sessions the user is currently viewing, or clear all.",
|
||||
@@ -993,6 +994,7 @@ export const SessionRoutes = lazy(() =>
|
||||
const { KiloSessions } = await import("../../kilo-sessions/kilo-sessions")
|
||||
const body = c.req.valid("json")
|
||||
KiloSessions.setViewedSessions({ focused: body.focused ?? [], open: body.open ?? [] })
|
||||
// kilocode_change end
|
||||
return c.json(true)
|
||||
},
|
||||
),
|
||||
|
||||
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user