mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-08 17:02:17 +00:00
Claude Code reports the account's 5-hour and weekly usage limits (rate_limit_event) and the session cost (result.total_cost_usd); only the limit status was used. The limits now show as meters next to the context meter in the task header, with the reset time in the tooltip, and Settings › Tools › Agents › Chat turns each meter (context, work time, limits, cost) on or off. Limits are per provider and kept in memory; cost is off by default. Closes #1057 Co-authored-by: matthiasdemauroy <[email protected]>
16 lines
632 B
TypeScript
16 lines
632 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { validateSettings } from "../model/schema";
|
|
|
|
describe("agent chat settings", () => {
|
|
it("defaults every meter but the cost to on and keeps stored values", () => {
|
|
expect(validateSettings({}).agents).toEqual({
|
|
showContextUsage: true,
|
|
showWorkTime: true,
|
|
showUsageLimits: true,
|
|
showCost: false,
|
|
});
|
|
const stored = validateSettings({ agents: { showUsageLimits: false, showCost: true, showWorkTime: "no" } }).agents;
|
|
expect(stored).toEqual({ showContextUsage: true, showWorkTime: true, showUsageLimits: false, showCost: true });
|
|
});
|
|
});
|