Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion packages/opencode/test/provider/provider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ async function defaultModel() {
return run((provider) => provider.defaultModel())
}

// kilocode_change start - upstream #24416 fixture adapted for @kilocode/plugin
async function markPluginDependenciesReady(dir: string) {
await mkdir(path.join(dir, "node_modules"), { recursive: true })
await Bun.write(
path.join(dir, "package-lock.json"),
JSON.stringify({ packages: { "": { dependencies: { "@kilocode/plugin": "0.0.0" } } } }),
)
}
// kilocode_change end

function paid(providers: Awaited<ReturnType<typeof list>>) {
const item = providers[ProviderID.make("opencode")]
if (!item) return 0 // kilocode_change - Kilo drops opencode provider without apiKey/auth
Expand Down Expand Up @@ -2484,8 +2494,13 @@ test("cloudflare-ai-gateway forwards config metadata options", async () => {
test("plugin config providers persist after instance dispose", async () => {
await using tmp = await tmpdir({
init: async (dir) => {
const root = path.join(dir, ".opencode", "plugin")
// kilocode_change start - upstream #24416 avoids real plugin dependency installs
const configDir = path.join(dir, ".opencode")
const root = path.join(configDir, "plugin")
await mkdir(root, { recursive: true })
await markPluginDependenciesReady(configDir)
await markPluginDependenciesReady(Global.Path.config)
// kilocode_change end
await Bun.write(
path.join(root, "demo-provider.ts"),
[
Expand Down
Loading