Skip to content

Commit

Permalink
Fix chat welcome message tooltip (microsoft#213084)
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens authored and mustard-mh committed May 22, 2024
1 parent d46a4af commit 480b13b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/vs/workbench/contrib/chat/browser/chatFollowups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export class ChatFollowups<T extends IChatFollowup | IInlineChatFollowup> extend
}

private renderFollowup(container: HTMLElement, followup: T): void {

if (followup.kind === 'command' && followup.when && !this.contextService.contextMatchesRules(ContextKeyExpr.deserialize(followup.when))) {
return;
}
Expand All @@ -60,9 +59,9 @@ export class ChatFollowups<T extends IChatFollowup | IInlineChatFollowup> extend
const baseTitle = followup.kind === 'reply' ?
(followup.title || followup.message)
: followup.title;

const tooltip = tooltipPrefix +
('tooltip' in followup && followup.tooltip || baseTitle);
const message = followup.kind === 'reply' ? followup.message : followup.title;
const tooltip = (tooltipPrefix +
('tooltip' in followup && followup.tooltip || message)).trim();
const button = this._register(new Button(container, { ...this.options, title: tooltip }));
if (followup.kind === 'reply') {
button.element.classList.add('interactive-followup-reply');
Expand Down

0 comments on commit 480b13b

Please sign in to comment.