@@ -167,6 +167,8 @@ func (p *chatPage) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
167167 p.clearMessages(),
168168 util.CmdHandler(chat.SessionClearedMsg{}),
169169 p.setCompactMode(false),
170+ p.layout.FocusPanel(layout.BottomPanel),
171+ util.CmdHandler(ChatFocusedMsg{Focused: false}),
170172 )
171173 case key.Matches(msg, p.keyMap.AddAttachment):
172174 cfg := config.Get()
@@ -238,7 +240,7 @@ func (p *chatPage) setMessages() tea.Cmd {
238240}
239241
240242func (p *chatPage) setSidebar() tea.Cmd {
241− sidebarContainer := sidebarCmp(p.app, false)
243+ sidebarContainer := sidebarCmp(p.app, false, p.session)
242244 sidebarContainer.Init()
243245 return p.layout.SetRightPanel(sidebarContainer)
244246}
@@ -378,13 +380,18 @@ func (p *chatPage) Bindings() []key.Binding {
378380 return bindings
379381}
380382
381−func sidebarCmp(app *app.App, compact bool) layout.Container {
383+func sidebarCmp(app *app.App, compact bool, session session.Session) layout.Container {
382384 padding := layout.WithPadding(1, 1, 1, 1)
383385 if compact {
384386 padding = layout.WithPadding(0, 1, 1, 1)
385387 }
388+ sidebar := sidebar.NewSidebarCmp(app.History, app.LSPClients, compact)
389+ if session.ID != "" {
390+ sidebar.SetSession(session)
391+ }
392+
386393 return layout.NewContainer(
387− sidebar.NewSidebarCmp(app.History, app.LSPClients, compact),
394+ sidebar,
388395 padding,
389396 )
390397}
@@ -396,12 +403,12 @@ func NewChatPage(app *app.App) ChatPage {
396403 return &chatPage{
397404 app: app,
398405 layout: layout.NewSplitPane(
399− layout.WithRightPanel(sidebarCmp(app, false)),
406+ layout.WithRightPanel(sidebarCmp(app, false, session.Session{})),
400407 layout.WithBottomPanel(editorContainer),
401408 layout.WithFixedBottomHeight(5),
402409 layout.WithFixedRightWidth(31),
403410 ),
404− compactSidebar: sidebarCmp(app, true),
411+ compactSidebar: sidebarCmp(app, true, session.Session{}),
405412 keyMap: DefaultKeyMap(),
406413 header: header.New(app.LSPClients),
407414 }