Add proposed API for trusted domains and for web page extraction (#243811)

* Add proposed API for trusted domains and for web page extraction

I don't love the shape of this API but I'm going with this for now to play with it.

This will help Chat provide contents of web pages as context but also allow it full control of the tool.

ref https://github.com/microsoft/vscode/issues/243615

* use a different url

* delete the test until we have a good way to mock
This commit is contained in:
Tyler James Leonhardt
2025-03-17 14:26:13 -07:00
committed by GitHub
parent 4abd072bc0
commit 558d5df792
12 changed files with 136 additions and 56 deletions

View File

@@ -416,6 +416,14 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
throw err;
}
},
isTrustedExternalUris(uris: URI[]): boolean[] {
checkProposedApiEnabled(extension, 'envExtractUri');
return extHostUrls.isTrustedExternalUris(uris);
},
extractExternalUris(uris: URI[]): Promise<string[]> {
checkProposedApiEnabled(extension, 'envExtractUri');
return extHostUrls.extractExternalUris(uris);
},
get remoteName() {
return getRemoteName(initData.remote.authority);
},