Skip to content

Include generated docs in local circuit prompt#64

Open
jorgeschulz wants to merge 1 commit into
tscircuit:mainfrom
jorgeschulz:bounty/generated-docs-prompt
Open

Include generated docs in local circuit prompt#64
jorgeschulz wants to merge 1 commit into
tscircuit:mainfrom
jorgeschulz:bounty/generated-docs-prompt

Conversation

@jorgeschulz
Copy link
Copy Markdown

Summary

/claim #45

  • includes the generated tscircuit docs from https://docs.tscircuit.com/ai.txt in createLocalCircuitPrompt
  • loads the required props docs and optional generated docs in parallel
  • caches generated docs during the process so benchmark prompt creation does not refetch the same generated docs repeatedly
  • keeps prompt generation resilient when the generated docs endpoint is unavailable
  • adds mocked-fetch coverage for generated-doc inclusion and fallback behavior
  • makes OpenAI-backed tests opt-in when OPENAI_API_KEY is present, so the default test run is deterministic without credentials

Verification

  • npx --yes bun@latest test tests/prompt-templates/create-local-circuit-prompt.test.ts --timeout 50000
  • npx --yes bun@latest test --timeout 50000
  • npx --yes bun@latest x tsc --noEmit
  • npx --yes bun@latest x biome check lib/prompt-templates/create-local-circuit-prompt.ts tests/prompt-templates/create-local-circuit-prompt.test.ts tests/tscircuit-coder.test.ts tests/utils/generate-random-prompts.test.ts
  • npx --yes bun@latest run build
  • git diff --check

AI-assisted with Codex; I reviewed the diff and ran the checks above before opening this PR.

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