fix(portal): run VS Code BYOAI prompts in agent mode so web fetch works - #180
Merged
Conversation
KB-x
marked this pull request as ready for review
July 28, 2026 22:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's New
Two improvements to the Open in VS Code BYOAI assistants:
Why
fetchtool but pinned the prompt toaskmode. VS Code only attaches tools in agent mode — theaskagent ignores atoolslist — so fetch was inert and the assistant reported "no web access."Details
portal/scripts/generate-snips.mjs— synthesized VS Code prompts useagent: agentwithtools: ['fetch']as the sole whitelisted tool. The explicit list replaces the default agent toolset, so the assistant gets only read-only web fetch — no file-editing, no terminal — preserving the hardened posture.SYSTEM_PROMPT.mdbundle sources (the generated-byoai-prompt.txtis compiled from these viaregenerate-bundle.sh) — added a short, non-blocking self-update step: at the start, fetch the current published version and adopt it if reachable; if the fetch fails, silently continue with the inline copy (worst case = today's behavior). Shared across all platforms — a no-op for the launch-fetch clients (GPT/Claude), a real refresh for VS Code's on-disk installs and any stale pasted copy.portal/public/byoai/*— regenerated (mirrored.txt+ synthesized.prompt.md).portal/public/USING-BYOAI.md— security wording updated to describe the single read-only fetch capability.portal/src/data/snips.json— regeneration timestamp.Testing
bun run build— clean.agent: agent+tools: ['fetch']frontmatter, and the self-update block present in all 17.txtand all 17.prompt.md.Notes
askmode).