Skip to content

fix(ff-effect): preserve OUTPUT generic in generateText wrapper#67

Merged
fdarian merged 2 commits intomainfrom
fix/generate-text-output-type
Apr 4, 2026
Merged

fix(ff-effect): preserve OUTPUT generic in generateText wrapper#67
fdarian merged 2 commits intomainfrom
fix/generate-text-output-type

Conversation

@fdarian
Copy link
Copy Markdown
Owner

@fdarian fdarian commented Apr 4, 2026

Summary

  • Adds TOOLS and OUTPUT generic parameters to the generateText wrapper
  • Uses TypeScript instantiation expressions (typeof Ai.generateText<TOOLS, OUTPUT>) to thread generics through params and return type
  • result.output now infers the correct schema type (e.g. { message: string }) instead of any

Test plan

  • Pass an output schema to generateText and verify result.output is typed correctly

fdarian added 2 commits April 4, 2026 16:18
Thread TOOLS and OUTPUT type parameters through so the return type reflects
the actual output schema instead of resolving to `any`.
@fdarian fdarian merged commit 929ff8e into main Apr 4, 2026
3 checks passed
@fdarian fdarian deleted the fix/generate-text-output-type branch April 4, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant