From b7881e7a31861d85805f323e6ae0967b89829c9a Mon Sep 17 00:00:00 2001 From: Dileep Yavanmandha Date: Mon, 31 Aug 2026 11:54:56 -0700 Subject: [PATCH 1/4] changes Signed-off-by: Dileep Yavanmandha --- .../agentHost/agentHostSessionHandler.ts | 2 +- .../agentHost/stateToProgressAdapter.ts | 4 +- .../agentHostChatContribution.test.ts | 57 ++++++++++++++++++- 3 files changed, 59 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.ts b/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.ts index 6a36cfed66eb58..25d243da8e0a4d 100644 --- a/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.ts +++ b/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.ts @@ -6811,7 +6811,7 @@ export class AgentHostSessionHandler extends Disposable implements IChatSessionC } resolveChatResponseUri(_sessionResource: URI, href: string, _kind: 'link' | 'image'): string { - return rewriteAgentHostLinkTarget(href, this._config.connectionAuthority); + return rewriteAgentHostLinkTarget(href, this._config.connectionAuthority, this._config.connection.resourceUris); } /** diff --git a/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/stateToProgressAdapter.ts b/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/stateToProgressAdapter.ts index 405479cde338eb..b9926b662444fe 100644 --- a/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/stateToProgressAdapter.ts +++ b/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/stateToProgressAdapter.ts @@ -2126,7 +2126,7 @@ function normalizeFileUriSelection(uri: URI, href: string): URI { } /** Wraps an absolute path or internal URI target for the owning Agent Host connection. */ -export function rewriteAgentHostLinkTarget(href: string, connectionAuthority: string): string { +export function rewriteAgentHostLinkTarget(href: string, connectionAuthority: string, resourceUris: IAgentHostResourceUriMapper = createAgentHostResourceUriMapper(connectionAuthority)): string { let parsed = parseAbsoluteFileLinkTarget(href); if (!parsed) { try { @@ -2146,7 +2146,7 @@ export function rewriteAgentHostLinkTarget(href: string, connectionAuthority: st let agentHostUri: URI; try { - agentHostUri = toAgentHostUri(parsed, connectionAuthority); + agentHostUri = resourceUris.fromAgentHost(parsed); } catch { return href; } diff --git a/src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts b/src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts index b471cf3b72e1aa..8d6a6714e3e7d2 100644 --- a/src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts +++ b/src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts @@ -26,7 +26,7 @@ import { ILogService, NullLogService } from '../../../../../../platform/log/comm import { IConfigurationService } from '../../../../../../platform/configuration/common/configuration.js'; import { IAgentCreateSessionConfig, IAgentHostService, IAgentSessionMetadata, AgentSession } from '../../../../../../platform/agentHost/common/agentService.js'; import type { ChatInputRequestWithPlanReview } from '../../../../../../platform/agentHost/common/agentHostPlanReview.js'; -import { createAgentHostResourceUriMapper, identityAgentHostResourceUriMapper, toAgentHostUri } from '../../../../../../platform/agentHost/common/agentHostUri.js'; +import { agentHostAuthority, createAgentHostResourceUriMapper, fromAgentHostUri, identityAgentHostResourceUriMapper, toAgentHostUri } from '../../../../../../platform/agentHost/common/agentHostUri.js'; import { AgentFeedbackAttachmentDisplayKind, AgentFeedbackAttachmentMetadataKey } from '../../../../../../platform/agentHost/common/meta/agentFeedbackAttachments.js'; import { VSCODE_EPHEMERAL_SESSION_META_KEY } from '../../../../../../platform/agentHost/common/meta/agentEphemeralSessionMeta.js'; import { getElementAttachmentCorrelationId, toElementAttachmentMeta } from '../../../../../../platform/agentHost/common/meta/agentElementAttachments.js'; @@ -1271,6 +1271,61 @@ suite('AgentHostChatContribution', () => { }); + suite('response resource links', () => { + test('uses the WSL connection for file links despite a local session authority', () => { + const { sessionHandler, agentHostService } = createContribution(disposables); + const authority = agentHostAuthority('vscode-remote://wsl+Ubuntu'); + agentHostService.resourceUris = createAgentHostResourceUriMapper(authority); + const session = URI.parse('agent-host-copilot:/session'); + const file = URI.file('/home/user/project/src/file.ts').with({ fragment: 'L42,7' }); + const targets = [ + '/home/user/project/src/file.ts:42:7', + 'file:///home/user/project/src/file.ts#L42,7', + ]; + + assert.deepStrictEqual(targets.map(href => { + const resolved = URI.parse(sessionHandler.resolveChatResponseUri(session, href, 'link')); + return { resolved: resolved.toString(), hostUri: fromAgentHostUri(resolved).toString() }; + }), targets.map(() => ({ + resolved: toAgentHostUri(file, authority).toString(), + hostUri: file.toString(), + }))); + }); + + test('uses the WSL connection for image paths and preserves encoded path characters', () => { + const { sessionHandler, agentHostService } = createContribution(disposables); + const authority = agentHostAuthority('vscode-remote://wsl+Ubuntu'); + agentHostService.resourceUris = createAgentHostResourceUriMapper(authority); + const session = URI.parse('agent-host-copilot:/session'); + const image = URI.file('/home/user/my project/image.png'); + + assert.strictEqual( + sessionHandler.resolveChatResponseUri(session, '/home/user/my%20project/image.png', 'image'), + toAgentHostUri(image, authority).toString(), + ); + }); + + test('preserves local file links and external or already mapped links', () => { + const { sessionHandler, agentHostService } = createContribution(disposables); + const session = URI.parse('agent-host-copilot:/session'); + const local = sessionHandler.resolveChatResponseUri(session, '/project/file.ts:42', 'link'); + const authority = agentHostAuthority('vscode-remote://wsl+Ubuntu'); + agentHostService.resourceUris = createAgentHostResourceUriMapper(authority); + const mapped = toAgentHostUri(URI.file('/home/user/file.ts'), authority).toString(); + const external = 'https://example.com/file.ts'; + + assert.deepStrictEqual({ + local, + mapped: sessionHandler.resolveChatResponseUri(session, mapped, 'link'), + external: sessionHandler.resolveChatResponseUri(session, external, 'link'), + }, { + local: URI.file('/project/file.ts').with({ fragment: 'L42' }).toString(), + mapped, + external, + }); + }); + }); + // ---- Download progress notification (editor window) ----------------- suite('download progress', () => { From f92d54fd458198e7dfe0bd04c5e627c2fde577f8 Mon Sep 17 00:00:00 2001 From: Dileep Yavanmandha Date: Mon, 31 Aug 2026 13:55:46 -0700 Subject: [PATCH 2/4] Fix Agent Host file link hover labels Format default Markdown link hovers with the host-aware label service while preserving navigation targets and custom titles. Add coverage for WSL paths, Windows host formatting, and existing link behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../widget/chatContentMarkdownRenderer.ts | 10 ++- .../widget/chatMarkdownRenderer.test.ts | 74 ++++++++++++++++++- 2 files changed, 82 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.ts b/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.ts index fb796e975274a7..e047a9cc6107e6 100644 --- a/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.ts +++ b/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.ts @@ -9,6 +9,8 @@ import { getDefaultHoverDelegate } from '../../../../../base/browser/ui/hover/ho import { IMarkdownString } from '../../../../../base/common/htmlContent.js'; import { DisposableStore } from '../../../../../base/common/lifecycle.js'; import { type MarkedExtension } from '../../../../../base/common/marked/marked.js'; +import { URI } from '../../../../../base/common/uri.js'; +import { ILabelService } from '../../../../../platform/label/common/label.js'; import { IMarkdownRenderer, IMarkdownRendererService } from '../../../../../platform/markdown/browser/markdownRenderer.js'; import { ILanguageService } from '../../../../../editor/common/languages/language.js'; import { IConfigurationService } from '../../../../../platform/configuration/common/configuration.js'; @@ -124,6 +126,7 @@ export class ChatContentMarkdownRenderer implements IMarkdownRenderer { @IConfigurationService configurationService: IConfigurationService, @IHoverService private readonly hoverService: IHoverService, @IMarkdownRendererService private readonly markdownRendererService: IMarkdownRendererService, + @ILabelService private readonly labelService: ILabelService, ) { } render(markdown: IMarkdownString, options?: MarkdownRenderOptions, outElement?: HTMLElement): IRenderedMarkdown { @@ -162,7 +165,12 @@ export class ChatContentMarkdownRenderer implements IMarkdownRenderer { // eslint-disable-next-line no-restricted-syntax result.element.querySelectorAll('a').forEach((element) => { if (element.title) { - const title = element.title; + let title = element.title; + if (title === element.dataset.href && title.startsWith(`${AGENT_HOST_SCHEME}:`)) { + const uri = URI.parse(title); + const label = this.labelService.getUriLabel(uri); + title = uri.fragment ? `${label}#${uri.fragment}` : label; + } element.title = ''; store.add(this.hoverService.setupManagedHover(getDefaultHoverDelegate('element'), element, title)); } diff --git a/src/vs/workbench/contrib/chat/test/browser/widget/chatMarkdownRenderer.test.ts b/src/vs/workbench/contrib/chat/test/browser/widget/chatMarkdownRenderer.test.ts index ff7dea639c7f6c..14986b6d0a27d5 100644 --- a/src/vs/workbench/contrib/chat/test/browser/widget/chatMarkdownRenderer.test.ts +++ b/src/vs/workbench/contrib/chat/test/browser/widget/chatMarkdownRenderer.test.ts @@ -4,9 +4,16 @@ *--------------------------------------------------------------------------------------------*/ import assert from 'assert'; +import sinon from 'sinon'; import { MarkdownString } from '../../../../../../base/common/htmlContent.js'; +import { OperatingSystem } from '../../../../../../base/common/platform.js'; +import { URI } from '../../../../../../base/common/uri.js'; import { assertSnapshot } from '../../../../../../base/test/common/snapshot.js'; import { ensureNoDisposablesAreLeakedInTestSuite } from '../../../../../../base/test/common/utils.js'; +import { AGENT_HOST_LABEL_FORMATTER, agentHostAuthority, agentHostLabelFormatter, toAgentHostUri } from '../../../../../../platform/agentHost/common/agentHostUri.js'; +import { IHoverService } from '../../../../../../platform/hover/browser/hover.js'; +import { NullHoverService } from '../../../../../../platform/hover/test/browser/nullHoverService.js'; +import { ILabelService } from '../../../../../../platform/label/common/label.js'; import { ChatContentMarkdownRenderer } from '../../../browser/widget/chatContentMarkdownRenderer.js'; import { workbenchInstantiationService } from '../../../../../test/browser/workbenchTestServices.js'; @@ -14,11 +21,76 @@ suite('ChatMarkdownRenderer', () => { const store = ensureNoDisposablesAreLeakedInTestSuite(); let testRenderer: ChatContentMarkdownRenderer; + let instantiationService: ReturnType; setup(() => { - const instantiationService = store.add(workbenchInstantiationService(undefined, store)); + instantiationService = store.add(workbenchInstantiationService(undefined, store)); testRenderer = instantiationService.createInstance(ChatContentMarkdownRenderer); }); + suite('link hovers', () => { + let setupManagedHover: sinon.SinonSpy, ReturnType>; + + setup(() => { + setupManagedHover = sinon.spy(NullHoverService.setupManagedHover); + instantiationService.stub(IHoverService, { ...NullHoverService, setupManagedHover }); + store.add(instantiationService.get(ILabelService).registerFormatter(AGENT_HOST_LABEL_FORMATTER)); + testRenderer = instantiationService.createInstance(ChatContentMarkdownRenderer); + }); + + test('shows host paths for transformed and already mapped links without changing their targets', () => { + const authority = agentHostAuthority('vscode-remote://wsl+Ubuntu'); + store.add(instantiationService.get(ILabelService).registerFormatter(agentHostLabelFormatter(authority, OperatingSystem.Linux))); + const file = URI.file('/home/user/my project/a&b.ts').with({ fragment: 'L42,7' }); + const target = toAgentHostUri(file, authority).toString(); + const links = [ + { href: '/home/user/my%20project/a&b.ts:42:7', transformUri: () => target }, + { href: target, transformUri: undefined }, + ]; + + const actual = links.map(({ href, transformUri }) => { + const result = store.add(testRenderer.render(new MarkdownString(`[file](${href})`), { transformUri })); + const link = result.element.querySelector('a'); + return { + hover: setupManagedHover.lastCall.args[2], + target: link?.dataset.href, + text: link?.textContent, + nativeTitle: link?.title, + }; + }); + + assert.deepStrictEqual(actual, links.map(() => ({ + hover: '/home/user/my project/a&b.ts#L42,7', + target, + text: 'file', + nativeTitle: '', + }))); + }); + + test('uses the remote host operating system for path formatting', () => { + const labelService = instantiationService.get(ILabelService); + store.add(labelService.registerFormatter(agentHostLabelFormatter('windows-host', OperatingSystem.Windows))); + const target = toAgentHostUri(URI.file('C:/my project/file.ts'), 'windows-host').toString(); + store.add(testRenderer.render(new MarkdownString(`[file](${target})`))); + + assert.strictEqual(setupManagedHover.lastCall.args[2], 'C:\\my project\\file.ts'); + }); + + test('preserves explicit titles and ordinary file, external, and command link behavior', () => { + const target = toAgentHostUri(URI.file('/home/user/file.ts'), 'remote-host').toString(); + const file = URI.file('/my project/file.ts').with({ fragment: 'L7' }); + const markdown = new MarkdownString(`[custom](${target} "Custom title") [file](${file}) [web](https://example.com/) [command](command:example)`, { isTrusted: true }); + const result = store.add(testRenderer.render(markdown)); + + assert.deepStrictEqual({ + hovers: setupManagedHover.getCalls().map(call => call.args[2]), + targets: Array.from(result.element.querySelectorAll('a'), link => link.dataset.href), + }, { + hovers: ['Custom title', `${file.fsPath}#L7`, 'https://example.com/'], + targets: [target, file.toString(), 'https://example.com/', 'command:example'], + }); + }); + }); + test('simple', async () => { const md = new MarkdownString('a'); const result = store.add(testRenderer.render(md)); From ffdcf288dc6b43eeef23fa5e82a67ee883b6e16d Mon Sep 17 00:00:00 2001 From: Dileep Yavanmandha Date: Mon, 31 Aug 2026 14:39:23 -0700 Subject: [PATCH 3/4] changes Signed-off-by: Dileep Yavanmandha --- .../agentHost/stateToProgressAdapter.ts | 3 ++ .../agentHostChatContribution.test.ts | 29 +++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/stateToProgressAdapter.ts b/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/stateToProgressAdapter.ts index b9926b662444fe..048f3e33f9c69a 100644 --- a/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/stateToProgressAdapter.ts +++ b/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/stateToProgressAdapter.ts @@ -2147,6 +2147,9 @@ export function rewriteAgentHostLinkTarget(href: string, connectionAuthority: st let agentHostUri: URI; try { agentHostUri = resourceUris.fromAgentHost(parsed); + if (parsed.scheme !== Schemas.file && isEqual(agentHostUri, parsed)) { + agentHostUri = toAgentHostUri(parsed, connectionAuthority); + } } catch { return href; } diff --git a/src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts b/src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts index 8d6a6714e3e7d2..b3f7bd95e3c636 100644 --- a/src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts +++ b/src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts @@ -1305,6 +1305,35 @@ suite('AgentHostChatContribution', () => { ); }); + for (const host of ['local', 'WSL']) { + test(`routes ${host} internal resource links and images through the owning Agent Host`, () => { + const { sessionHandler, agentHostService } = createContribution(disposables); + const authority = host === 'local' ? 'local' : agentHostAuthority('vscode-remote://wsl+Ubuntu'); + agentHostService.resourceUris = host === 'local' ? identityAgentHostResourceUriMapper : createAgentHostResourceUriMapper(authority); + const session = URI.parse('agent-host-copilot:/session'); + const resources = [ + URI.parse('agenthost-content:///session/my%20result.txt?view=raw#L42,7'), + URI.parse('git-blob:///project/src/file.ts?ref=HEAD#L7'), + ]; + + assert.deepStrictEqual(resources.map(resource => { + const href = resource.toString(); + const link = sessionHandler.resolveChatResponseUri(session, href, 'link'); + return { + link, + image: sessionHandler.resolveChatResponseUri(session, href, 'image'), + unwrapped: fromAgentHostUri(URI.parse(link)).toString(), + alreadyMapped: sessionHandler.resolveChatResponseUri(session, toAgentHostUri(resource, authority).toString(), 'link'), + }; + }), resources.map(resource => ({ + link: toAgentHostUri(resource, authority).toString(), + image: toAgentHostUri(resource, authority).toString(), + unwrapped: resource.toString(), + alreadyMapped: toAgentHostUri(resource, authority).toString(), + }))); + }); + } + test('preserves local file links and external or already mapped links', () => { const { sessionHandler, agentHostService } = createContribution(disposables); const session = URI.parse('agent-host-copilot:/session'); From ebdff560ce79c89111f302ea4c1cd8fecdfd422f Mon Sep 17 00:00:00 2001 From: Dileep Yavanamandha Date: Mon, 31 Aug 2026 16:35:32 -0700 Subject: [PATCH 4/4] fixing test errors --- .../browser/componentFixtures/chat/chatAgentMerge.fixture.ts | 4 ++++ .../componentFixtures/chat/chatAgentMergeNotice.fixture.ts | 5 +++++ .../chat/chatProgressContentPart.fixture.ts | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/src/vs/workbench/test/browser/componentFixtures/chat/chatAgentMerge.fixture.ts b/src/vs/workbench/test/browser/componentFixtures/chat/chatAgentMerge.fixture.ts index 53e11fc2848b83..28fa7ebc98c9a6 100644 --- a/src/vs/workbench/test/browser/componentFixtures/chat/chatAgentMerge.fixture.ts +++ b/src/vs/workbench/test/browser/componentFixtures/chat/chatAgentMerge.fixture.ts @@ -11,6 +11,7 @@ import { buildAgentMergePrompt, IAgentMergePromptSummary, parseAgentMergePrompt import { CommandsRegistry, ICommandService } from '../../../../../platform/commands/common/commands.js'; import { IConfigurationService } from '../../../../../platform/configuration/common/configuration.js'; import { TestConfigurationService } from '../../../../../platform/configuration/test/common/testConfigurationService.js'; +import { ILabelService } from '../../../../../platform/label/common/label.js'; import { IMarkdownRendererService, MarkdownRendererService } from '../../../../../platform/markdown/browser/markdownRenderer.js'; import { ChatContentMarkdownRenderer } from '../../../../contrib/chat/browser/widget/chatContentMarkdownRenderer.js'; import { ChatAgentMergeContentPart } from '../../../../contrib/chat/browser/widget/chatContentParts/chatAgentMergeContentPart.js'; @@ -178,6 +179,9 @@ function renderAgentMerge({ container, disposableStore, theme }: ComponentFixtur const instantiationService = createEditorServices(disposableStore, { colorTheme: theme, additionalServices: (reg) => { + reg.defineInstance(ILabelService, new class extends mock() { + override getUriLabel(uri: URI): string { return uri.path; } + }()); reg.define(IMarkdownRendererService, MarkdownRendererService); reg.defineInstance(ICommandService, commandService); }, diff --git a/src/vs/workbench/test/browser/componentFixtures/chat/chatAgentMergeNotice.fixture.ts b/src/vs/workbench/test/browser/componentFixtures/chat/chatAgentMergeNotice.fixture.ts index 714c5161665e08..ada77185c037f8 100644 --- a/src/vs/workbench/test/browser/componentFixtures/chat/chatAgentMergeNotice.fixture.ts +++ b/src/vs/workbench/test/browser/componentFixtures/chat/chatAgentMergeNotice.fixture.ts @@ -4,9 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import * as dom from '../../../../../base/browser/dom.js'; +import { URI } from '../../../../../base/common/uri.js'; import { mock } from '../../../../../base/test/common/mock.js'; import { agentMergeDisableReasons, agentMergeDisabledNotice, agentMergeEnabledNotice } from '../../../../../platform/agentHost/common/agentMerge.js'; import { AgentSystemNotificationKind, toAgentSystemNotificationMeta } from '../../../../../platform/agentHost/common/meta/agentSystemNotificationMeta.js'; +import { ILabelService } from '../../../../../platform/label/common/label.js'; import { IMarkdownRendererService, MarkdownRendererService } from '../../../../../platform/markdown/browser/markdownRenderer.js'; import { systemNotificationToChatPart } from '../../../../contrib/chat/browser/agentSessions/agentHost/stateToProgressAdapter.js'; import { ChatContentMarkdownRenderer } from '../../../../contrib/chat/browser/widget/chatContentMarkdownRenderer.js'; @@ -35,6 +37,9 @@ function renderNotice(context: ComponentFixtureContext, content: string, kind: A const instantiationService = createEditorServices(disposableStore, { colorTheme: context.theme, additionalServices: (reg) => { + reg.defineInstance(ILabelService, new class extends mock() { + override getUriLabel(uri: URI): string { return uri.path; } + }()); reg.define(IMarkdownRendererService, MarkdownRendererService); reg.defineInstance(IChatMarkdownAnchorService, anchorService); }, diff --git a/src/vs/workbench/test/browser/componentFixtures/chat/chatProgressContentPart.fixture.ts b/src/vs/workbench/test/browser/componentFixtures/chat/chatProgressContentPart.fixture.ts index e954fd2b23a9aa..8536d831dd8307 100644 --- a/src/vs/workbench/test/browser/componentFixtures/chat/chatProgressContentPart.fixture.ts +++ b/src/vs/workbench/test/browser/componentFixtures/chat/chatProgressContentPart.fixture.ts @@ -9,7 +9,9 @@ import { Event } from '../../../../../base/common/event.js'; import { observableValue } from '../../../../../base/common/observable.js'; import { Codicon } from '../../../../../base/common/codicons.js'; import { ThemeIcon } from '../../../../../base/common/themables.js'; +import { URI } from '../../../../../base/common/uri.js'; import { mock, upcastPartial } from '../../../../../base/test/common/mock.js'; +import { ILabelService } from '../../../../../platform/label/common/label.js'; import { IMarkdownRendererService, MarkdownRendererService } from '../../../../../platform/markdown/browser/markdownRenderer.js'; import { ChatProgressContentPart } from '../../../../contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js'; import { ChatContentMarkdownRenderer } from '../../../../contrib/chat/browser/widget/chatContentMarkdownRenderer.js'; @@ -68,6 +70,9 @@ function renderProgressPart( const instantiationService = createEditorServices(disposableStore, { colorTheme: context.theme, additionalServices: (reg) => { + reg.defineInstance(ILabelService, new class extends mock() { + override getUriLabel(uri: URI): string { return uri.path; } + }()); reg.define(IMarkdownRendererService, MarkdownRendererService); reg.defineInstance(IChatMarkdownAnchorService, mockAnchorService); },