resolve merge conflicts

This commit is contained in:
Imanol Maiztegui
2026-04-13 13:42:50 +02:00
34 changed files with 63024 additions and 35975 deletions
+15
View File
@@ -2,6 +2,7 @@ const dir = process.env.KILO_E2E_PROJECT_DIR ?? process.cwd()
const title = process.env.KILO_E2E_SESSION_TITLE ?? "E2E Session"
const text = process.env.KILO_E2E_MESSAGE ?? "Seeded for UI e2e"
const model = process.env.KILO_E2E_MODEL ?? "kilo/kilo-auto/frontier"
const requirePaid = process.env.KILO_E2E_REQUIRE_PAID === "true"
const parts = model.split("/")
const providerID = parts[0] ?? "kilo" // kilocode_change
const modelID = parts.slice(1).join("/") || "kilo-auto/frontier" // kilocode_change
@@ -11,6 +12,7 @@ const seed = async () => {
const { Instance } = await import("../src/project/instance")
const { InstanceBootstrap } = await import("../src/project/bootstrap")
const { Config } = await import("../src/config/config")
const { Provider } = await import("../src/provider/provider")
const { Session } = await import("../src/session")
const { MessageID, PartID } = await import("../src/session/schema")
const { Project } = await import("../src/project/project")
@@ -25,6 +27,19 @@ const seed = async () => {
await Config.waitForDependencies()
await ToolRegistry.ids()
if (requirePaid && providerID === "kilo" && !process.env.KILO_API_KEY) {
throw new Error("KILO_API_KEY is required when KILO_E2E_REQUIRE_PAID=true")
}
const info = await Provider.getModel(ProviderID.make(providerID), ModelID.make(modelID))
if (requirePaid) {
const paid =
info.cost.input > 0 || info.cost.output > 0 || info.cost.cache.read > 0 || info.cost.cache.write > 0
if (!paid) {
throw new Error(`KILO_E2E_MODEL must resolve to a paid model: ${providerID}/${modelID}`)
}
}
const session = await Session.create({ title })
const messageID = MessageID.ascending()
const partID = PartID.ascending()