Skip to content

Commit cd3c36a

Browse files
authored
fix hover content to include implicit context (#251739)
1 parent 02d806d commit cd3c36a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,10 @@ export class ImplicitContextAttachmentWidget extends Disposable {
6969
const ariaLabel = range ? localize('chat.fileAttachmentWithRange', "Attached {0}, {1}, line {2} to line {3}", attachmentTypeName, friendlyName, range.startLineNumber, range.endLineNumber) : localize('chat.fileAttachment', "Attached {0}, {1}", attachmentTypeName, friendlyName);
7070

7171
const uriLabel = this.labelService.getUriLabel(file, { relative: true });
72-
const currentFile = localize('openEditor', "Suggested context (current file)");
73-
const title = `${currentFile}\n${uriLabel}`;
72+
const currentFile = localize('openEditor', "Current {0} context", attachmentTypeName);
73+
const inactive = localize('enableHint', "disabled");
74+
const currentFileHint = currentFile + (this.attachment.enabled ? '' : ` (${inactive})`);
75+
const title = `${currentFileHint}\n${uriLabel}`;
7476

7577
const icon = this.attachment.isPromptFile
7678
? ThemeIcon.fromId(Codicon.bookmark.id)

0 commit comments

Comments
 (0)