Skip to content

Include generated docs in local circuit prompt#87

Open
michaelapollopimentel-svg wants to merge 1 commit into
tscircuit:mainfrom
michaelapollopimentel-svg:codex/generated-docs-prompt-timeout-45
Open

Include generated docs in local circuit prompt#87
michaelapollopimentel-svg wants to merge 1 commit into
tscircuit:mainfrom
michaelapollopimentel-svg:codex/generated-docs-prompt-timeout-45

Conversation

@michaelapollopimentel-svg
Copy link
Copy Markdown

Summary

  • Load the generated tscircuit docs feed from https://docs.tscircuit.com/ai.txt into createLocalCircuitPrompt as optional context.
  • Cache successful generated-docs fetches, retry after failures, and abort the optional fetch after a short timeout so prompt creation does not hang on the docs endpoint.
  • Add mocked-fetch coverage for generated-doc inclusion, fallback, caching, and retry behavior.
  • Make OpenAI-backed tests opt-in via RUN_OPENAI_TESTS=1 so default CI does not require API credentials.

/claim #45

Validation

  • git diff --check
  • node --check lib/prompt-templates/create-local-circuit-prompt.ts
  • node --check tests/create-local-circuit-prompt.test.ts
  • node --check tests/tscircuitCoder.test.ts
  • node --check tests/utils/generate-random-prompts.test.ts

Bun is not installed in this local environment, so I am relying on GitHub Actions for the full Bun test and type-check matrix.

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