mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-30 13:54:01 +00:00
fix: tui not showing err toasts (#2290)
This commit is contained in:
parent
aa9ab0a304
commit
37cf262094
@ -826,7 +826,7 @@ func (a *App) SendCommand(ctx context.Context, command string, args string) (*Ap
|
||||
)
|
||||
if err != nil {
|
||||
slog.Error("Failed to execute command", "error", err)
|
||||
return toast.NewErrorToast("Failed to execute command")
|
||||
return toast.NewErrorToast("Failed to execute command")()
|
||||
}
|
||||
return nil
|
||||
})
|
||||
|
||||
@ -1173,10 +1173,10 @@ func (m *messagesComponent) UndoLastMessage() (tea.Model, tea.Cmd) {
|
||||
)
|
||||
if err != nil {
|
||||
slog.Error("Failed to undo message", "error", err)
|
||||
return toast.NewErrorToast("Failed to undo message")
|
||||
return toast.NewErrorToast("Failed to undo message")()
|
||||
}
|
||||
if response == nil {
|
||||
return toast.NewErrorToast("Failed to undo message")
|
||||
return toast.NewErrorToast("Failed to undo message")()
|
||||
}
|
||||
return app.MessageRevertedMsg{Session: *response, Message: revertedMessage}
|
||||
}
|
||||
@ -1241,10 +1241,10 @@ func (m *messagesComponent) RedoLastMessage() (tea.Model, tea.Cmd) {
|
||||
)
|
||||
if err != nil {
|
||||
slog.Error("Failed to unrevert session", "error", err)
|
||||
return toast.NewErrorToast("Failed to redo message")
|
||||
return toast.NewErrorToast("Failed to redo message")()
|
||||
}
|
||||
if response == nil {
|
||||
return toast.NewErrorToast("Failed to redo message")
|
||||
return toast.NewErrorToast("Failed to redo message")()
|
||||
}
|
||||
return app.SessionUnrevertedMsg{Session: *response}
|
||||
}
|
||||
@ -1261,10 +1261,10 @@ func (m *messagesComponent) RedoLastMessage() (tea.Model, tea.Cmd) {
|
||||
)
|
||||
if err != nil {
|
||||
slog.Error("Failed to redo message", "error", err)
|
||||
return toast.NewErrorToast("Failed to redo message")
|
||||
return toast.NewErrorToast("Failed to redo message")()
|
||||
}
|
||||
if response == nil {
|
||||
return toast.NewErrorToast("Failed to redo message")
|
||||
return toast.NewErrorToast("Failed to redo message")()
|
||||
}
|
||||
return app.MessageRevertedMsg{Session: *response, Message: revertedMessage}
|
||||
}
|
||||
|
||||
@ -134,7 +134,7 @@ func (a Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
)
|
||||
if err != nil {
|
||||
slog.Error("Failed to respond to permission request", "error", err)
|
||||
return toast.NewErrorToast("Failed to respond to permission request")
|
||||
return toast.NewErrorToast("Failed to respond to permission request")()
|
||||
}
|
||||
slog.Debug("Responded to permission request", "response", resp)
|
||||
return nil
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user