Chore: linter complaints

This commit is contained in:
Grail Finder
2025-12-10 14:07:24 +03:00
parent be3e3d4c60
commit 8af2a59a9a
3 changed files with 9 additions and 13 deletions

6
tui.go
View File

@@ -37,7 +37,6 @@ var (
agentPage = "agentPage"
editMsgPage = "editMsgPage"
roleEditPage = "roleEditPage"
indexPage = "indexPage"
helpPage = "helpPage"
renamePage = "renamePage"
RAGPage = "RAGPage"
@@ -563,7 +562,8 @@ func init() {
SetLabel("Enter new role: ").
SetPlaceholder("e.g., user, assistant, system, tool").
SetDoneFunc(func(key tcell.Key) {
if key == tcell.KeyEnter {
switch key {
case tcell.KeyEnter:
newRole := roleEditWindow.GetText()
if newRole == "" {
if err := notifyUser("edit", "no role provided"); err != nil {
@@ -578,7 +578,7 @@ func init() {
colorText()
pages.RemovePage(roleEditPage)
}
} else if key == tcell.KeyEscape {
case tcell.KeyEscape:
pages.RemovePage(roleEditPage)
}
})