-
Notifications
You must be signed in to change notification settings - Fork 3.4k
refactor findSearchMatch #6464
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
refactor findSearchMatch #6464
Conversation
✅ Deploy Preview for continuedev canceled.
|
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.
cubic found 1 issue across 5 files. Review it in cubic.dev
React with 👍 or 👎 to teach cubic. Tag @cubic-dev-ai
to give specific feedback.
@@ -22,7 +22,7 @@ export const searchAndReplaceInFileTool: Tool = { | |||
function: { | |||
name: BuiltInToolNames.SearchAndReplaceInFile, | |||
description: | |||
"Description: Request to replace sections of content in an existing file using SEARCH/REPLACE blocks that define exact changes to specific parts of the file. This tool should be used when you need to make targeted changes to specific parts of a file.", | |||
"Request to replace sections of content in an existing file using SEARCH/REPLACE blocks that define exact changes to specific parts of the file. This tool should be used when you need to make targeted changes to specific parts of a file.", |
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.
The description string no longer starts with 'Description:' while other tool descriptions may follow this convention. This could lead to inconsistency in documentation or UI rendering if other tools expect a 'Description:' prefix.
"Request to replace sections of content in an existing file using SEARCH/REPLACE blocks that define exact changes to specific parts of the file. This tool should be used when you need to make targeted changes to specific parts of a file.", | |
"Description: Request to replace sections of content in an existing file using SEARCH/REPLACE blocks that define exact changes to specific parts of the file. This tool should be used when you need to make targeted changes to specific parts of a file.", |
🎉 This PR is included in version 1.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Improve the string matching strategies for find and replace tool
Checklist
Tests
Tests already exist for the overall strategy and am adding more for the new strategies
Summary by cubic
Refactored the findSearchMatch function to use a strategy pattern for string matching, making it easier to add new matching methods in the future. Also updated the tool description for clarity.