You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Load generated tscircuit docs from https://docs.tscircuit.com/llms.txt into createLocalCircuitPrompt as optional context, with https://docs.tscircuit.com/ai.txt as a legacy fallback.
Include both generated props references from tscircuit/props: COMPONENT_TYPES.md and PROPS_OVERVIEW.md.
Cache successful generated-docs fetches, retry after failures, and abort optional docs fetches after a short timeout so prompt creation does not hang on external docs endpoints.
Add mocked-fetch coverage for generated-doc inclusion, primary-to-legacy fallback, caching, retry behavior, and generated props docs inclusion.
Make OpenAI-backed tests opt-in via RUN_OPENAI_TESTS=1 so default CI does not require API credentials.
Friendly follow-up on #45: this PR has been open and green since May 26 with both test and type-check passing. It includes /claim #45 and covers generated-doc inclusion, fallback, caching, retry, and timeout behavior. If there is anything specific you want changed before review, I can adjust it.
Updated this PR to include the generated PROPS_OVERVIEW.md from tscircuit/props alongside COMPONENT_TYPES.md, so the prompt now consumes both generated props docs plus the optional docs-site ai.txt context. Local validation rerun:
Updated this PR again to use https://docs.tscircuit.com/llms.txt as the primary generated docs source, with https://docs.tscircuit.com/ai.txt retained as a legacy fallback. I verified both URLs currently serve the same generated docs payload, but llms.txt is the standard docs endpoint and this keeps prompt generation resilient if either endpoint changes.
bun is still not installed locally, so full Bun tests/type-check are left to GitHub Actions.
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
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.
Summary
https://docs.tscircuit.com/llms.txtintocreateLocalCircuitPromptas optional context, withhttps://docs.tscircuit.com/ai.txtas a legacy fallback.tscircuit/props:COMPONENT_TYPES.mdandPROPS_OVERVIEW.md.RUN_OPENAI_TESTS=1so default CI does not require API credentials./claim #45
Validation
git diff --checknode --check lib/prompt-templates/create-local-circuit-prompt.tsnode --check tests/create-local-circuit-prompt.test.tsnode --check tests/tscircuitCoder.test.tsnode --check tests/utils/generate-random-prompts.test.tstestsuccesstype-checksuccessBun is not installed in this local environment, so I am relying on GitHub Actions for the full Bun test and type-check matrix.