@@ -210,22 +210,22 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
210210
211211 case messages.EvalSessionMsg :
212212 evalFile , _ := evaluation .Save (a .application .Session (), msg .Filename )
213- return a , core . CmdHandler ( notification.ShowMsg { Text : fmt .Sprintf ("Eval saved to file %s" , evalFile )} )
213+ return a , notification .SuccessCmd ( fmt .Sprintf ("Eval saved to file %s" , evalFile ))
214214
215215 case messages.CompactSessionMsg :
216216 return a , a .chatPage .CompactSession ()
217217
218218 case messages.CopySessionToClipboardMsg :
219219 transcript := a .application .PlainTextTranscript ()
220220 if transcript == "" {
221- return a , core . CmdHandler ( notification.ShowMsg { Text : "Conversation is empty; nothing copied." } )
221+ return a , notification .SuccessCmd ( "Conversation is empty; nothing copied." )
222222 }
223223
224224 if err := clipboard .WriteAll (transcript ); err != nil {
225- return a , core . CmdHandler ( notification.ShowMsg { Text : "Failed to copy conversation: " + err .Error (), Type : notification . TypeError } )
225+ return a , notification .ErrorCmd ( "Failed to copy conversation: " + err .Error ())
226226 }
227227
228- return a , core . CmdHandler ( notification.ShowMsg { Text : "Conversation copied to clipboard." } )
228+ return a , notification .SuccessCmd ( "Conversation copied to clipboard." )
229229
230230 case messages.ToggleYoloMsg :
231231 sess := a .application .Session ()
@@ -236,7 +236,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
236236 } else {
237237 statusText = "Yolo mode disabled: tools will require confirmation"
238238 }
239- return a , core . CmdHandler ( notification.ShowMsg { Text : statusText } )
239+ return a , notification .SuccessCmd ( statusText )
240240
241241 case messages.AgentCommandMsg :
242242 resolvedCommand := a .application .ResolveCommand (context .Background (), msg .Command )
@@ -246,7 +246,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
246246 // Convert the interface{} back to mcptools.PromptInfo
247247 promptInfo , ok := msg .PromptInfo .(mcptools.PromptInfo )
248248 if ! ok {
249- return a , core . CmdHandler ( notification.ShowMsg { Text : "Invalid prompt info" } )
249+ return a , notification .ErrorCmd ( "Invalid prompt info" )
250250 }
251251 // Show the MCP prompt input dialog
252252 return a , core .CmdHandler (dialog.OpenDialogMsg {
@@ -258,7 +258,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
258258 promptContent , err := a .application .ExecuteMCPPrompt (context .Background (), msg .PromptName , msg .Arguments )
259259 if err != nil {
260260 errorMsg := fmt .Sprintf ("Error executing MCP prompt '%s': %v" , msg .PromptName , err )
261- return a , core . CmdHandler ( notification.ShowMsg { Text : errorMsg } )
261+ return a , notification .ErrorCmd ( errorMsg )
262262 }
263263 return a , core .CmdHandler (editor.SendMsg {Content : promptContent })
264264
0 commit comments