fix(ui): Clear input prompt on Escape key press (#13335)

This commit is contained in:
Sandy Tao
2025-11-19 11:11:36 +08:00
committed by GitHub
parent c5498bbb07
commit b644f037a3
4 changed files with 138 additions and 122 deletions
@@ -1050,7 +1050,7 @@ describe('useGeminiStream', () => {
simulateEscapeKeyPress();
expect(cancelSubmitSpy).toHaveBeenCalled();
expect(cancelSubmitSpy).toHaveBeenCalledWith(false);
});
it('should call setShellInputFocused(false) when escape is pressed', async () => {
@@ -1968,7 +1968,7 @@ describe('useGeminiStream', () => {
// Check that onCancelSubmit was called
await waitFor(() => {
expect(onCancelSubmitSpy).toHaveBeenCalled();
expect(onCancelSubmitSpy).toHaveBeenCalledWith(true);
});
});