Merge branch 'feat/unit-1-workspace-tab-store-navigation'
# Conflicts: # packages/app/src/app/h/[serverId]/workspace/[workspaceId]/_layout.tsx # packages/app/src/screens/workspace/workspace-agent-visibility.test.ts # packages/app/src/screens/workspace/workspace-agent-visibility.ts # packages/app/src/screens/workspace/workspace-screen.tsx
This commit is contained in:
@@ -57,24 +57,8 @@ function setsEqual(a: Set<string>, b: Set<string>): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function canOpenAgentTabFromRoute(input: {
|
||||
agentId: string;
|
||||
agentsHydrated: boolean;
|
||||
knownAgentIds: Set<string>;
|
||||
}): boolean {
|
||||
if (!input.agentId.trim()) {
|
||||
return false;
|
||||
}
|
||||
if (!input.agentsHydrated) {
|
||||
return true;
|
||||
}
|
||||
return input.knownAgentIds.has(input.agentId);
|
||||
}
|
||||
|
||||
// Prune agent tabs that are unknown (deleted) or archived.
|
||||
// Archived agents get pruned so that archiving on one client closes the tab on all clients.
|
||||
// Users can still explicitly open archived agents via navigation (openIntent),
|
||||
// which re-creates the tab in a separate effect.
|
||||
export function shouldPruneWorkspaceAgentTab(input: {
|
||||
agentId: string;
|
||||
agentsHydrated: boolean;
|
||||
|
||||
Reference in New Issue
Block a user