refactor: replace x-opencode-* headers with x-kilo-* across codebase and upstream scripts

Update upstream merge scripts to use a generic x-opencode- → x-kilo- regex
that catches all current and future headers automatically. Apply the same
replacement to all source files so the codebase is ready for the next
upstream merge.
This commit is contained in:
Catriel Müller
2026-03-20 09:10:57 -03:00
parent 50e8d22f2c
commit d7b9f51962
10 changed files with 23 additions and 20 deletions
@@ -40,6 +40,9 @@ const STRING_REPLACEMENTS: StringReplacement[] = [
// Binary name references (be careful with these)
{ pattern: /\bopencode upgrade\b/g, replacement: "kilo upgrade" },
// HTTP header prefix
{ pattern: /x-opencode-/g, replacement: "x-kilo-" },
// Environment variables (exclude OPENCODE_API_KEY - upstream Zen SaaS key)
{ pattern: /\bOPENCODE_(?!API_KEY\b)([A-Z_]+)\b/g, replacement: "KILO_$1" },
{ pattern: /\bVITE_OPENCODE_/g, replacement: "VITE_KILO_" },
@@ -122,9 +122,9 @@ const BRANDING_REPLACEMENTS: BrandingReplacement[] = [
description: "Window global",
},
{
pattern: /x-opencode-client/g,
replacement: "x-kilo-client",
description: "HTTP header",
pattern: /x-opencode-/g,
replacement: "x-kilo-",
description: "HTTP header prefix",
},
{
pattern: /_EXTENSION_OPENCODE_/g,