Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 6, 2025

Fixes rendering of fetched web page references in chat to show page titles in the collapsible header label instead of raw URLs.

Before: Fetched https://docs.expo.dev/versions/latest/sdk/imagepicker/
After: Fetched ImagePicker - Expo Documentation

When the collapsible section is expanded, the inner link displays the full URL with a globe icon for reference.

Changes

  • Web content extraction - Extended WebContentExtractResult to include optional title field; NativeWebContentExtractorService now extracts titles via webContents.getTitle()

  • Tool result pipeline - Added IToolResultReference interface to carry URI + title metadata through toolResultDetails

  • Fetch tool - FetchWebPageTool collects titles from extraction results and sets toolResultMessage with the title for single web page fetches

  • UI rendering - For single web resource fetches, the collapsible header label shows the page title via toolResultMessage. The inner reference link shows the full URL. For multiple resources, the header shows the resource count as before.

  • Serialization - Updated IChatToolInvocationSerialized.resultDetails type to support IToolResultReference

URL fallback preserved for cases without titles or non-web resources.

Fixes #247800

Original prompt

This section details on the original issue you should resolve

<issue_title>Rather than rendering the url, can we get the title and render that instead?</issue_title>
<issue_description>Image

Since we're rendering the page already, lets get the title and attach that.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@dmitrivMS dmitrivMS added the ~copilot-video-please ⚠️WIP🏗️ Use in PRs. Runs Copilot CLI agent to record a video of "trying out the change" label Nov 6, 2025
@vs-code-engineering vs-code-engineering bot removed the ~copilot-video-please ⚠️WIP🏗️ Use in PRs. Runs Copilot CLI agent to record a video of "trying out the change" label Nov 6, 2025
@vs-code-engineering
Copy link

🤖 Copilot has tried out this change! Members of the team can view the recording here or download the Playwright trace here (run)

Copilot AI changed the title [WIP] Update rendering to use title instead of URL Display page titles instead of URLs in chat references Nov 6, 2025
Copilot AI requested a review from dmitrivMS November 6, 2025 23:47
Copilot finished work on behalf of dmitrivMS November 6, 2025 23:47
@dmitrivMS
Copy link
Contributor

@copilot In chat UI we have an item with label "Fetched ...." which, when expanded, contains the link with "globe" icon. That link now has the title. Update the code so that the parent link has the title and the inner link has the full URL instead

Copy link
Contributor Author

Copilot AI commented Nov 7, 2025

@copilot In chat UI we have an item with label "Fetched ...." which, when expanded, contains the link with "globe" icon. That link now has the title. Update the code so that the parent link has the ti...

Updated in ac0668a. Now for single web page fetches:

  • Parent label shows the title: "Fetched Example Page Title"
  • Inner link (when expanded) shows the full URL with globe icon

For multiple resources, the parent label shows the count as before ("Fetched 2 resources"), and the inner links show the URLs.

Copilot AI changed the title Display page titles instead of URLs in chat references Display page titles in chat reference labels instead of URLs Nov 7, 2025
Copilot finished work on behalf of dmitrivMS November 7, 2025 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rather than rendering the url, can we get the title and render that instead?

2 participants