feat(webui): show the full token-usage picture in settings (#6638)

This commit is contained in:
chengyongru authored and GitHub committed 2026-11-12 18:13:06 +08:00
1 parent b49218b6a3
commit e6b23c7356
42 files changed
+1116 -342

No files matched your search

+2 -1
View File
@@ -386,6 +386,7 @@ describe("Settings overview and appearance", () => {
vi.fn(async (input: RequestInfo | URL) => {
const url = String(input);
if (url === "/api/settings") return jsonResponse(payload);
if (url === "/api/settings/usage") return jsonResponse(payload.usage);
if (url === "/api/settings/cli-apps") {
return jsonResponse({ apps: [], installed_count: 0 });
}
@@ -398,7 +399,7 @@ describe("Settings overview and appearance", () => {
renderSettingsView({ initialSection: "overview" });
expect(await screen.findByLabelText("1,500 tokens")).toBeInTheDocument();
expect(await screen.findByLabelText("1,500 tokens in the last 30 days")).toBeInTheDocument();
expect(screen.getByText("Token usage")).toBeInTheDocument();
});