feat: remove semantic indexing experimental gate

This commit is contained in:
marius-kilocode
2026-05-28 15:59:11 +02:00
parent 600d47a6d2
commit ef2390d7a4
37 changed files with 59 additions and 206 deletions
@@ -54,9 +54,6 @@ async function writeConfig(dir: string, config: object, name = "kilo.json") {
const cfg: Partial<Config.Info> = {
plugin: ["@kilocode/kilo-indexing"],
experimental: {
semantic_indexing: true,
},
indexing: {
provider: "ollama",
vectorStore: "qdrant",
@@ -93,6 +90,22 @@ describe("markdown substitutions", () => {
})
describe("kilocode indexing config", () => {
test("ignores retired semantic indexing flags in existing configs", async () => {
await using tmp = await tmpdir({ git: true })
await writeConfig(tmp.path, {
experimental: { semantic_indexing: true, batch_tool: true },
})
await WithInstance.provide({
directory: tmp.path,
fn: async () => {
const config = await load()
expect(config.experimental?.batch_tool).toBe(true)
expect(config.experimental).not.toHaveProperty("semantic_indexing")
},
})
})
test("keeps global indexing enabled in global config", async () => {
await using globalTmp = await tmpdir()
await using tmp = await tmpdir()
@@ -9,12 +9,8 @@ import {
describe("indexing plugin helpers", () => {
test("detects plugin-enabled configs", () => {
expect(indexingEnabled({ plugin: ["global-plugin"] })).toBe(false)
expect(indexingEnabled({ plugin: [INDEXING_PLUGIN] })).toBe(false)
expect(indexingEnabled({ plugin: [INDEXING_PLUGIN], experimental: { semantic_indexing: false } })).toBe(false)
expect(indexingEnabled({ plugin: [INDEXING_PLUGIN], experimental: { semantic_indexing: true } })).toBe(true)
expect(
indexingEnabled({ plugin: ["@kilocode/kilo-indexing@1.0.0"], experimental: { semantic_indexing: true } }),
).toBe(true)
expect(indexingEnabled({ plugin: [INDEXING_PLUGIN] })).toBe(true)
expect(indexingEnabled({ plugin: ["@kilocode/kilo-indexing@1.0.0"] })).toBe(true)
})
test("adds indexing plugin when present but missing from config", () => {
@@ -16,9 +16,6 @@ const fetch = global.fetch
const cfg: Partial<Config.Info> = {
plugin: ["@kilocode/kilo-indexing"],
experimental: {
semantic_indexing: true,
},
indexing: {
enabled: true,
provider: "ollama",
@@ -29,13 +26,9 @@ const cfg: Partial<Config.Info> = {
},
}
const off: Partial<Config.Info> = {
const unset: Partial<Config.Info> = {
plugin: ["@kilocode/kilo-indexing"],
experimental: {
semantic_indexing: false,
},
indexing: {
enabled: true,
provider: "ollama",
vectorStore: "qdrant",
ollama: {
@@ -45,9 +38,6 @@ const off: Partial<Config.Info> = {
}
const inactive: Partial<Config.Info> = {
plugin: ["@kilocode/kilo-indexing"],
experimental: {
semantic_indexing: true,
},
indexing: {
enabled: false,
provider: "ollama",
@@ -56,9 +46,6 @@ const inactive: Partial<Config.Info> = {
}
const kilo: Partial<Config.Info> = {
plugin: ["@kilocode/kilo-indexing"],
experimental: {
semantic_indexing: true,
},
indexing: {
enabled: true,
vectorStore: "qdrant",
@@ -66,9 +53,6 @@ const kilo: Partial<Config.Info> = {
}
const implicitOpenAi: Partial<Config.Info> = {
plugin: ["@kilocode/kilo-indexing"],
experimental: {
semantic_indexing: true,
},
indexing: {
enabled: true,
vectorStore: "qdrant",
@@ -79,9 +63,6 @@ const implicitOpenAi: Partial<Config.Info> = {
}
const staleKilo: Partial<Config.Info> = {
plugin: ["@kilocode/kilo-indexing"],
experimental: {
semantic_indexing: true,
},
indexing: {
enabled: true,
provider: "kilo",
@@ -303,8 +284,8 @@ describe("indexing startup degradation", () => {
}
})
test("stays disabled when semantic indexing flag is off", async () => {
await using tmp = await tmpdir({ git: true, config: off })
test("stays disabled when indexing enablement is unset", async () => {
await using tmp = await tmpdir({ git: true, config: unset })
process.env["KILO_CONFIG_DIR"] = tmp.path
const init = spyOn(CodeIndexManager.prototype, "initialize")
@@ -315,11 +296,11 @@ describe("indexing startup degradation", () => {
expect(status).toMatchObject({
state: "Disabled",
message: "Semantic indexing is disabled. Enable it in the Experimental settings.",
message: "Indexing disabled.",
})
expect(await KiloIndexing.available()).toBe(false)
expect(KiloIndexing.ready()).toBe(false)
expect(await KiloIndexing.search("flag off")).toEqual([])
expect(await KiloIndexing.search("disabled")).toEqual([])
expect(init).not.toHaveBeenCalled()
},
})
@@ -7,9 +7,6 @@ import { disposeAllInstances, tmpdir } from "../fixture/fixture"
const cfg: Partial<Config.Info> = {
plugin: ["@kilocode/kilo-indexing"],
experimental: {
semantic_indexing: true,
},
indexing: {
enabled: true,
provider: "ollama",