wip: refactoring tui

This commit is contained in:
adamdottv
2025-05-30 06:47:44 -05:00
parent b1b402faa7
commit 189d0e5fb2
5 changed files with 27 additions and 21 deletions

View File

@@ -271,10 +271,6 @@ func (a appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
case page.PageChangeMsg:
return a, a.moveToPage(msg.ID)
case state.SessionSelectedMsg:
a.app.Session = msg
return a.updateAllPages(msg)
case dialog.CloseQuitMsg:
a.showQuit = false
return a, nil
@@ -286,6 +282,11 @@ func (a appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
}
return a, nil
case state.SessionSelectedMsg:
a.app.Session = msg
a.app.Messages, _ = a.app.ListMessages(context.Background(), msg.Id)
return a.updateAllPages(msg)
case dialog.CloseCommandDialogMsg:
a.showCommandDialog = false
return a, nil