-
Notifications
You must be signed in to change notification settings - Fork 3.8k
refactor: ♻️ Refactor the cli tool type to align with core #8555
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
base: main
Are you sure you want to change the base?
Conversation
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.
No issues found across 15 files
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.
No issues found across 5 files
3232ca8 to
c078b37
Compare
RomneyDa
left a comment
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.
@chezsmithy I think this is a good direction. Added some comments, looks like tests are failing. Any specific reasons in mind for moving towards unifying/issues it might help solve?
| processedArgs?: Record<string, unknown>, | ||
| ) => ToolPolicy; | ||
| // CLI-specific properties | ||
| preprocess?: (args: any) => Promise<PreprocessToolCallResult>; |
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.
note Core tools have preprocess method now
| }, | ||
| displayTitle: "Diff", | ||
| readonly: true, | ||
| group: "Built-In", |
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.
Let's use a constant for group name since shared between all
| }; | ||
| displayTitle: string; | ||
| wouldLikeTo?: string; | ||
| isCurrently?: string; |
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 might comment out all these unused properties like wouldLikeTo, originalFunctionName, hasAlready, systemMessageDescription etc
|
Edit, I see your comment about |
Description
Refactor the cli tool type to have the function wrapper to align it with the core tool type.
Avoid type issues in OpenAPI adapters due to misalignment.
AI Code Review
@continue-reviewChecklist
Screen recording or screenshot
[ When applicable, please include a short screen recording or screenshot - this makes it much easier for us as contributors to review and understand your changes. See this PR as a good example. ]
Tests
Tests were refactored as needed.
Summary by cubic
Refactored the CLI Tool type to the core-aligned, function-based shape and migrated all built-in tools. This removes type mismatches and stabilizes OpenAPI adapter behavior.
Refactors
Bug Fixes
Written for commit c078b37. Summary will update automatically on new commits.