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 effect-permission-facade-10713
# Conflicts: # script/check-opencode-promise-facades.ts
This commit is contained in:
@@ -356,7 +356,7 @@ export namespace KiloSessions {
|
||||
const getSessions = async () => {
|
||||
const [gitUrl, gitBranch] = await Promise.all([
|
||||
getGitUrl().catch(() => undefined),
|
||||
Vcs.branch().catch(() => undefined),
|
||||
branch().catch(() => undefined),
|
||||
])
|
||||
const { AppRuntime } = await import("@/effect/app-runtime")
|
||||
const statusMap = await AppRuntime.runPromise(SessionStatus.Service.use((svc) => svc.list()))
|
||||
@@ -725,11 +725,16 @@ export namespace KiloSessions {
|
||||
})
|
||||
}
|
||||
|
||||
async function branch() {
|
||||
const { AppRuntime } = await import("@/effect/app-runtime")
|
||||
return AppRuntime.runPromise(Vcs.Service.use((svc) => svc.branch()))
|
||||
}
|
||||
|
||||
async function meta(sessionId?: string) {
|
||||
const override = sessionId ? KiloSession.resolvePlatform(sessionId) : undefined
|
||||
const platform = override || process.env["KILO_PLATFORM"] || "cli"
|
||||
const orgId = await getOrgId()
|
||||
const gitBranch = await Vcs.branch().catch(() => undefined)
|
||||
const gitBranch = await branch().catch(() => undefined)
|
||||
const gitUrl = await getGitUrl().catch(() => undefined)
|
||||
|
||||
return {
|
||||
|
||||
@@ -7,7 +7,6 @@ import { FileWatcher } from "@/file/watcher"
|
||||
import { Git } from "@/git"
|
||||
import * as Log from "@opencode-ai/core/util/log"
|
||||
import { zod, zodObject } from "@/util/effect-zod"
|
||||
import { makeRuntime } from "@/effect/run-service" // kilocode_change
|
||||
import { NonNegativeInt, withStatics } from "@/util/schema"
|
||||
|
||||
const log = Log.create({ service: "vcs" })
|
||||
@@ -408,10 +407,4 @@ export const layer: Layer.Layer<Service, never, Git.Service | Bus.Service> = Lay
|
||||
|
||||
export const defaultLayer = layer.pipe(Layer.provide(Git.defaultLayer), Layer.provide(Bus.layer))
|
||||
|
||||
// kilocode_change start - legacy promise helpers for Kilo callsites
|
||||
const { runPromise } = makeRuntime(Service, defaultLayer)
|
||||
export const branch = () => runPromise((svc) => svc.branch())
|
||||
export const defaultBranch = () => runPromise((svc) => svc.defaultBranch())
|
||||
// kilocode_change end
|
||||
|
||||
export * as Vcs from "./vcs"
|
||||
|
||||
Reference in New Issue
Block a user