applySidebarCollapsed applies and consumes the persisted sidebar collapsed state for the given tab ID. Returns a resize command if the state was applied, nil otherwise.
(sessionID string)
| 1640 | // applySidebarCollapsed applies and consumes the persisted sidebar collapsed state |
| 1641 | // for the given tab ID. Returns a resize command if the state was applied, nil otherwise. |
| 1642 | func (m *appModel) applySidebarCollapsed(sessionID string) tea.Cmd { |
| 1643 | collapsed, ok := m.pendingSidebarCollapsed[sessionID] |
| 1644 | if !ok { |
| 1645 | return nil |
| 1646 | } |
| 1647 | m.chatPage.SetSidebarSettings(chat.SidebarSettings{Collapsed: collapsed}) |
| 1648 | delete(m.pendingSidebarCollapsed, sessionID) |
| 1649 | return m.resizeAll() |
| 1650 | } |
| 1651 | |
| 1652 | // replayPendingEvent checks if a session has a pending attention event (e.g. tool confirmation, |
| 1653 | // max iterations, elicitation) that was received while the tab was inactive. |
no test coverage detected