Skip to content

Commit

Permalink
Tweaks to welcome view and "Install chat extensions" suggestion (micr…
Browse files Browse the repository at this point in the history
…osoft#231539)

* Tweaks to welcome view and "Install chat extensions" suggestion

* Fix
  • Loading branch information
roblourens authored Oct 16, 2024
1 parent e7ff74e commit 5cd0823
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/vs/workbench/contrib/chat/browser/chatWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -548,8 +548,8 @@ export class ChatWidget extends Disposable implements IChatWidget {
const welcomeContent = this.viewModel?.model.welcomeMessage ?? this.persistedWelcomeMessage;
if (welcomeContent && this.welcomeMessageContainer.children.length === 0 && !this.viewOptions.renderStyle) {
const tips = this.viewOptions.supportsAdditionalParticipants
? new MarkdownString(localize('chatWidget.tips', "{0} to attach context\n\n{1} to chat with extensions", '$(attach)', '$(mention)'), { supportThemeIcons: true })
: new MarkdownString(localize('chatWidget.tips.withoutParticipants', "{0} to attach context", '$(attach)'), { supportThemeIcons: true });
? new MarkdownString(localize('chatWidget.tips', "{0} or type {1} to attach context\n\n{2} to chat with extensions\n\nType {3} to use commands", '$(attach)', '#', '$(mention)', '/'), { supportThemeIcons: true })
: new MarkdownString(localize('chatWidget.tips.withoutParticipants', "{0} or type {1} to attach context", '$(attach)', '#'), { supportThemeIcons: true });
const welcomePart = this._register(this.instantiationService.createInstance(
ChatViewWelcomePart,
{ ...welcomeContent, tips, },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,13 +283,18 @@ class AgentCompletions extends Disposable {
return;
}

const widget = this.chatWidgetService.getWidgetByInputUri(model.uri);
if (widget?.location !== ChatAgentLocation.Panel) {
return;
}

const label = localize('installLabel', "Install Chat Extensions...");
const item: CompletionItem = {
label,
insertText: '',
range: new Range(1, 1, 1, 1),
kind: CompletionItemKind.Text, // The icons are disabled here anyway
command: { id: 'workbench.extensions.search', title: '', arguments: ['@category:chat'] },
command: { id: 'workbench.extensions.search', title: '', arguments: ['@tag:chat-participant'] },
filterText: chatAgentLeader + label,
sortText: 'zzz'
};
Expand Down

0 comments on commit 5cd0823

Please sign in to comment.