feat(prompt): include auto-generated tscircuit docs in createLocalCircuitPrompt#68
Open
dukunline-cyber wants to merge 1 commit into
Open
Conversation
…cuitPrompt Closes tscircuit#45. Fetches https://docs.tscircuit.com/ai.txt and embeds it as a new top-level section in the local circuit prompt. Wrapped in try/catch with empty-string fallback so a fetch failure (offline, 5xx) does not break prompt generation.
Author
|
/claim #45 |
Author
|
Hi, friendly ping — is there anything I should update on this PR? Let me know if you need changes. |
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.
/claim #45
Closes #45.
Summary
Wires the auto-generated tscircuit docs feed (
https://docs.tscircuit.com/ai.txt) intocreateLocalCircuitPromptso the local circuit benchmark prompt stays in sync with the published docs surface area.Changes
https://docs.tscircuit.com/ai.txtvia the existingfetchFileContenthelper.try/catchand fall back to an empty string. If the docs feed is unreachable (offline, 5xx, network blip) the prompt still builds, just without the auto-docs section. This keeps benchmark runs deterministic and resilient.## Auto-generated tscircuit docssection near the top of the prompt template, just above the existing## tscircuit API overviewsection. The section is omitted entirely if the fetch returned nothing, so we never emit an empty header.Diff size
16 lines added, 1 changed. Single file:
lib/prompt-templates/create-local-circuit-prompt.ts.Verification
COMPONENT_TYPES.md, so behavior on success/failure is consistent with existing code.autoGeneratedDocs = ""->autoGeneratedDocsSection = ""-> template renders identically to before.