refactor(tui): simplify rootModelDescription and remove unused 'q' event handling in channel menu

This commit is contained in:
taorye 2026-03-09 18:29:11 +08:00
parent 76f64a31ca
commit 3a90e1945f
No known key found for this signature in database
GPG key ID: EDFFE0AD344F5FE0
2 changed files with 2 additions and 6 deletions

View file

@ -179,7 +179,7 @@ func refreshMainMenu(menu *Menu, s *appState) {
items := []MenuItem{
{
Label: rootModelLabel(selectedModel),
Description: rootModelDescription(selectedModel),
Description: rootModelDescription(),
Action: func() {
s.push("model", s.modelMenu())
},
@ -342,7 +342,7 @@ func rootModelLabel(selected string) string {
return "Model (" + selected + ")"
}
func rootModelDescription(selected string) string {
func rootModelDescription() string {
return "Using SPACE to choose your model"
}

View file

@ -100,10 +100,6 @@ func (s *appState) channelMenu() tview.Primitive {
s.pop()
return nil
}
if event.Rune() == 'q' {
s.pop()
return nil
}
return event
})
return menu