mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-24 16:02:55 +08:00
Merge remote-tracking branch 'origin/main' into glow-bolt
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@kilocode/cli": patch
|
||||
---
|
||||
|
||||
Keep the extension usable on fresh startup when semantic indexing is enabled globally.
|
||||
@@ -52,12 +52,22 @@ While the specifics change constantly, some principles stay consistent:
|
||||
|
||||
**For everyday coding**: Mid-tier models often provide the best balance of speed, cost, and quality. They're fast enough to keep your flow state intact and capable enough for most tasks.
|
||||
|
||||
**For budget-conscious work**: Newer efficient models keep surprising us with price-to-performance ratios. DeepSeek, Qwen, and similar models can handle more than you'd expect.
|
||||
**For budget-conscious work**: Newer efficient models keep surprising us with price-to-performance ratios. DeepSeek, Qwen, and similar models can handle more than you'd expect. See the [free and budget picks](#free-and-budget-model-picks) below.
|
||||
|
||||
**For local/private work**: Ollama and LM Studio let you run models locally. The tradeoff is usually speed and capability for privacy and zero API costs.
|
||||
|
||||
**Using an unlisted model?** You can register any model — including fine-tunes, newly released models, or custom local models — by adding it to your config file. See [Custom Models](/docs/code-with-ai/agents/custom-models) for details.
|
||||
|
||||
## Free and Budget Model Picks
|
||||
|
||||
You don't need a paid API key to use Kilo Code productively. The fastest way to start for free is [Auto Model Free](/docs/code-with-ai/agents/auto-model) (`kilo-auto/free`), which routes to the best available free models automatically. See [Using Kilo for Free](/docs/getting-started/using-kilo-for-free) for the full zero-cost setup.
|
||||
|
||||
If you prefer to pick models yourself, type `free` in the model picker to filter by free models, or browse the full list at [kilo.ai/models](https://kilo.ai/models).
|
||||
|
||||
{% callout type="info" %}
|
||||
Free model availability changes as providers adjust promotional periods. Check [kilo.ai/models](https://kilo.ai/models) for the live list.
|
||||
{% /callout %}
|
||||
|
||||
## Context Windows Matter
|
||||
|
||||
One thing that doesn't change: context window size matters for your workflow.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { createRequire } from "module"
|
||||
import type { ConfigPlugin } from "@/config/plugin"
|
||||
import { isIndexingPlugin } from "@kilocode/kilo-indexing/detect"
|
||||
import { ensureIndexingPlugin, resolveIndexingPlugin } from "@/kilocode/indexing-feature"
|
||||
|
||||
type Log = {
|
||||
@@ -13,17 +14,10 @@ export namespace KilocodeDefaultPlugins {
|
||||
cfg: T,
|
||||
opts: { disabled: boolean; log?: Log },
|
||||
): T {
|
||||
const before = cfg.plugin ?? []
|
||||
const plugin = opts.disabled ? undefined : resolveIndexingPlugin(req, opts.log)
|
||||
const after = ensureIndexingPlugin(before, plugin)
|
||||
if (after.length > before.length) {
|
||||
const added = after[after.length - 1]
|
||||
cfg.plugin_origins = [
|
||||
...(cfg.plugin_origins ?? []),
|
||||
{ spec: added, source: "builtin", scope: "global" as ConfigPlugin.Scope },
|
||||
]
|
||||
}
|
||||
cfg.plugin = after
|
||||
cfg.plugin = ensureIndexingPlugin(cfg.plugin ?? [], plugin)
|
||||
// Built-in indexing is not loaded through external plugins and must not wait for their setup.
|
||||
cfg.plugin_origins = cfg.plugin_origins?.filter((item) => !isIndexingPlugin(item.spec))
|
||||
return cfg
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,9 @@ import { hasIndexingPlugin } from "@kilocode/kilo-indexing/detect"
|
||||
import { Account } from "../../../src/account/account"
|
||||
import { Auth } from "../../../src/auth"
|
||||
import { Config } from "../../../src/config/config"
|
||||
import type { ConfigPlugin } from "../../../src/config/plugin"
|
||||
import { KilocodeDefaultPlugins } from "../../../src/kilocode/config/default-plugins"
|
||||
import { INDEXING_PLUGIN } from "../../../src/kilocode/indexing-feature"
|
||||
import * as CrossSpawnSpawner from "@opencode-ai/core/cross-spawn-spawner"
|
||||
import { Env } from "../../../src/env"
|
||||
import { AppFileSystem } from "@opencode-ai/core/filesystem"
|
||||
@@ -50,6 +53,28 @@ describe("kilocode default indexing plugin", () => {
|
||||
await disposeAllInstances()
|
||||
})
|
||||
|
||||
test("injects indexing without registering an external plugin origin", () => {
|
||||
const config: { plugin?: ConfigPlugin.Spec[]; plugin_origins?: ConfigPlugin.Origin[] } = {}
|
||||
|
||||
KilocodeDefaultPlugins.apply(config, { disabled: false })
|
||||
|
||||
expect(hasIndexingPlugin(config.plugin ?? [])).toBe(true)
|
||||
expect(config.plugin_origins).toBeUndefined()
|
||||
})
|
||||
|
||||
test("removes a persisted indexing marker from external plugin origins", () => {
|
||||
const external: ConfigPlugin.Origin = { spec: "global-plugin", source: "global", scope: "global" }
|
||||
const config = {
|
||||
plugin: [INDEXING_PLUGIN, external.spec],
|
||||
plugin_origins: [{ spec: INDEXING_PLUGIN, source: "global", scope: "global" as const }, external],
|
||||
}
|
||||
|
||||
KilocodeDefaultPlugins.apply(config, { disabled: true })
|
||||
|
||||
expect(config.plugin).toEqual([INDEXING_PLUGIN, external.spec])
|
||||
expect(config.plugin_origins).toEqual([external])
|
||||
})
|
||||
|
||||
test("does not hard-enable indexing plugin when default plugins are disabled", async () => {
|
||||
const prev = process.env["KILO_DISABLE_DEFAULT_PLUGINS"]
|
||||
process.env["KILO_DISABLE_DEFAULT_PLUGINS"] = "true"
|
||||
|
||||
Reference in New Issue
Block a user