refactor: remove unused internal helpers and state (#5667)

* refactor: remove unused internal helpers and state

* test(tui): await deferred submissions before reconnect attach
This commit is contained in:
chengyongru authored and GitHub committed 2026-09-05 22:09:12 +08:00
1 parent f37ba60ed4
commit 63cc5f270d
11 files changed
+12 -118

No files matched your search

-25
View File
@@ -57,7 +57,6 @@ import {
updateMcpServerTools,
updateNetworkSafetySettings,
updateProviderSettings,
updateSettings,
updateSkillEnabled,
updateWebSearchSettings,
validateChannel,
@@ -402,30 +401,6 @@ describe("webui API helpers", () => {
);
});
it("serializes settings updates as a narrow mutation payload", async () => {
await updateSettings(mutationTransport, {
modelPreset: "default",
model: "openrouter/test",
provider: "openrouter",
contextWindowTokens: 262144,
timezone: "Asia/Shanghai",
toolHintMaxLength: 120,
});
expect(requestMutation).toHaveBeenCalledWith(
"settings.agent.update",
{
model_preset: "default",
model: "openrouter/test",
provider: "openrouter",
context_window_tokens: 262144,
timezone: "Asia/Shanghai",
tool_hint_max_length: 120,
},
20_000,
);
});
it("fetches token usage through the lightweight settings endpoint", async () => {
await fetchSettingsUsage("tok");