Skip to content

fix(ai): unify generate text event callbacks - #14762

Merged
lgrammel merged 4 commits into
mainfrom
lg/mWFsS6IP
Apr 27, 2026
Merged

fix(ai): unify generate text event callbacks#14762
lgrammel merged 4 commits into
mainfrom
lg/mWFsS6IP

Conversation

@lgrammel

@lgrammel lgrammel commented Apr 27, 2026

Copy link
Copy Markdown
Collaborator

Background

The start, end, step start, step end callback were duplicated in ToolLoopAgent, generateText, streamText.

This duplication is unnecessary and leads to a risk of type shifts and subsequent typechecking issues.

Summary

  • unify the callbacks into GenerateText* callbacks
  • rename core-events.ts to generate-text-events.ts
  • move the callbacks into generate-text-events.ts

@lgrammel
lgrammel marked this pull request as ready for review April 27, 2026 17:35
@lgrammel
lgrammel marked this pull request as draft April 27, 2026 17:36
@lgrammel
lgrammel marked this pull request as ready for review April 27, 2026 17:43
@lgrammel
lgrammel enabled auto-merge (squash) April 27, 2026 17:45
@lgrammel
lgrammel merged commit 71d3022 into main Apr 27, 2026
17 checks passed
@lgrammel
lgrammel deleted the lg/mWFsS6IP branch April 27, 2026 17:50
gr2m pushed a commit that referenced this pull request Jun 5, 2026
## Background

The start, end, step start, step end callback were duplicated in
`ToolLoopAgent`, `generateText`, `streamText`.

This duplication is unnecessary and leads to a risk of type shifts and
subsequent typechecking issues.

## Summary

* unify the callbacks into `GenerateText*` callbacks
* rename `core-events.ts` to `generate-text-events.ts`
* move the callbacks into `generate-text-events.ts`
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.

2 participants