fix: address third-pass upstream merge review

This commit is contained in:
Johnny Amancio
2026-07-16 00:00:06 +02:00
parent 790affb98f
commit e6d04275d3
46 changed files with 3240 additions and 226 deletions
@@ -1,6 +1,7 @@
import { describe, expect } from "bun:test"
import { Effect } from "effect"
import path from "path"
import { mkdir } from "node:fs/promises" // kilocode_change
import { cliIt } from "../lib/cli-process"
describe("opencode mcp add (non-interactive subprocess)", () => {
@@ -71,4 +72,27 @@ describe("opencode mcp add (non-interactive subprocess)", () => {
}),
60_000,
)
// kilocode_change start
cliIt.concurrent(
"writes to KILO_CONFIG_DIR without touching the default profile",
({ home, opencode }) =>
Effect.gen(function* () {
const profile = path.join(home, "profile")
yield* Effect.promise(() => mkdir(profile, { recursive: true }))
const result = yield* opencode.spawn(
["mcp", "add", "profile", "--url", "https://example.com/profile"],
{ env: { KILO_CONFIG_DIR: profile } },
)
opencode.expectExit(result, 0)
const config = yield* Effect.promise(() => Bun.file(path.join(profile, "kilo.json")).json())
expect(config.mcp.profile).toEqual({ type: "remote", url: "https://example.com/profile" })
expect(yield* Effect.promise(() => Bun.file(path.join(home, ".config", "kilo", "kilo.json")).exists())).toBe(
false,
)
}),
60_000,
)
// kilocode_change end
})