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

@@ -569,13 +569,14 @@ describe("Settings capabilities", () => {
requestMutationMock.mockResolvedValueOnce(saved);
let refreshParent!: (snapshot: SettingsPayload) => void;
let parentSnapshot: SettingsPayload = payload;
const client = { requestMutation: requestMutationMock, status: "open",
onStatus: (handler: (status: "open") => void) => { handler("open"); return () => {}; },
} as never;
function Parent() {
const [snapshot, setSnapshot] = useState<SettingsPayload>(payload);
parentSnapshot = snapshot;
refreshParent = setSnapshot;
return <ClientProvider client={{ requestMutation: requestMutationMock, status: "open",
onStatus: (handler: (status: "open") => void) => { handler("open"); return () => {}; },
} as never} token="tok">
return <ClientProvider client={client} token="tok">
<SettingsView themePreference="light" initialSection="voice" initialSettings={snapshot}
onSettingsChange={setSnapshot} onNativeEngineRestart={restart}
onChangeTheme={() => {}} onBackToChat={() => {}} onModelNameChange={() => {}} />