File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -18,13 +18,13 @@ local function format_token_info()
1818 local provider , model = state .current_model :match (' ^(.-)/(.+)$' )
1919 local model_info = config_file .get_model_info (provider , model )
2020 local limit = state .tokens_count and model_info and model_info .limit and model_info .limit .context or 0
21- table.insert (parts , util .format_number (state .tokens_count ))
21+ table.insert (parts , util .format_number (state .tokens_count ) or nil )
2222 if limit > 0 then
23- table.insert (parts , util .format_percentage (state .tokens_count / limit ))
23+ table.insert (parts , util .format_percentage (state .tokens_count / limit ) or nil )
2424 end
2525 end
26- if config .ui .display_cost then
27- table.insert (parts , util .format_cost (state .cost ))
26+ if config .ui .display_cost and state . cost then
27+ table.insert (parts , util .format_cost (state .cost ) or nil )
2828 end
2929 end
3030
You can’t perform that action at this time.
0 commit comments