From 3ebe5a4ef7be88dada93b2258fe93cd6d35298c5 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 10 Apr 2024 18:25:52 +0200 Subject: [PATCH] prepare for not having a "real" inline chat provider (#210069) * prepare for not having a "real" inline chat provider - add location to provideWelcomeMessage - add dynamic/fake inline chat provider for editor agents - fix inline content widget when not having a message * fix tests --- .../api/browser/mainThreadChatAgents2.ts | 4 +- .../workbench/api/common/extHost.protocol.ts | 2 +- .../api/common/extHostChatAgents2.ts | 8 +- .../browser/chatParticipantContributions.ts | 8 +- .../browser/contrib/chatInputEditorContrib.ts | 2 +- .../contrib/chat/common/chatAgents.ts | 6 +- .../contrib/chat/common/chatServiceImpl.ts | 2 +- .../chat/test/common/voiceChat.test.ts | 2 +- .../browser/inlineChatContentWidget.ts | 12 +- .../browser/inlineChatSessionServiceImpl.ts | 173 ++++++++++++++++-- .../browser/media/inlineChatContentWidget.css | 2 +- ...scode.proposed.defaultChatParticipant.d.ts | 2 +- 12 files changed, 185 insertions(+), 38 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadChatAgents2.ts b/src/vs/workbench/api/browser/mainThreadChatAgents2.ts index c4c35bb3977..f607b2bca65 100644 --- a/src/vs/workbench/api/browser/mainThreadChatAgents2.ts +++ b/src/vs/workbench/api/browser/mainThreadChatAgents2.ts @@ -120,8 +120,8 @@ export class MainThreadChatAgents2 extends Disposable implements MainThreadChatA return this._proxy.$provideFollowups(request, handle, result, { history }, token); }, - provideWelcomeMessage: (token: CancellationToken) => { - return this._proxy.$provideWelcomeMessage(handle, token); + provideWelcomeMessage: (location: ChatAgentLocation, token: CancellationToken) => { + return this._proxy.$provideWelcomeMessage(handle, location, token); }, provideSampleQuestions: (location: ChatAgentLocation, token: CancellationToken) => { return this._proxy.$provideSampleQuestions(handle, location, token); diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index ef5a7e480e6..6f7a2931bcf 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -1246,7 +1246,7 @@ export interface ExtHostChatAgentsShape2 { $acceptFeedback(handle: number, result: IChatAgentResult, vote: InteractiveSessionVoteDirection, reportIssue?: boolean): void; $acceptAction(handle: number, result: IChatAgentResult, action: IChatUserActionEvent): void; $invokeCompletionProvider(handle: number, query: string, token: CancellationToken): Promise; - $provideWelcomeMessage(handle: number, token: CancellationToken): Promise<(string | IMarkdownString)[] | undefined>; + $provideWelcomeMessage(handle: number, location: ChatAgentLocation, token: CancellationToken): Promise<(string | IMarkdownString)[] | undefined>; $provideSampleQuestions(handle: number, location: ChatAgentLocation, token: CancellationToken): Promise; $releaseSession(sessionId: string): void; } diff --git a/src/vs/workbench/api/common/extHostChatAgents2.ts b/src/vs/workbench/api/common/extHostChatAgents2.ts index dfd587c53fe..ad88ee8f96f 100644 --- a/src/vs/workbench/api/common/extHostChatAgents2.ts +++ b/src/vs/workbench/api/common/extHostChatAgents2.ts @@ -375,13 +375,13 @@ export class ExtHostChatAgents2 implements ExtHostChatAgentsShape2 { return items.map(typeConvert.ChatAgentCompletionItem.from); } - async $provideWelcomeMessage(handle: number, token: CancellationToken): Promise<(string | IMarkdownString)[] | undefined> { + async $provideWelcomeMessage(handle: number, location: ChatAgentLocation, token: CancellationToken): Promise<(string | IMarkdownString)[] | undefined> { const agent = this._agents.get(handle); if (!agent) { return; } - return await agent.provideWelcomeMessage(token); + return await agent.provideWelcomeMessage(typeConvert.ChatLocation.to(location), token); } async $provideSampleQuestions(handle: number, location: ChatAgentLocation, token: CancellationToken): Promise { @@ -453,11 +453,11 @@ class ExtHostChatAgent { .filter(f => !(f && 'message' in f)); } - async provideWelcomeMessage(token: CancellationToken): Promise<(string | IMarkdownString)[] | undefined> { + async provideWelcomeMessage(location: vscode.ChatLocation, token: CancellationToken): Promise<(string | IMarkdownString)[] | undefined> { if (!this._welcomeMessageProvider) { return []; } - const content = await this._welcomeMessageProvider.provideWelcomeMessage(token); + const content = await this._welcomeMessageProvider.provideWelcomeMessage(location, token); if (!content) { return []; } diff --git a/src/vs/workbench/contrib/chat/browser/chatParticipantContributions.ts b/src/vs/workbench/contrib/chat/browser/chatParticipantContributions.ts index ceacef4c8aa..47eb784a351 100644 --- a/src/vs/workbench/contrib/chat/browser/chatParticipantContributions.ts +++ b/src/vs/workbench/contrib/chat/browser/chatParticipantContributions.ts @@ -194,8 +194,8 @@ export class ChatExtensionPointHandler implements IWorkbenchContribution { } const store = new DisposableStore(); - if (providerDescriptor.isDefault) { - store.add(this.registerDefaultParticipant(providerDescriptor)); + if (providerDescriptor.isDefault && (!providerDescriptor.locations || providerDescriptor.locations?.includes(ChatAgentLocation.Panel))) { + store.add(this.registerDefaultParticipantView(providerDescriptor)); } store.add(this._chatAgentService.registerAgent( @@ -218,7 +218,7 @@ export class ChatExtensionPointHandler implements IWorkbenchContribution { } satisfies IChatAgentData)); this._participantRegistrationDisposables.set( - getParticipantKey(extension.description.identifier, providerDescriptor.name), + getParticipantKey(extension.description.identifier, providerDescriptor.id), store ); } @@ -250,7 +250,7 @@ export class ChatExtensionPointHandler implements IWorkbenchContribution { return viewContainer; } - private registerDefaultParticipant(defaultParticipantDescriptor: IRawChatParticipantContribution): IDisposable { + private registerDefaultParticipantView(defaultParticipantDescriptor: IRawChatParticipantContribution): IDisposable { // Register View const viewDescriptor: IViewDescriptor[] = [{ id: CHAT_VIEW_ID, diff --git a/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.ts b/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.ts index 9a8c0d27e9a..936afbe9a5e 100644 --- a/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.ts +++ b/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.ts @@ -138,7 +138,7 @@ class InputEditorDecorations extends Disposable { }, renderOptions: { after: { - contentText: viewModel.inputPlaceholder ?? defaultAgent?.description ?? '', + contentText: viewModel.inputPlaceholder || (defaultAgent?.description ?? ''), color: this.getPlaceholderColor() } } diff --git a/src/vs/workbench/contrib/chat/common/chatAgents.ts b/src/vs/workbench/contrib/chat/common/chatAgents.ts index 89d3d9ba692..f23868965f7 100644 --- a/src/vs/workbench/contrib/chat/common/chatAgents.ts +++ b/src/vs/workbench/contrib/chat/common/chatAgents.ts @@ -63,7 +63,7 @@ export interface IChatAgentData { export interface IChatAgentImplementation { invoke(request: IChatAgentRequest, progress: (part: IChatProgress) => void, history: IChatAgentHistoryEntry[], token: CancellationToken): Promise; provideFollowups?(request: IChatAgentRequest, result: IChatAgentResult, history: IChatAgentHistoryEntry[], token: CancellationToken): Promise; - provideWelcomeMessage?(token: CancellationToken): ProviderResult<(string | IMarkdownString)[] | undefined>; + provideWelcomeMessage?(location: ChatAgentLocation, token: CancellationToken): ProviderResult<(string | IMarkdownString)[] | undefined>; provideSampleQuestions?(location: ChatAgentLocation, token: CancellationToken): ProviderResult; } @@ -335,9 +335,9 @@ export class MergedChatAgent implements IChatAgent { return []; } - provideWelcomeMessage(token: CancellationToken): ProviderResult<(string | IMarkdownString)[] | undefined> { + provideWelcomeMessage(location: ChatAgentLocation, token: CancellationToken): ProviderResult<(string | IMarkdownString)[] | undefined> { if (this.impl.provideWelcomeMessage) { - return this.impl.provideWelcomeMessage(token); + return this.impl.provideWelcomeMessage(location, token); } return undefined; diff --git a/src/vs/workbench/contrib/chat/common/chatServiceImpl.ts b/src/vs/workbench/contrib/chat/common/chatServiceImpl.ts index eca913e6371..660873c7db3 100644 --- a/src/vs/workbench/contrib/chat/common/chatServiceImpl.ts +++ b/src/vs/workbench/contrib/chat/common/chatServiceImpl.ts @@ -350,7 +350,7 @@ export class ChatService extends Disposable implements IChatService { // Should have been registered during activation above! throw new ErrorNoTelemetry('No default agent registered'); } - const welcomeMessage = model.welcomeMessage ? undefined : await defaultAgent.provideWelcomeMessage?.(token) ?? undefined; + const welcomeMessage = model.welcomeMessage ? undefined : await defaultAgent.provideWelcomeMessage?.(model.initialLocation, token) ?? undefined; const welcomeModel = welcomeMessage && this.instantiationService.createInstance( ChatWelcomeMessageModel, welcomeMessage.map(item => typeof item === 'string' ? new MarkdownString(item) : item), diff --git a/src/vs/workbench/contrib/chat/test/common/voiceChat.test.ts b/src/vs/workbench/contrib/chat/test/common/voiceChat.test.ts index 37298159727..e9b80df619e 100644 --- a/src/vs/workbench/contrib/chat/test/common/voiceChat.test.ts +++ b/src/vs/workbench/contrib/chat/test/common/voiceChat.test.ts @@ -34,7 +34,7 @@ suite('VoiceChat', () => { this.name = id; } invoke(request: IChatAgentRequest, progress: (part: IChatProgress) => void, history: IChatAgentHistoryEntry[], token: CancellationToken): Promise { throw new Error('Method not implemented.'); } - provideWelcomeMessage?(token: CancellationToken): ProviderResult<(string | IMarkdownString)[] | undefined> { throw new Error('Method not implemented.'); } + provideWelcomeMessage?(location: ChatAgentLocation, token: CancellationToken): ProviderResult<(string | IMarkdownString)[] | undefined> { throw new Error('Method not implemented.'); } metadata = {}; } diff --git a/src/vs/workbench/contrib/inlineChat/browser/inlineChatContentWidget.ts b/src/vs/workbench/contrib/inlineChat/browser/inlineChatContentWidget.ts index dfd3b06a278..d5ac64ea3f1 100644 --- a/src/vs/workbench/contrib/inlineChat/browser/inlineChatContentWidget.ts +++ b/src/vs/workbench/contrib/inlineChat/browser/inlineChatContentWidget.ts @@ -132,9 +132,9 @@ export class InlineChatContentWidget implements IContentWidget { beforeRender(): IDimension | null { const maxHeight = this._widget.input.inputEditor.getOption(EditorOption.lineHeight) * 5; - const inputEditorHeight = this._widget.inputEditor.getContentHeight(); + const inputEditorHeight = this._widget.contentHeight; - this._widget.inputEditor.layout(new dom.Dimension(360, Math.min(maxHeight, inputEditorHeight))); + this._widget.layout(Math.min(maxHeight, inputEditorHeight), 360); // const actualHeight = this._widget.inputPartHeight; // return new dom.Dimension(width, actualHeight); @@ -194,9 +194,11 @@ export class InlineChatContentWidget implements IContentWidget { } private _updateMessage(message: string) { - this._messageContainer.classList.toggle('hidden', !message); - const renderedMessage = renderLabelWithIcons(message); - dom.reset(this._messageContainer, ...renderedMessage); + if (message) { + const renderedMessage = renderLabelWithIcons(message); + dom.reset(this._messageContainer, ...renderedMessage); + } + this._messageContainer.style.display = message ? 'inherit' : 'none'; this._editor.layoutContentWidget(this); } } diff --git a/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.ts b/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.ts index 51a6a481517..386b17449ad 100644 --- a/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.ts +++ b/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.ts @@ -5,19 +5,18 @@ import { coalesceInPlace, isNonEmptyArray } from 'vs/base/common/arrays'; import { raceCancellation } from 'vs/base/common/async'; import { CancellationToken } from 'vs/base/common/cancellation'; -import { Codicon } from 'vs/base/common/codicons'; import { CancellationError } from 'vs/base/common/errors'; import { Emitter, Event } from 'vs/base/common/event'; import { MarkdownString } from 'vs/base/common/htmlContent'; import { Iterable } from 'vs/base/common/iterator'; -import { DisposableStore, IDisposable, MutableDisposable, toDisposable } from 'vs/base/common/lifecycle'; +import { DisposableMap, DisposableStore, IDisposable, MutableDisposable, toDisposable } from 'vs/base/common/lifecycle'; import { LRUCache } from 'vs/base/common/map'; import { Schemas } from 'vs/base/common/network'; import { URI } from 'vs/base/common/uri'; import { generateUuid } from 'vs/base/common/uuid'; import { IActiveCodeEditor, ICodeEditor } from 'vs/editor/browser/editorBrowser'; -import { Range } from 'vs/editor/common/core/range'; -import { TextEdit } from 'vs/editor/common/languages'; +import { IRange, Range } from 'vs/editor/common/core/range'; +import { TextEdit, WorkspaceEdit } from 'vs/editor/common/languages'; import { ITextModel, IValidEditOperation } from 'vs/editor/common/model'; import { createTextBufferFactoryFromSnapshot } from 'vs/editor/common/model/textModel'; import { IEditorWorkerService } from 'vs/editor/common/services/editorWorker'; @@ -25,18 +24,22 @@ import { IModelService } from 'vs/editor/common/services/model'; import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ILogService } from 'vs/platform/log/common/log'; -import { Progress } from 'vs/platform/progress/common/progress'; +import { IProgress, Progress } from 'vs/platform/progress/common/progress'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { DEFAULT_EDITOR_ASSOCIATION } from 'vs/workbench/common/editor'; -import { ChatAgentLocation, IChatAgentCommand, IChatAgentData, IChatAgentHistoryEntry, IChatAgentImplementation, IChatAgentRequest, IChatAgentResult, IChatAgentService } from 'vs/workbench/contrib/chat/common/chatAgents'; +import { ChatAgentLocation, IChatAgent, IChatAgentCommand, IChatAgentData, IChatAgentHistoryEntry, IChatAgentImplementation, IChatAgentRequest, IChatAgentResult, IChatAgentService } from 'vs/workbench/contrib/chat/common/chatAgents'; import { IChatFollowup, IChatProgress, IChatService, InteractiveSessionVoteDirection } from 'vs/workbench/contrib/chat/common/chatService'; -import { EditMode, IInlineChatBulkEditResponse, IInlineChatProgressItem, IInlineChatRequest, IInlineChatResponse, IInlineChatService, IInlineChatSession, InlineChatResponseFeedbackKind, InlineChatResponseType } from 'vs/workbench/contrib/inlineChat/common/inlineChat'; +import { EditMode, IInlineChatBulkEditResponse, IInlineChatProgressItem, IInlineChatRequest, IInlineChatResponse, IInlineChatService, IInlineChatSession, IInlineChatSessionProvider, IInlineChatSlashCommand, InlineChatResponseFeedbackKind, InlineChatResponseType } from 'vs/workbench/contrib/inlineChat/common/inlineChat'; import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; -import { nullExtensionDescription } from 'vs/workbench/services/extensions/common/extensions'; import { UntitledTextEditorInput } from 'vs/workbench/services/untitled/common/untitledTextEditorInput'; import { EmptyResponse, ErrorResponse, HunkData, ReplyResponse, Session, SessionExchange, SessionWholeRange, StashedSession, TelemetryData, TelemetryDataClassification } from './inlineChatSession'; import { IInlineChatSessionEndEvent, IInlineChatSessionEvent, IInlineChatSessionService, ISessionKeyComputer, Recording } from './inlineChatSessionService'; import { IChatVariablesService } from 'vs/workbench/contrib/chat/common/chatVariables'; +import { ISelection } from 'vs/editor/common/core/selection'; +import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions'; +import { nullExtensionDescription } from 'vs/workbench/services/extensions/common/extensions'; +import { Codicon } from 'vs/base/common/codicons'; +import { isEqual } from 'vs/base/common/resources'; class BridgeAgent implements IChatAgentImplementation { @@ -186,7 +189,7 @@ class BridgeAgent implements IChatAgentImplementation { return chatFollowups; } - provideWelcomeMessage(token: CancellationToken): string[] { + provideWelcomeMessage(location: ChatAgentLocation, token: CancellationToken): string[] { // without this provideSampleQuestions is not called return []; } @@ -227,6 +230,17 @@ export class InlineChatError extends Error { const _bridgeAgentId = 'brigde.editor'; const _inlineChatContext = '_inlineChatContext'; +class InlineChatContext { + + static readonly variableName = '_inlineChatContext'; + + constructor( + readonly uri: URI, + readonly selection: ISelection, + readonly wholeRange: IRange, + ) { } +} + export class InlineChatSessionServiceImpl implements IInlineChatSessionService { declare _serviceBrand: undefined; @@ -265,6 +279,37 @@ export class InlineChatSessionServiceImpl implements IInlineChatSessionService { @IChatVariablesService chatVariableService: IChatVariablesService, ) { + const fakeProviders = this._store.add(new DisposableMap()); + + this._store.add(this._chatAgentService.onDidChangeAgents(() => { + + const providersNow = new Set(); + + for (const agent of this._chatAgentService.getActivatedAgents()) { + if (agent.id === _bridgeAgentId) { + // not interesting + continue; + } + if (!agent.locations.includes(ChatAgentLocation.Editor) || !agent.isDefault) { + // not interesting + continue; + } + providersNow.add(agent.id); + + if (!fakeProviders.has(agent.id)) { + fakeProviders.set(agent.id, _inlineChatService.addProvider(_instaService.createInstance(AgentInlineChatProvider, agent))); + this._logService.info(`ADDED inline chat provider for agent ${agent.id}`); + } + } + + for (const [id] of fakeProviders) { + if (!providersNow.has(id)) { + fakeProviders.deleteAndDispose(id); + this._logService.info(`REMOVED inline chat provider for agent ${id}`); + } + } + })); + // MARK: register fake chat agent const addOrRemoveBridgeAgent = () => { const that = this; @@ -339,10 +384,7 @@ export class InlineChatSessionServiceImpl implements IInlineChatSessionService { if (data.session.chatModel === model) { return [{ level: 'full', - value: JSON.stringify({ - selection: data.editor.getSelection(), - wholeRange: data.session.wholeRange.trackedInitialRange - }) + value: JSON.stringify(new InlineChatContext(data.session.textModelN.uri, data.editor.getSelection()!, data.session.wholeRange.trackedInitialRange)) }]; } } @@ -360,7 +402,21 @@ export class InlineChatSessionServiceImpl implements IInlineChatSessionService { async createSession(editor: IActiveCodeEditor, options: { editMode: EditMode; wholeRange?: Range }, token: CancellationToken): Promise { - const provider = Iterable.first(this._inlineChatService.getAllProvider()); + const agent = this._chatAgentService.getDefaultAgent(ChatAgentLocation.Editor); + let provider: IInlineChatSessionProvider | undefined; + if (agent) { + for (const candidate of this._inlineChatService.getAllProvider()) { + if (candidate instanceof AgentInlineChatProvider && candidate.agent === agent) { + provider = candidate; + break; + } + } + } + + if (!provider) { + provider = Iterable.first(this._inlineChatService.getAllProvider()); + } + if (!provider) { this._logService.trace('[IE] NO provider found'); return undefined; @@ -684,3 +740,92 @@ export class InlineChatSessionServiceImpl implements IInlineChatSessionService { return this._recordings; } } + +export class AgentInlineChatProvider implements IInlineChatSessionProvider { + + readonly extensionId: ExtensionIdentifier; + readonly label: string; + readonly supportIssueReporting?: boolean | undefined; + + constructor( + readonly agent: IChatAgent, + @IChatAgentService private readonly _chatAgentService: IChatAgentService, + ) { + this.label = agent.name; + this.extensionId = agent.extensionId; + this.supportIssueReporting = agent.metadata.supportIssueReporting; + } + + async prepareInlineChatSession(model: ITextModel, range: ISelection, token: CancellationToken): Promise { + + // TODO@jrieken have a good welcome message + // const welcomeMessage = await this.agent.provideWelcomeMessage?.(ChatAgentLocation.Editor, token); + // const message = welcomeMessage?.filter(candidate => typeof candidate === 'string').join(''), + + return { + id: Math.random(), + wholeRange: new Range(range.selectionStartLineNumber, range.selectionStartColumn, range.positionLineNumber, range.positionColumn), + placeholder: this.agent.description, + slashCommands: this.agent.slashCommands.map(agentCommand => { + return { + command: agentCommand.name, + detail: agentCommand.description, + refer: agentCommand.name === 'explain' // TODO@jrieken @joyceerhl this should be cleaned up + } satisfies IInlineChatSlashCommand; + }) + }; + } + + async provideResponse(item: IInlineChatSession, request: IInlineChatRequest, progress: IProgress, token: CancellationToken): Promise { + + const workspaceEdit: WorkspaceEdit = { edits: [] }; + + await this._chatAgentService.invokeAgent(this.agent.id, { + sessionId: String(item.id), + requestId: request.requestId, + agentId: this.agent.id, + message: request.prompt, + location: ChatAgentLocation.Editor, + variables: { + variables: [{ + name: InlineChatContext.variableName, + values: [{ + level: 'full', + value: JSON.stringify(new InlineChatContext(request.previewDocument, request.selection, request.wholeRange)) + }] + }] + } + }, part => { + + if (part.kind === 'markdownContent') { + progress.report({ markdownFragment: part.content.value }); + } else if (part.kind === 'agentDetection') { + progress.report({ slashCommand: part.command?.name }); + } else if (part.kind === 'textEdit') { + + if (isEqual(request.previewDocument, part.uri)) { + progress.report({ edits: part.edits }); + } else { + for (const textEdit of part.edits) { + workspaceEdit.edits.push({ resource: part.uri, textEdit, versionId: undefined }); + } + } + } + + }, [], token); + + return { + type: InlineChatResponseType.BulkEdit, + id: Math.random(), + edits: workspaceEdit + }; + } + + // handleInlineChatResponseFeedback?(session: IInlineChatSession, response: IInlineChatResponse, kind: InlineChatResponseFeedbackKind): void { + // throw new Error('Method not implemented.'); + // } + + // provideFollowups?(session: IInlineChatSession, response: IInlineChatResponse, token: CancellationToken): ProviderResult { + // throw new Error('Method not implemented.'); + // } +} diff --git a/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatContentWidget.css b/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatContentWidget.css index 5ea5b13496c..bc9e18e6ea6 100644 --- a/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatContentWidget.css +++ b/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatContentWidget.css @@ -5,7 +5,7 @@ .monaco-workbench .inline-chat-content-widget { z-index: 50; - padding: 6px 6px 2px 6px; + padding: 6px 6px 6px 6px; border-radius: 4px; background-color: var(--vscode-inlineChat-background); box-shadow: 0 4px 8px var(--vscode-inlineChat-shadow); diff --git a/src/vscode-dts/vscode.proposed.defaultChatParticipant.d.ts b/src/vscode-dts/vscode.proposed.defaultChatParticipant.d.ts index 3819b29470f..d600adb0fee 100644 --- a/src/vscode-dts/vscode.proposed.defaultChatParticipant.d.ts +++ b/src/vscode-dts/vscode.proposed.defaultChatParticipant.d.ts @@ -8,7 +8,7 @@ declare module 'vscode' { export type ChatWelcomeMessageContent = string | MarkdownString; export interface ChatWelcomeMessageProvider { - provideWelcomeMessage(token: CancellationToken): ProviderResult; + provideWelcomeMessage(location: ChatLocation, token: CancellationToken): ProviderResult; provideSampleQuestions?(location: ChatLocation, token: CancellationToken): ProviderResult; }