What version of Kimi Code CLI is running?
1.37.0
What issue are you seeing?
It uses wrong color in the usage command.
The color is chosen by the remaining ratio:
|
def _format_row(row: UsageRow, label_width: int) -> RenderableType: |
|
ratio = (row.limit - row.used) / row.limit if row.limit > 0 else 0 |
|
color = _ratio_color(ratio) |
|
def _ratio_color(ratio: float) -> str: |
|
if ratio >= 0.9: |
|
return "red" |
|
if ratio >= 0.7: |
|
return "yellow" |
|
return "green" |
What is the expected behavior?
+ # remaining ratio is passed in
def _ratio_color(ratio: float) -> str:
- if ratio >= 0.9:
+ if ratio <= 0.1:
return "red"
- if ratio >= 0.7:
+ if ratio <= 0.3:
return "yellow"
return "green"
What version of Kimi Code CLI is running?
1.37.0
What issue are you seeing?
It uses wrong color in the usage command.
The color is chosen by the remaining ratio:
kimi-cli/src/kimi_cli/ui/shell/usage.py
Lines 255 to 257 in 34025f6
kimi-cli/src/kimi_cli/ui/shell/usage.py
Lines 276 to 281 in 34025f6
What is the expected behavior?