* mcp: support sse
Didn't seem like Claude Desktop configs have SSE support yet, but I did
the obvious of having an object with a `url`. I also added a `type`
(optional for stdio) so we can better disambiguate types of configs.
Example .vscode/mcp.json:
```
{
"servers": {
"everything": {
"type": "sse",
"url": "http://localhost:3001/sse"
}
}
}
```
Closes#243242
* update layer check
* Initial cut of WebContentExtractorService & a fetch tool
I will likely move the tool into Copilot so it can take advantage of prompt-tsx and embeddings indexing... but this is the first cut to play around with it.
This leverages Chrome DevTools Protocol's `Accessibility.getFullAXTree` command in order to get a representation of a page while marking what is useful on the page and what is not. We take the output of the command and turn it into a string that the caller can easily consume. This transformer will get more sophisticated over time to make sure we keep content that's important, and ditch content that is not.
On the tool side of things... this implements a Confirmation flow that verifies if the urls being requested is a trusted domain. We are _rendering_ these urls (albiet, sandboxed without JS) so we want to make sure they're safe. If it's not trusted, they'll be asked to confirm.
* fix naming
* mcp: compress tool prefix length
Use a simple sha1 hash to avoid collisions between tool names instead of
the full collection ID, fixes https://github.com/microsoft/vscode/issues/243602
* fixup tests
* wip up `McpConfigurationProvider` api
This allows to dynamically compute the well-known mcp configuration object so that config can be made simpler
* also support SSE config
* wip on more extension-contributed collections
* fixup the bugs
* fixup tests and to .d.ts todos
* * use `ExtensionPoint#setHandler` instead of custom logic
* enforce in main thread that collection are registered
* cleanup wip
* finish cleanup
---------
Co-authored-by: Connor Peet <connor@peet.io>
* add `ChatRequest#tools`
* make select tools for all tools, not just MCP tools
* make the select tools work with all tools, group by MCP server, extension, and rest
* fill in the new ChatRequest#selectTools API with selected tools
* have the MCP server command be its own command with its own custom rendering
* remove old comment