Fix archived workspace session routing\n\nCloses #128

This commit is contained in:
Mohamed Boudra
2026-03-20 12:17:50 +07:00
parent c9f2e01131
commit 26c07b671f
7 changed files with 152 additions and 29 deletions
@@ -72,3 +72,17 @@ export function canOpenAgentTabFromRoute(input: {
}
return input.workspaceAgentLookup.has(input.agentId);
}
export function shouldPruneWorkspaceAgentTab(input: {
agentId: string;
agentsHydrated: boolean;
workspaceAgentLookup: Map<string, Agent>;
}): boolean {
if (!input.agentId.trim()) {
return false;
}
if (!input.agentsHydrated) {
return false;
}
return !input.workspaceAgentLookup.has(input.agentId);
}