fix(indexing): support OpenRouter Gemini embeddings

This commit is contained in:
marius-kilocode
2026-05-21 13:06:36 +02:00
parent d31b25eeab
commit 205e22ee46
10 changed files with 123 additions and 31 deletions
+3
View File
@@ -330,6 +330,9 @@ async function launch() {
// Strip Electron/VS Code env vars so the spawned instance doesn't attach
// to the current Electron process (e.g. when launched from a VS Code task).
const env = cleanEnv(process.env)
if (mode === "dev") {
env.KILO_INDEXING_LOG = "1"
}
for (const key of Object.keys(env)) {
if (key.startsWith("ELECTRON_") || key.startsWith("VSCODE_")) delete env[key]
}
+9 -2
View File
@@ -22,6 +22,7 @@ const kiloVscodeDir = join(import.meta.dir, "..")
const packagesDir = join(kiloVscodeDir, "..")
const opencodeDir = join(packagesDir, "opencode")
const coreDir = join(packagesDir, "core")
const indexingDir = join(packagesDir, "kilo-indexing")
const targetBinDir = join(kiloVscodeDir, "bin")
const binName = process.platform === "win32" ? "kilo.exe" : "kilo"
@@ -36,7 +37,8 @@ async function cliSourceHash(): Promise<string | null> {
try {
const opencodeResult = await $`git log -1 --format=%H -- .`.cwd(opencodeDir).quiet()
const coreResult = await $`git log -1 --format=%H -- .`.cwd(coreDir).quiet()
return `${opencodeResult.text().trim()}-${coreResult.text().trim()}` || null
const indexingResult = await $`git log -1 --format=%H -- .`.cwd(indexingDir).quiet()
return `${opencodeResult.text().trim()}-${coreResult.text().trim()}-${indexingResult.text().trim()}` || null
} catch {
return null
}
@@ -46,7 +48,12 @@ async function isDirty(): Promise<boolean> {
try {
const opencodeResult = await $`git status --porcelain -- .`.cwd(opencodeDir).quiet()
const coreResult = await $`git status --porcelain -- .`.cwd(coreDir).quiet()
return opencodeResult.text().trim().length > 0 || coreResult.text().trim().length > 0
const indexingResult = await $`git status --porcelain -- .`.cwd(indexingDir).quiet()
return (
opencodeResult.text().trim().length > 0 ||
coreResult.text().trim().length > 0 ||
indexingResult.text().trim().length > 0
)
} catch {
return false
}