Skip to content

Commit fb597a8

Browse files
authored
Fix fialing sanity test (#2384)
1 parent 1bba438 commit fb597a8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/extension/chatSessions/vscode-node/test/copilotCLIChatSessionParticipant.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import { ChatSummarizerProvider } from '../../../prompt/node/summarizer';
3333
import { createExtensionUnitTestingServices } from '../../../test/node/services';
3434
import { MockChatResponseStream, TestChatRequest } from '../../../test/node/testHelpers';
3535
import type { IToolsService } from '../../../tools/common/toolsService';
36+
import { mockLanguageModelChat } from '../../../tools/node/test/searchToolTestUtils';
3637
import { CopilotCLIChatSessionContentProvider, CopilotCLIChatSessionItemProvider, CopilotCLIChatSessionParticipant, CopilotCLIWorktreeManager } from '../copilotCLIChatSessionsContribution';
3738
import { CopilotCloudSessionsProvider } from '../copilotCloudSessionsProvider';
3839

@@ -310,6 +311,7 @@ describe('CopilotCLIChatSessionParticipant.handleRequest', () => {
310311

311312
it('starts a new chat session and submits the request', async () => {
312313
const request = new TestChatRequest('Push this');
314+
(request as Record<string, any>).model = mockLanguageModelChat;
313315
const context = { chatSessionContext: undefined, chatSummary: undefined } as unknown as vscode.ChatContext;
314316
const stream = new MockChatResponseStream();
315317
const token = disposables.add(new CancellationTokenSource()).token;

src/extension/test/node/testHelpers.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { MarkdownString } from '../../../util/vs/base/common/htmlContent';
99
import { URI } from '../../../util/vs/base/common/uri';
1010
import { generateUuid } from '../../../util/vs/base/common/uuid';
1111
import * as vscodeTypes from '../../../vscodeTypes';
12-
import { mockLanguageModelChat } from '../../tools/node/test/searchToolTestUtils';
1312

1413
export class TestChatRequest implements ChatRequest {
1514
public command: string | undefined;
@@ -21,7 +20,7 @@ export class TestChatRequest implements ChatRequest {
2120
public isParticipantDetected: boolean;
2221
public toolReferences = [];
2322
public toolInvocationToken: never = undefined as never;
24-
public model = mockLanguageModelChat;
23+
public model = null!;
2524
public tools = new Map();
2625
public id = generateUuid();
2726
public sessionId = generateUuid();

0 commit comments

Comments
 (0)