mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-24 16:02:55 +08:00
Merge pull request #7733 from Kilo-Org/eshurakov/actually-afterthought
Cli - Include parentSessionId in heartbeat session info
This commit is contained in:
@@ -249,6 +249,7 @@ export namespace KiloSessions {
|
||||
id,
|
||||
status: statuses[id]?.type ?? "idle",
|
||||
title: session.title,
|
||||
parentSessionId: session.parentID,
|
||||
gitUrl,
|
||||
gitBranch,
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ export namespace RemoteProtocol {
|
||||
id: z.string(),
|
||||
status: z.string(),
|
||||
title: z.string(),
|
||||
parentSessionId: z.string().optional(),
|
||||
gitUrl: z.string().optional(),
|
||||
gitBranch: z.string().optional(),
|
||||
})
|
||||
|
||||
@@ -17,6 +17,18 @@ describe("RemoteProtocol", () => {
|
||||
}
|
||||
})
|
||||
|
||||
test("heartbeat with parentSessionId parses", () => {
|
||||
const msg = {
|
||||
type: "heartbeat",
|
||||
sessions: [{ id: "ses_child", status: "busy", title: "Sub task", parentSessionId: "ses_root" }],
|
||||
}
|
||||
const result = RemoteProtocol.Heartbeat.safeParse(msg)
|
||||
expect(result.success).toBe(true)
|
||||
if (result.success) {
|
||||
expect(result.data.sessions[0].parentSessionId).toBe("ses_root")
|
||||
}
|
||||
})
|
||||
|
||||
test("valid event parses", () => {
|
||||
const msg = {
|
||||
type: "event",
|
||||
|
||||
Reference in New Issue
Block a user