fix: type error

This commit is contained in:
Nate 2025-07-28 17:11:43 -07:00
parent ec0d7deb54
commit ffb8b4bb06

View file

@ -14,17 +14,20 @@ vi.mock("core/config/shouldAutoEnableSystemMessageTools", () => ({
}));
// Mock the selectSelectedChatModel selector
const mockSelectSelectedChatModel = vi.fn();
vi.mock("../slices/configSlice", () => ({
selectSelectedChatModel: vi.fn((state: RootState) => state.selectedModel),
selectSelectedChatModel: mockSelectSelectedChatModel,
}));
describe("selectUseSystemMessageTools", () => {
const createMockState = (
manualSetting?: boolean,
selectedModel?: ModelDescription,
): RootState =>
({
selectedModel,
): RootState => {
// Set up the mock to return the selected model for this test
mockSelectSelectedChatModel.mockReturnValue(selectedModel);
return {
config: {
config: {
experimental: {
@ -32,7 +35,8 @@ describe("selectUseSystemMessageTools", () => {
},
},
},
}) as any;
} as any;
};
const createModel = (provider: string, model: string): ModelDescription => ({
title: "Test Model",