Add resolveResource method to ResourceHost interface with documentation#1818
Add resolveResource method to ResourceHost interface with documentation#1818
Conversation
…host classes Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
tryResolveResource functionality through the host interface object.
pelikhan
left a comment
There was a problem hiding this comment.
remove the changes to host/nodehost/vshost
rename tryResolveResource to resovleResource in prompt context
|
@copilot apply comments |
…esource in ResourceHost Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Applied all requested changes in commit db8638a:
|
Investigator reportContext collection
AI Analysis
|
|
@copilot - add sample script (under samples/sample/genaisrc) that uses
|
…ation Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Added sample script Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot remove CancellationToken from the public interface |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Removed CancellationToken from the public ResourceHost interface. The resolveResource method now only takes a URL parameter, while internal trace functionality is preserved. Updated documentation to remove cancellation options section. Changes in commit a74d592. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| import type { CancellationOptions } from "./cancellation.js"; |
There was a problem hiding this comment.
Removed unused CancellationOptions import from types.ts in commit e2c4cbd
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
Warning LLM error (403): error
|
This PR adds the
resolveResourcemethod to the ResourceHost interface and provides comprehensive documentation and examples.Changes Made
Enhanced ResourceHost Interface
resolveResourcemethod to the ResourceHost interface that resolves URLs to downloadable resourcestryResolveResourcefunctionDocumentation and Examples
host.resolveResourcein the fetch.md reference guideresolve-resource.genai.mts) demonstrating practical usage with GitHub URLsUsage
The public API provides a simple interface for resolving resources:
The function resolves various URL schemes and protocols, including automatic transformation of GitHub blob URLs to raw content URLs, making it easy to access remote resources in GenAIScript prompts.
Sample Script
The included sample demonstrates resolving the GitHub favicon image and shows how to handle both binary and text content from resolved resources.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.