diff --git a/src/vs/workbench/api/test/browser/mainThreadChatSessions.test.ts b/src/vs/workbench/api/test/browser/mainThreadChatSessions.test.ts index 4b69bf6d499..d29e9f1715a 100644 --- a/src/vs/workbench/api/test/browser/mainThreadChatSessions.test.ts +++ b/src/vs/workbench/api/test/browser/mainThreadChatSessions.test.ts @@ -909,47 +909,6 @@ suite('MainThreadChatSessions', function () { mainThread.$unregisterChatSessionContentProvider(1); }); - - test('hasAnySessionOptions returns correct values', async function () { - const sessionScheme = 'test-session-type'; - mainThread.$registerChatSessionContentProvider(1, sessionScheme); - - const resourceWithOptions = URI.parse(`${sessionScheme}:/session-with-options`); - const resourceWithoutOptions = URI.parse(`${sessionScheme}:/session-without-options`); - - // Session with options - const sessionContentWithOptions: IChatSessionDto = { - resource: resourceWithOptions, - history: [], - hasActiveResponseCallback: false, - hasRequestHandler: false, - hasForkHandler: false, - supportsInterruption: false, - options: { 'models': 'gpt-4' } - }; - - // Session without options - const sessionContentWithoutOptions: IChatSessionDto = { - resource: resourceWithoutOptions, - history: [], - hasActiveResponseCallback: false, - hasRequestHandler: false, - hasForkHandler: false, - supportsInterruption: false, - }; - - asSinonMethodStub(proxy.$provideChatSessionContent) - .onFirstCall().resolves(sessionContentWithOptions) - .onSecondCall().resolves(sessionContentWithoutOptions); - - await chatSessionsService.getOrCreateChatSession(resourceWithOptions, CancellationToken.None); - await chatSessionsService.getOrCreateChatSession(resourceWithoutOptions, CancellationToken.None); - - assert.strictEqual(chatSessionsService.hasAnySessionOptions(resourceWithOptions), true); - assert.strictEqual(chatSessionsService.hasAnySessionOptions(resourceWithoutOptions), false); - - mainThread.$unregisterChatSessionContentProvider(1); - }); }); suite('ExtHostChatSessions', function () { diff --git a/src/vs/workbench/contrib/chat/common/chatSessionsService.ts b/src/vs/workbench/contrib/chat/common/chatSessionsService.ts index 75d912c2289..55702d4e90d 100644 --- a/src/vs/workbench/contrib/chat/common/chatSessionsService.ts +++ b/src/vs/workbench/contrib/chat/common/chatSessionsService.ts @@ -361,7 +361,6 @@ export interface IChatSessionsService { canResolveChatSession(sessionType: string): Promise; getOrCreateChatSession(sessionResource: URI, token: CancellationToken): Promise; - hasAnySessionOptions(sessionResource: URI): boolean; getSessionOptions(sessionResource: URI): ReadonlyChatSessionOptionsMap | undefined; getSessionOption(sessionResource: URI, optionId: string): string | IChatSessionProviderOptionItem | undefined; setSessionOption(sessionResource: URI, optionId: string, value: string | IChatSessionProviderOptionItem): boolean; diff --git a/src/vs/workbench/contrib/chat/test/common/mockChatSessionsService.ts b/src/vs/workbench/contrib/chat/test/common/mockChatSessionsService.ts index 9dfcb8ab245..3f9b1f77c2a 100644 --- a/src/vs/workbench/contrib/chat/test/common/mockChatSessionsService.ts +++ b/src/vs/workbench/contrib/chat/test/common/mockChatSessionsService.ts @@ -202,10 +202,6 @@ export class MockChatSessionsService implements IChatSessionsService { return true; } - hasAnySessionOptions(resource: URI): boolean { - return this.sessionOptions.has(resource) && this.sessionOptions.get(resource)!.size > 0; - } - getCapabilitiesForSessionType(chatSessionType: string): IChatAgentAttachmentCapabilities | undefined { return this.contributions.find(c => c.type === chatSessionType)?.capabilities; }