Cache generated docs in local circuit prompt#61
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 04261fab37
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| async function getGeneratedTscircuitDocs(): Promise<string> { | ||
| generatedDocsCache ??= await fetchOptionalFileContent( |
There was a problem hiding this comment.
Avoid caching empty docs after transient fetch failures
The new cache assignment generatedDocsCache ??= await fetchOptionalFileContent(...) permanently stores "" when https://docs.tscircuit.com/ai.txt is temporarily unavailable (network error/503). Because "" is not nullish, all later prompt builds skip refetching and never recover generated docs until process restart, so long-running sessions can miss the “most up-to-date tscircuit API reference” even after the endpoint recovers.
Useful? React with 👍 / 👎.
Summary
Tests
/claim #45