Footer: reset countdown as 'in 2h13m' (↻ renders small in many fonts)
This commit is contained in:
1 parent
9b935d2fab
commit
caa60c65e8
3 files changed
+5
-5
No files matched your search
@@ -26,7 +26,7 @@ offered; the default provider is the configured one, else the first logged in. T
|
|||||||
auto-compaction follow the active model's window (e.g. 1M for Claude 5.x).
|
auto-compaction follow the active model's window (e.g. 1M for Claude 5.x).
|
||||||
|
|
||||||
Usage: once a response arrives, the footer shows subscription limits from the provider's headers:
|
Usage: once a response arrives, the footer shows subscription limits from the provider's headers:
|
||||||
time windows with used % and time to reset (`5h 42% ↻2h13m · week 13%`) and, for credit billing, the
|
time windows with used % and time to reset (`5h 42% in 2h13m · week 13%`) and, for credit billing, the
|
||||||
credit balance or extra-usage state. `/usage` shows the details.
|
credit balance or extra-usage state. `/usage` shows the details.
|
||||||
|
|
||||||
Sessions: `/new` (or `/clear`) starts a new session file; the old one stays resumable. `/sessions` opens a
|
Sessions: `/new` (or `/clear`) starts a new session file; the old one stays resumable. `/sessions` opens a
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ fn until(at: u64, now: u64) -> String {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// ` · 5h 42% ↻2h13m · week 13%`, then credits; warn at 70%, error at 90%.
|
/// ` · 5h 42% in 2h13m · week 13%`, then credits; warn at 70%, error at 90%.
|
||||||
fn quota_spans(q: &hx_ai::Quota, now: u64) -> Vec<Span<'static>> {
|
fn quota_spans(q: &hx_ai::Quota, now: u64) -> Vec<Span<'static>> {
|
||||||
let th = theme::t();
|
let th = theme::t();
|
||||||
let mut v = vec![];
|
let mut v = vec![];
|
||||||
@@ -359,7 +359,7 @@ mod tests {
|
|||||||
.iter()
|
.iter()
|
||||||
.map(|s| s.content.to_string())
|
.map(|s| s.content.to_string())
|
||||||
.collect();
|
.collect();
|
||||||
assert_eq!(t, " · 5h 42% ↻2h13m · week 91% ↻3d4h · credits: 37.5");
|
assert_eq!(t, " · 5h 42% in 2h13m · week 91% in 3d4h · credits: 37.5");
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
quota_spans(&q, 10_000)[3].style.fg,
|
quota_spans(&q, 10_000)[3].style.fg,
|
||||||
Some(ratatui::style::Color::Red)
|
Some(ratatui::style::Color::Red)
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ const UNICODE: Sym = Sym {
|
|||||||
info: "·",
|
info: "·",
|
||||||
ellipsis: "…",
|
ellipsis: "…",
|
||||||
minus: "−",
|
minus: "−",
|
||||||
reset: "↻",
|
reset: "in ",
|
||||||
};
|
};
|
||||||
|
|
||||||
const ASCII: Sym = Sym {
|
const ASCII: Sym = Sym {
|
||||||
@@ -48,7 +48,7 @@ const ASCII: Sym = Sym {
|
|||||||
info: "-",
|
info: "-",
|
||||||
ellipsis: "...",
|
ellipsis: "...",
|
||||||
minus: "-",
|
minus: "-",
|
||||||
reset: "@",
|
reset: "in ",
|
||||||
};
|
};
|
||||||
|
|
||||||
pub struct Theme {
|
pub struct Theme {
|
||||||
|
|||||||
Reference in new issue
Block a user