tui: Error handling tweak
Moved errors to bottom of screen, fix infinite loop by typing errors properly
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
"git.mlow.ca/mlow/lmcli/pkg/api"
|
||||
cmdutil "git.mlow.ca/mlow/lmcli/pkg/cmd/util"
|
||||
"git.mlow.ca/mlow/lmcli/pkg/lmcli"
|
||||
"git.mlow.ca/mlow/lmcli/pkg/tui/shared"
|
||||
)
|
||||
|
||||
type LoadedConversation struct {
|
||||
@@ -59,7 +58,7 @@ func (m *AppModel) NewConversation() {
|
||||
func (m *AppModel) LoadConversations() (error, []LoadedConversation) {
|
||||
messages, err := m.Ctx.Store.LatestConversationMessages()
|
||||
if err != nil {
|
||||
return shared.MsgError(fmt.Errorf("Could not load conversations: %v", err)), nil
|
||||
return fmt.Errorf("Could not load conversations: %v", err), nil
|
||||
}
|
||||
|
||||
conversations := make([]LoadedConversation, len(messages))
|
||||
|
||||
Reference in New Issue
Block a user