File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,23 +111,12 @@ func (r *ReadTool) Execute(input json.RawMessage, eventsCh chan<- internal.Event
111111 fmt .Fprintf (& content , "%5d\t %s\n " , i + 1 , lines [i ])
112112 }
113113
114- previewCount := min (int64 (5 ), lineCount )
115- previewLines := make ([]string , previewCount )
116- for i := start ; i < start + previewCount ; i ++ {
117- previewLines [i - start ] = fmt .Sprintf ("%5d\t %s" , i + 1 , lines [i ])
118- }
119- if lineCount > previewCount {
120- previewLines = append (previewLines , "..." )
121- }
122-
123114 info := fmt .Sprintf ("Read %d lines" , lineCount )
124115
125116 eventsCh <- internal.Event {
126- Name : r .Name (),
127- Args : []string {cleanPath },
128- Message : info ,
129- Preview : previewLines ,
130- PreviewType : internal .PreviewCode ,
117+ Name : r .Name (),
118+ Args : []string {cleanPath },
119+ Message : info ,
131120 }
132121
133122 return ToolResult {
You can’t perform that action at this time.
0 commit comments