Show session lineage and support detaching forks

This commit is contained in:
Federico Jaramillo Martinez
2026-05-10 00:28:08 +02:00
parent d539aa2f96
commit 39ea4bfc15
11 changed files with 128 additions and 11 deletions
@@ -113,6 +113,7 @@ export class SessionCommandService {
function clientSessionFromRuntime(runtime: AgentSessionRuntime): ClientSession {
const session = runtime.session;
const parentSessionPath = typeof session.sessionManager.getHeader === "function" ? session.sessionManager.getHeader()?.parentSession : undefined;
return {
id: session.sessionId,
path: session.sessionFile ?? "",
@@ -122,6 +123,7 @@ function clientSessionFromRuntime(runtime: AgentSessionRuntime): ClientSession {
modified: new Date().toISOString(),
messageCount: session.messages.length,
firstMessage: "",
...(parentSessionPath === undefined ? {} : { parentSessionPath }),
};
}