mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-10-28 02:42:15 +08:00
refactor(cli): remove SessionSummary promise facade
This commit is contained in:
@@ -634,7 +634,10 @@ export namespace KiloSessions {
|
||||
log.info("full sync", { sessionId })
|
||||
|
||||
const session = await Session.get(SessionID.make(sessionId))
|
||||
const diffs = await SessionSummary.diff({ sessionID: SessionID.make(sessionId) })
|
||||
const { AppRuntime } = await import("@/effect/app-runtime")
|
||||
const diffs = await AppRuntime.runPromise(
|
||||
SessionSummary.Service.use((svc) => svc.diff({ sessionID: SessionID.make(sessionId) })),
|
||||
)
|
||||
const messages = await Array.fromAsync(MessageV2.stream(SessionID.make(sessionId)))
|
||||
messages.reverse()
|
||||
const models = await Promise.all(
|
||||
|
||||
@@ -7,7 +7,6 @@ import { withStatics } from "@/util/schema"
|
||||
import * as Session from "./session"
|
||||
import { MessageV2 } from "./message-v2"
|
||||
import { SessionID, MessageID } from "./schema"
|
||||
import { makeRuntime } from "@/effect/run-service" // kilocode_change
|
||||
|
||||
function unquoteGitPath(input: string) {
|
||||
if (!input.startsWith('"')) return input
|
||||
@@ -171,9 +170,4 @@ export const DiffInput = Schema.Struct({
|
||||
}).pipe(withStatics((s) => ({ zod: zod(s) })))
|
||||
export type DiffInput = Schema.Schema.Type<typeof DiffInput>
|
||||
|
||||
// kilocode_change start - legacy promise helpers for Kilo callsites
|
||||
const { runPromise } = makeRuntime(Service, defaultLayer)
|
||||
export const diff = (input: { sessionID: SessionID; messageID?: MessageID }) => runPromise((svc) => svc.diff(input))
|
||||
// kilocode_change end
|
||||
|
||||
export * as SessionSummary from "./summary"
|
||||
|
||||
Reference in New Issue
Block a user