(requested: string | null, saved: string | null, agentsEnabled = experimentalAgentsEnabled)
| 82 | |
| 83 | /** An unavailable explicit or saved workspace falls back to the source reader. */ |
| 84 | export function initialWorkspace(requested: string | null, saved: string | null, agentsEnabled = experimentalAgentsEnabled): Workspace { |
| 85 | const known = (value: string | null): value is Workspace => workspaceStrings.workspaces.some(workspace => workspace.id === value); |
| 86 | return allowedWorkspace(known(requested) ? requested : known(saved) ? saved : 'architecture', agentsEnabled); |
| 87 | } |
no test coverage detected