@@ -139,11 +139,6 @@ func (m *UI) togglePillsExpanded() tea.Cmd {
139 if !m.hasSession() {
139 if !m.hasSession() {
140 return nil
140 return nil
142− if m.layout.pills.Dy() > 0 {
143− if cmd := m.chat.ScrollByAndAnimate(0); cmd != nil {
147 hasPills := hasIncompleteTodos(m.session.Todos) || m.promptQueue > 0
142 hasPills := hasIncompleteTodos(m.session.Todos) || m.promptQueue > 0
148 if !hasPills {
143 if !hasPills {
149 return nil
144 return nil
@@ -157,6 +152,12 @@ func (m *UI) togglePillsExpanded() tea.Cmd {
159 m.updateLayoutAndSize()
154 m.updateLayoutAndSize()
156+ // Make sure to follow scroll if follow is enabled when toggling pills.
157+ if m.chat.Follow() {
158+ m.chat.ScrollToBottom()
160 return nil
161 return nil