fix(core): Sanitize tool parameters to fix 400 API errors (#3300)

This commit is contained in:
BigUncle
2025-07-06 05:58:51 +08:00
committed by GitHub
parent 5c9372372c
commit b564d4a088
8 changed files with 438 additions and 176 deletions

View File

@@ -41,14 +41,12 @@ describe('useLoadingIndicator', () => {
expect(WITTY_LOADING_PHRASES).toContain(
result.current.currentLoadingPhrase,
);
const initialPhrase = result.current.currentLoadingPhrase;
await act(async () => {
await vi.advanceTimersByTimeAsync(PHRASE_CHANGE_INTERVAL_MS + 1);
});
// Phrase should cycle if PHRASE_CHANGE_INTERVAL_MS has passed
expect(result.current.currentLoadingPhrase).not.toBe(initialPhrase);
expect(WITTY_LOADING_PHRASES).toContain(
result.current.currentLoadingPhrase,
);