refactor: kilo compat for v1.14.29
This commit is contained in:
@@ -15,10 +15,10 @@ import { it } from "../lib/effect"
|
||||
|
||||
void Log.init({ print: false })
|
||||
|
||||
const original = Flag.OPENCODE_EXPERIMENTAL_HTTPAPI
|
||||
const original = Flag.KILO_EXPERIMENTAL_HTTPAPI
|
||||
|
||||
function app(experimental: boolean) {
|
||||
Flag.OPENCODE_EXPERIMENTAL_HTTPAPI = experimental
|
||||
Flag.KILO_EXPERIMENTAL_HTTPAPI = experimental
|
||||
return Server.Default().app
|
||||
}
|
||||
type TestApp = ReturnType<typeof app>
|
||||
@@ -83,7 +83,7 @@ function expectJsonParity(input: {
|
||||
}
|
||||
|
||||
afterEach(async () => {
|
||||
Flag.OPENCODE_EXPERIMENTAL_HTTPAPI = original
|
||||
Flag.KILO_EXPERIMENTAL_HTTPAPI = original
|
||||
await Instance.disposeAll()
|
||||
await resetDatabase()
|
||||
})
|
||||
@@ -93,7 +93,7 @@ describe("HttpApi JSON parity", () => {
|
||||
"matches legacy JSON shape for session read endpoints",
|
||||
withTmp({ git: true, config: { formatter: false, lsp: false } }, (tmp) =>
|
||||
Effect.gen(function* () {
|
||||
const headers = { "x-opencode-directory": tmp.path }
|
||||
const headers = { "x-kilo-directory": tmp.path }
|
||||
const seeded = yield* seedSessions.pipe(Effect.provide(Session.defaultLayer))
|
||||
const legacy = app(false)
|
||||
const httpapi = app(true)
|
||||
|
||||
Reference in New Issue
Block a user