Merge remote-tracking branch 'origin/main' into johnnyamancio/kilo-opencode-v1.2.25

This commit is contained in:
Johnny Amancio
2026-04-09 21:11:42 +02:00
343 changed files with 7195 additions and 15465 deletions
+18 -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"
@@ -50,9 +51,19 @@ function changedFiles() {
return out ? out.split("\n").filter(Boolean) : []
}
function isUpstreamMerge() {
const out = run("git", ["log", "--format=%P%x09%s", `${base}..HEAD`])
return out.split("\n").some((line) => {
const [parents = "", subject = ""] = line.split("\t")
if (!parents.includes(" ")) return false
const s = subject.toLowerCase()
return s.startsWith("merge: upstream ") || s.startsWith("resolve merge conflict")
})
}
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) {
@@ -120,6 +131,11 @@ function coveredLines(text: string): { lines: string[]; covered: Set<number> } {
// --- main ---
if (isUpstreamMerge()) {
console.log("Skipping opencode annotation check — upstream opencode merge detected.")
process.exit(0)
}
const files = changedFiles().filter((f) => !isExempt(f) && isSource(f))
if (files.length === 0) {
@@ -180,6 +196,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"),
+4 -1
View File
@@ -72,7 +72,10 @@ if (Script.release) {
// await import(`../packages/desktop-electron/scripts/finalize-latest-yml.ts`)
// kilocode_change end
await $`gh release edit v${Script.version} --draft=false --repo ${process.env.GH_REPO}`
// kilocode_change start - mark prerelease GitHub releases accordingly
const flags = Script.preview ? ["--draft=false", "--prerelease"] : ["--draft=false"]
await $`gh release edit v${Script.version} ${flags} --repo ${process.env.GH_REPO}`
// kilocode_change end
}
console.log("\n=== cli ===\n")
+4 -2
View File
@@ -17,12 +17,14 @@ if (!Script.preview) {
const release = await $`gh release view v${Script.version} --json tagName,databaseId`.json()
output.push(`release=${release.databaseId}`)
output.push(`tag=${release.tagName}`)
} else if (Script.channel === "beta") {
await $`gh release create v${Script.version} -d --title "v${Script.version}" --repo ${process.env.GH_REPO}`
// kilocode_change start - handle both beta and rc preview channels
} else if (Script.channel === "beta" || Script.channel === "rc") {
await $`gh release create v${Script.version} -d --prerelease --title "v${Script.version}" --repo ${process.env.GH_REPO}`
const release =
await $`gh release view v${Script.version} --json tagName,databaseId --repo ${process.env.GH_REPO}`.json()
output.push(`release=${release.databaseId}`)
output.push(`tag=${release.tagName}`)
// kilocode_change end
}
output.push(`repo=${process.env.GH_REPO}`)