fix: scope process sessions per agent

This commit is contained in:
Peter Steinberger
2026-01-07 23:35:04 +01:00
parent 48a333d9d5
commit 5b97feaaa5
8 changed files with 166 additions and 87 deletions

View File

@@ -18,6 +18,7 @@ export type ProcessStatus = "running" | "completed" | "failed" | "killed";
export interface ProcessSession {
id: string;
command: string;
scopeKey?: string;
child?: ChildProcessWithoutNullStreams;
pid?: number;
startedAt: number;
@@ -38,6 +39,7 @@ export interface ProcessSession {
export interface FinishedSession {
id: string;
command: string;
scopeKey?: string;
startedAt: number;
endedAt: number;
cwd?: string;
@@ -126,6 +128,7 @@ function moveToFinished(session: ProcessSession, status: ProcessStatus) {
finishedSessions.set(session.id, {
id: session.id,
command: session.command,
scopeKey: session.scopeKey,
startedAt: session.startedAt,
endedAt: Date.now(),
cwd: session.cwd,