style: Format cost report for better readability

This commit is contained in:
Paul Gauthier (aider) 2024-08-13 06:16:11 -07:00
parent 8cb59902a8
commit 74e85d558f

View file

@ -1408,7 +1408,8 @@ class Coder:
return f"{value:.{max(2, 2 - int(math.log10(magnitude)))}f}"
cost_report = (
f" Cost: ${format_cost(self.message_cost)} message, ${format_cost(self.total_cost)} session."
f" Cost: ${format_cost(self.message_cost)} message,"
f" ${format_cost(self.total_cost)} session."
)
self.usage_report = tokens_report + cost_report
else: