| 72 | } |
| 73 | |
| 74 | function buildInitialState(): WorkspaceState { |
| 75 | // Phase 2 starts empty — no auto-default chat. The empty-editor view in |
| 76 | // TabHost guides new users to the activity bar. |
| 77 | const group: TabGroup = { |
| 78 | id: DEFAULT_GROUP_ID, |
| 79 | tabIds: [], |
| 80 | activeTabId: null, |
| 81 | } |
| 82 | return { |
| 83 | tabs: {}, |
| 84 | tree: { kind: 'leaf', group }, |
| 85 | focusedGroupId: DEFAULT_GROUP_ID, |
| 86 | selectedSidebar: null, |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | /** Phase 2 still single-leaf. Returns a new state with the focused group replaced. */ |
| 91 | function withFocusedGroup( |