mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-24 16:02:55 +08:00
fix(indexing): support OpenRouter Gemini embeddings
This commit is contained in:
@@ -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]
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user