-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(js/ai): Adds "restart" for tool interrupts with flexible resuming. #1693
base: main
Are you sure you want to change the base?
Conversation
This is ready for review, the build errors are unrelated to my code. |
*/ | ||
restart( | ||
interrupt: ToolRequestPart, | ||
resumedMetadata?: any, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
restart and resume are used interchangeably... should probably be consistent to avoid confusion. Maybe call it restartMetadata
? and restarted
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made the tool API (input, {interrupt, resumed})
because (input, {interrupt, restarted})
doesn't really feel as nice...but maybe it's fine?
Another option could be going back to the original confirm
and make the argument confirmed
. (Then we could have resume + complete + confirm?)
I think restart may still be the most accurate tho...
Implements "restarts" on top of interrupts. Usage:
Checklist (if applicable):