Skip to content

Commit 3a7f042

Browse files
authored
fix label of image name on hover (#250360)
1 parent 1ca21f8 commit 3a7f042

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/vs/workbench/contrib/chat/browser/chatAttachmentWidgets.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ export class ImageAttachmentWidget extends AbstractChatAttachmentWidget {
248248
@ILanguageModelsService private readonly languageModelsService: ILanguageModelsService,
249249
@ITelemetryService private readonly telemetryService: ITelemetryService,
250250
@IInstantiationService instantiationService: IInstantiationService,
251+
@ILabelService private readonly labelService: ILabelService,
251252
) {
252253
super(attachment, options, container, contextResourceLabels, hoverDelegate, currentLanguageModel, commandService, openerService);
253254

@@ -286,7 +287,7 @@ export class ImageAttachmentWidget extends AbstractChatAttachmentWidget {
286287
supportsVision: supportsVision
287288
});
288289

289-
const fullName = resource?.toString() || attachment.fullName || attachment.name;
290+
const fullName = resource ? this.labelService.getUriLabel(resource) : (attachment.fullName || attachment.name);
290291
this._register(createImageElements(resource, attachment.name, fullName, this.element, attachment.value as Uint8Array, this.hoverService, ariaLabel, currentLanguageModelName, clickHandler, this.currentLanguageModel, attachment.omittedState));
291292

292293
if (resource) {

0 commit comments

Comments
 (0)