File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -524,15 +524,15 @@ impl ChatWidget {
524524 self . maybe_send_next_queued_input ( ) ;
525525 }
526526
527- fn on_warning ( & mut self , message : String ) {
528- self . add_to_history ( history_cell:: new_warning_event ( message) ) ;
527+ fn on_warning ( & mut self , message : impl Into < String > ) {
528+ self . add_to_history ( history_cell:: new_warning_event ( message. into ( ) ) ) ;
529529 self . request_redraw ( ) ;
530530 }
531531
532532 fn on_mcp_startup_update ( & mut self , ev : McpStartupUpdateEvent ) {
533533 let mut status = self . mcp_startup_status . take ( ) . unwrap_or_default ( ) ;
534534 if let McpStartupStatus :: Failed { error } = & ev. status {
535- self . on_warning ( format ! ( "MCP `{}` failed to start: { error}" , ev . server ) ) ;
535+ self . on_warning ( error) ;
536536 }
537537 status. insert ( ev. server , ev. status ) ;
538538 self . mcp_startup_status = Some ( status) ;
Original file line number Diff line number Diff line change @@ -999,10 +999,8 @@ fn try_new_completed_mcp_tool_call_with_image_output(
999999}
10001000
10011001#[ allow( clippy:: disallowed_methods) ]
1002- pub ( crate ) fn new_warning_event ( message : String ) -> PlainHistoryCell {
1003- PlainHistoryCell {
1004- lines : vec ! [ vec![ format!( "⚠ {message}" ) . yellow( ) ] . into( ) ] ,
1005- }
1002+ pub ( crate ) fn new_warning_event ( message : String ) -> PrefixedWrappedHistoryCell {
1003+ PrefixedWrappedHistoryCell :: new ( message. yellow ( ) , "⚠ " . yellow ( ) , " " )
10061004}
10071005
10081006#[ derive( Debug ) ]
You can’t perform that action at this time.
0 commit comments