File tree Expand file tree Collapse file tree 3 files changed +17
-6
lines changed
Expand file tree Collapse file tree 3 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -472,7 +472,7 @@ async fn test_tool_authorization(cx: &mut TestAppContext) {
472472 tool_name: ToolRequiringPermission :: name( ) . into( ) ,
473473 is_error: true ,
474474 content: "Permission to run tool denied by user" . into( ) ,
475- output: None
475+ output: Some ( "Permission to run tool denied by user" . into ( ) )
476476 } )
477477 ]
478478 ) ;
Original file line number Diff line number Diff line change @@ -732,7 +732,17 @@ impl Thread {
732732 stream. update_tool_call_fields (
733733 & tool_use. id ,
734734 acp:: ToolCallUpdateFields {
735- status : Some ( acp:: ToolCallStatus :: Completed ) ,
735+ status : Some (
736+ tool_result
737+ . as_ref ( )
738+ . map_or ( acp:: ToolCallStatus :: Failed , |result| {
739+ if result. is_error {
740+ acp:: ToolCallStatus :: Failed
741+ } else {
742+ acp:: ToolCallStatus :: Completed
743+ }
744+ } ) ,
745+ ) ,
736746 raw_output : output,
737747 ..Default :: default ( )
738748 } ,
@@ -1557,7 +1567,7 @@ impl Thread {
15571567 tool_name : tool_use. name ,
15581568 is_error : true ,
15591569 content : LanguageModelToolResultContent :: Text ( Arc :: from ( error. to_string ( ) ) ) ,
1560- output : None ,
1570+ output : Some ( error . to_string ( ) . into ( ) ) ,
15611571 } ,
15621572 }
15631573 } ) )
Original file line number Diff line number Diff line change @@ -1684,7 +1684,7 @@ impl AcpThreadView {
16841684 div ( )
16851685 . relative ( )
16861686 . mt_1p5 ( )
1687- . ml ( px ( 7. ) )
1687+ . ml ( rems ( 0.4 ) )
16881688 . pl_4 ( )
16891689 . border_l_1 ( )
16901690 . border_color ( self . tool_card_border_color ( cx) )
@@ -1850,6 +1850,7 @@ impl AcpThreadView {
18501850 . w_full ( )
18511851 . h ( window. line_height ( ) - px ( 2. ) )
18521852 . text_size ( self . tool_name_font_size ( ) )
1853+ . gap_0p5 ( )
18531854 . child ( tool_icon)
18541855 . child ( if tool_call. locations . len ( ) == 1 {
18551856 let name = tool_call. locations [ 0 ]
@@ -1968,7 +1969,7 @@ impl AcpThreadView {
19681969
19691970 v_flex ( )
19701971 . mt_1p5 ( )
1971- . ml ( px ( 7. ) )
1972+ . ml ( rems ( 0.4 ) )
19721973 . px_3p5 ( )
19731974 . gap_2 ( )
19741975 . border_l_1 ( )
@@ -2025,7 +2026,7 @@ impl AcpThreadView {
20252026 let button_id = SharedString :: from ( format ! ( "item-{}" , uri) ) ;
20262027
20272028 div ( )
2028- . ml ( px ( 7. ) )
2029+ . ml ( rems ( 0.4 ) )
20292030 . pl_2p5 ( )
20302031 . border_l_1 ( )
20312032 . border_color ( self . tool_card_border_color ( cx) )
You can’t perform that action at this time.
0 commit comments