@@ -238,7 +238,7 @@ impl ToolOperation {
238238 * metrics = metrics. clone ( ) . insert (
239239 input. file_path . clone ( ) ,
240240 FileOperation :: new ( tool_kind)
241- . content_hash ( Some ( output. content_hash . clone ( ) ) ) ,
241+ . content_hash ( Some ( output. info . content_hash . clone ( ) ) ) ,
242242 ) ;
243243
244244 return forge_domain:: ToolOutput :: image ( image. clone ( ) ) ;
@@ -248,7 +248,7 @@ impl ToolOperation {
248248 let content = output. content . file_content ( ) ;
249249 let content = if input. show_line_numbers {
250250 content
251- . to_numbered_from ( output. start_line as usize )
251+ . to_numbered_from ( output. info . start_line as usize )
252252 . to_string ( )
253253 } else {
254254 content. to_string ( )
@@ -257,7 +257,7 @@ impl ToolOperation {
257257 . attr ( "path" , & input. file_path )
258258 . attr (
259259 "display_lines" ,
260- format ! ( "{}-{}" , output. start_line, output. end_line) ,
260+ format ! ( "{}-{}" , output. info . start_line, output. info . end_line) ,
261261 )
262262 . attr ( "total_lines" , content. lines ( ) . count ( ) )
263263 . cdata ( content) ;
@@ -270,7 +270,8 @@ impl ToolOperation {
270270 ) ;
271271 * metrics = metrics. clone ( ) . insert (
272272 input. file_path . clone ( ) ,
273- FileOperation :: new ( tool_kind) . content_hash ( Some ( output. content_hash . clone ( ) ) ) ,
273+ FileOperation :: new ( tool_kind)
274+ . content_hash ( Some ( output. info . content_hash . clone ( ) ) ) ,
274275 ) ;
275276
276277 forge_domain:: ToolOutput :: text ( elm)
@@ -708,7 +709,7 @@ mod tests {
708709 use std:: fmt:: Write ;
709710 use std:: path:: PathBuf ;
710711
711- use forge_domain:: { FSRead , ToolValue } ;
712+ use forge_domain:: { FSRead , FileInfo , ToolValue } ;
712713
713714 use super :: * ;
714715 use crate :: { Content , Match , MatchResult } ;
@@ -828,10 +829,7 @@ mod tests {
828829 } ,
829830 output : ReadOutput {
830831 content : Content :: file ( content) ,
831- start_line : 1 ,
832- end_line : 2 ,
833- total_lines : 2 ,
834- content_hash : hash,
832+ info : FileInfo :: new ( 1 , 2 , 2 , hash) ,
835833 } ,
836834 } ;
837835
@@ -860,10 +858,7 @@ mod tests {
860858 } ,
861859 output : ReadOutput {
862860 content : Content :: file ( content) ,
863- start_line : 1 ,
864- end_line : 1 ,
865- total_lines : 1 ,
866- content_hash : hash,
861+ info : FileInfo :: new ( 1 , 1 , 1 , hash) ,
867862 } ,
868863 } ;
869864
@@ -891,10 +886,7 @@ mod tests {
891886 } ,
892887 output : ReadOutput {
893888 content : Content :: file ( content) ,
894- start_line : 2 ,
895- end_line : 3 ,
896- total_lines : 5 ,
897- content_hash : hash,
889+ info : FileInfo :: new ( 2 , 3 , 5 , hash) ,
898890 } ,
899891 } ;
900892
@@ -923,10 +915,7 @@ mod tests {
923915 } ,
924916 output : ReadOutput {
925917 content : Content :: file ( content) ,
926- start_line : 1 ,
927- end_line : 100 ,
928- total_lines : 200 ,
929- content_hash : hash,
918+ info : FileInfo :: new ( 1 , 100 , 200 , hash) ,
930919 } ,
931920 } ;
932921
@@ -2499,10 +2488,7 @@ mod tests {
24992488 "base64_image_data" . to_string ( ) ,
25002489 "image/png" ,
25012490 ) ) ,
2502- start_line : 1 ,
2503- end_line : 1 ,
2504- total_lines : 1 ,
2505- content_hash : "hash123" . to_string ( ) ,
2491+ info : FileInfo :: new ( 1 , 1 , 1 , "hash123" . to_string ( ) ) ,
25062492 } ,
25072493 } ;
25082494
0 commit comments