(value: Workspace)
| 771 | } catch { return 'architecture'; } |
| 772 | }); |
| 773 | const changeWorkspace = (value: Workspace): void => { |
| 774 | value = allowedWorkspace(value); |
| 775 | if (value !== workspace) { |
| 776 | setProactiveSelection(undefined); setChatGraphSelection(undefined); setChatAttachment(undefined); |
| 777 | } |
| 778 | setWorkspace(value); |
| 779 | try { localStorage.setItem('cbm.workspace', value); } catch { /* Session-only preference. */ } |
| 780 | }; |
| 781 | // The address always names the workspace in view, also one carried over a project switch, so a reload keeps it (A5). |
| 782 | useParamInAddress('workspace', workspace); |
| 783 | const [welcomeOpen, setWelcomeOpen] = useState(() => { |
no test coverage detected