@@ -127,6 +127,9 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
127127 }
128128 return a, nil
129129 case tea.KeyboardEnhancementsMsg:
130+ if msg.SupportsKeyDisambiguation() {
131+ a.keyMap.Models.SetHelp("ctrl+m", "models")
132+ }
130133 for id, page := range a.pages {
131134 m, pageCmd := page.Update(msg)
132135 a.pages[id] = m
@@ -477,6 +480,20 @@ func (a *appModel) handleKeyPressMsg(msg tea.KeyPressMsg) tea.Cmd {
477480 return util.CmdHandler(dialogs.OpenDialogMsg{
478481 Model: commands.NewCommandDialog(a.selectedSessionID),
479482 })
483+ case key.Matches(msg, a.keyMap.Models):
484+ // if the app is not configured show no models
485+ if !a.isConfigured {
486+ return nil
487+ }
488+ if a.dialog.ActiveDialogID() == models.ModelsDialogID {
489+ return util.CmdHandler(dialogs.CloseDialogMsg{})
490+ }
491+ if a.dialog.HasDialogs() {
492+ return nil
493+ }
494+ return util.CmdHandler(dialogs.OpenDialogMsg{
495+ Model: models.NewModelDialogCmp(),
496+ })
480497 case key.Matches(msg, a.keyMap.Sessions):
481498 // if the app is not configured show no sessions
482499 if !a.isConfigured {
@@ -489,10 +506,6 @@ func (a *appModel) handleKeyPressMsg(msg tea.KeyPressMsg) tea.Cmd {
489506 return nil
490507 }
491508 var cmds []tea.Cmd
492− if a.dialog.ActiveDialogID() == commands.CommandsDialogID {
493− // If the commands dialog is open, close it first
494− cmds = append(cmds, util.CmdHandler(dialogs.CloseDialogMsg{}))
495− }
496509 cmds = append(cmds,
497510 func() tea.Msg {
498511 allSessions, _ := a.app.Sessions.List(context.Background())