@@ -127,6 +127,9 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
128 return a, nil
128 return a, nil
129 case tea.KeyboardEnhancementsMsg:
129 case tea.KeyboardEnhancementsMsg:
130+ if msg.SupportsKeyDisambiguation() {
131+ a.keyMap.Models.SetHelp("ctrl+m", "models")
130 for id, page := range a.pages {
133 for id, page := range a.pages {
131 m, pageCmd := page.Update(msg)
134 m, pageCmd := page.Update(msg)
132 a.pages[id] = m
135 a.pages[id] = m
@@ -477,6 +480,20 @@ func (a *appModel) handleKeyPressMsg(msg tea.KeyPressMsg) tea.Cmd {
477 return util.CmdHandler(dialogs.OpenDialogMsg{
480 return util.CmdHandler(dialogs.OpenDialogMsg{
478 Model: commands.NewCommandDialog(a.selectedSessionID),
481 Model: commands.NewCommandDialog(a.selectedSessionID),
483+ case key.Matches(msg, a.keyMap.Models):
484+ // if the app is not configured show no models
485+ if !a.isConfigured {
488+ if a.dialog.ActiveDialogID() == models.ModelsDialogID {
489+ return util.CmdHandler(dialogs.CloseDialogMsg{})
491+ if a.dialog.HasDialogs() {
494+ return util.CmdHandler(dialogs.OpenDialogMsg{
495+ Model: models.NewModelDialogCmp(),
480 case key.Matches(msg, a.keyMap.Sessions):
497 case key.Matches(msg, a.keyMap.Sessions):
481 // if the app is not configured show no sessions
498 // if the app is not configured show no sessions
482 if !a.isConfigured {
499 if !a.isConfigured {
@@ -489,10 +506,6 @@ func (a *appModel) handleKeyPressMsg(msg tea.KeyPressMsg) tea.Cmd {
489 return nil
506 return nil
491 var cmds []tea.Cmd
508 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{}))
496 cmds = append(cmds,
509 cmds = append(cmds,
497 func() tea.Msg {
510 func() tea.Msg {
498 allSessions, _ := a.app.Sessions.List(context.Background())
511 allSessions, _ := a.app.Sessions.List(context.Background())