feat(ecc2): add token/cost meter widget (#775)

- TokenMeter widget using ratatui Gauge with color gradient (green->yellow->red)
- Budget fields (cost_budget_usd, token_budget) in Config
- Aggregate cost display in status bar
- Warning state at 80%+ budget consumption
- Tests for gradient, config fallback, and meter rendering
This commit is contained in:
Affaan Mustafa
2026-03-23 03:46:25 -07:00
parent e7d827548c
commit d7bcc92007
6 changed files with 577 additions and 42 deletions

View File

@@ -236,7 +236,6 @@ impl StateStore {
.into_iter()
.find(|s| s.id == id || s.id.starts_with(id)))
}
pub fn send_message(&self, from: &str, to: &str, content: &str, msg_type: &str) -> Result<()> {
self.conn.execute(
"INSERT INTO messages (from_session, to_session, content, msg_type, timestamp)