fix: address PR feedback for slash commands and test cleanup

This commit is contained in:
jacob314
2026-05-18 11:54:08 -07:00
parent 469f5b7a68
commit 3e1be515e5
2 changed files with 6 additions and 1 deletions

View File

@@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
import { act } from 'react';
import type { AgentProtocol } from '@google/gemini-cli-core';
import { renderHookWithProviders } from '../../test-utils/render.js';
@@ -40,6 +40,10 @@ describe('useAgentStream', () => {
vi.clearAllMocks();
});
afterEach(() => {
vi.restoreAllMocks();
});
it('should initialize on mount', async () => {
await renderHookWithProviders(() =>
useAgentStream({

View File

@@ -396,6 +396,7 @@ export const useAgentStream = ({
} else {
// 'handled' or other types that don't need LLM submission
shouldAddToHistory = false;
return;
}
}
}