Restore archived agents from History (#2316)
* fix(app): restore archived agents from History History navigation lost the explicit archived-agent intent during tab reconciliation, and workspace recovery stopped after restoring the workspace. Preserve the selected tab and recover its provider session as one action while serializing provider resume with timeline hydration. * fix(app): preserve archived agent recovery invariants * fix(server): preserve timeline hydration call shape * fix(app): retain agent tabs through lookup * fix(server): upgrade in-flight timeline broadcast
This commit is contained in:
@@ -34,6 +34,22 @@ export interface WorkspaceRecoveryController {
|
||||
retryInspection: () => void;
|
||||
}
|
||||
|
||||
export interface WorkspaceSelectionRecoveryClient {
|
||||
restoreWorkspace: (workspaceId: string) => Promise<unknown>;
|
||||
refreshAgent: (agentId: string) => Promise<unknown>;
|
||||
}
|
||||
|
||||
export async function recoverWorkspaceSelection(input: {
|
||||
client: WorkspaceSelectionRecoveryClient;
|
||||
workspaceId: string;
|
||||
agentId?: string | null;
|
||||
}): Promise<void> {
|
||||
await input.client.restoreWorkspace(input.workspaceId);
|
||||
if (input.agentId) {
|
||||
await input.client.refreshAgent(input.agentId);
|
||||
}
|
||||
}
|
||||
|
||||
function resolveRecoveryPhase(input: {
|
||||
pending: boolean;
|
||||
error: string | null;
|
||||
|
||||
Reference in New Issue
Block a user