Skip to content

Include generated docs in local circuit prompt#58

Open
SimoneMariaRomeo wants to merge 2 commits into
tscircuit:mainfrom
SimoneMariaRomeo:codex/include-generated-docs-context
Open

Include generated docs in local circuit prompt#58
SimoneMariaRomeo wants to merge 2 commits into
tscircuit:mainfrom
SimoneMariaRomeo:codex/include-generated-docs-context

Conversation

@SimoneMariaRomeo
Copy link
Copy Markdown

@SimoneMariaRomeo SimoneMariaRomeo commented May 12, 2026

Summary

  • fetches https://docs.tscircuit.com/ai.txt inside createLocalCircuitPrompt
  • inserts the generated docs before the handwritten API overview so the model sees the freshest reference first
  • keeps prompt creation working if the generated-docs fetch fails
  • adds mocked-fetch tests for success and fallback behavior
  • skips OpenAI-dependent tests when OPENAI_API_KEY is not configured, matching CI's empty-key environment

Verification

  • bun test tests\prompt-templates\create-local-circuit-prompt.test.ts
  • $env:OPENAI_API_KEY=''; bun run test
  • bun x tsc --noEmit
  • bun run build
  • git diff --check
  • GitHub Actions: test + type-check passing

/claim #45

@SimoneMariaRomeo
Copy link
Copy Markdown
Author

All requested verification is green now: GitHub Actions test and type-check are passing, and the PR body includes local checks with OPENAI_API_KEY cleared to match CI. Ready for review/reward when convenient.

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