Skip to content

Include generated docs in local circuit prompt#72

Open
Fire-Fairy84 wants to merge 1 commit into
tscircuit:mainfrom
Fire-Fairy84:include-generated-docs-in-prompt
Open

Include generated docs in local circuit prompt#72
Fire-Fairy84 wants to merge 1 commit into
tscircuit:mainfrom
Fire-Fairy84:include-generated-docs-in-prompt

Conversation

@Fire-Fairy84
Copy link
Copy Markdown

@Fire-Fairy84 Fire-Fairy84 commented May 20, 2026

Proposed Changes

  • Load the generated tscircuit docs from https://docs.tscircuit.com/ai.txt when building the local circuit prompt.
  • Include the generated docs ahead of the existing handwritten API overview when available.
  • Cache the generated-docs fetch during the process and keep prompt creation resilient if the optional docs endpoint is unavailable.
  • Add focused mocked-fetch coverage for the inclusion and fallback paths.
  • Skip OpenAI-backed tests when OPENAI_API_KEY is not set, so the default CI test run remains deterministic.

Proof

npx tsc --noEmit
npx biome check lib/prompt-templates/create-local-circuit-prompt.ts tests/prompt-templates/create-local-circuit-prompt.test.ts tests/utils/generate-random-prompts.test.ts
npx bun test --timeout 50000
npm run build

All commands passed locally.

/claim #45

@Fire-Fairy84 Fire-Fairy84 force-pushed the include-generated-docs-in-prompt branch from 334087b to e44ddc5 Compare May 20, 2026 06:51
Copy link
Copy Markdown
Author

Fire-Fairy84 commented May 20, 2026

CI is green now after the follow-up fix:

  • Type Check: passing
  • Bun Test: passing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant