MCPcopy
hub / github.com/docker/docker-agent / applySidebarCollapsed

Method applySidebarCollapsed

pkg/tui/tui.go:1642–1650  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
1642func (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.

Callers 2

initMethod · 0.95
handleSwitchTabMethod · 0.95

Calls 2

resizeAllMethod · 0.95
SetSidebarSettingsMethod · 0.65

Tested by

no test coverage detected