File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -164,15 +164,26 @@ fn main() -> Result<()> {
164
164
. filter_map ( |file| file. get ( "path" ) . and_then ( |p| p. as_str ( ) ) . map ( |s| s. to_string ( ) ) )
165
165
. collect ( ) ;
166
166
167
+ let model_info = get_model_info ( & args. encoding ) ;
168
+
167
169
if args. json {
168
170
let json_output = json ! ( {
169
171
"directory_name" : label( & args. path) ,
170
172
"token_count" : token_count,
171
- "model_info" : get_model_info ( & args . encoding ) ,
173
+ "model_info" : model_info ,
172
174
"files" : paths,
173
175
} ) ;
174
176
println ! ( "{}" , serde_json:: to_string_pretty( & json_output) ?) ;
175
177
return Ok ( ( ) ) ;
178
+ } else {
179
+ println ! (
180
+ "{}{}{} Token count: {}, Model info: {}" ,
181
+ "[" . bold( ) . white( ) ,
182
+ "i" . bold( ) . blue( ) ,
183
+ "]" . bold( ) . white( ) ,
184
+ token_count. to_string( ) . bold( ) . yellow( ) ,
185
+ model_info
186
+ ) ;
176
187
}
177
188
178
189
// Copy to Clipboard
You can’t perform that action at this time.
0 commit comments