Skip to content

Conversation

sestinj
Copy link
Contributor

@sestinj sestinj commented Jul 5, 2025

Description

Improve the string matching strategies for find and replace tool

Checklist

  • I've read the contributing guide
  • The relevant docs, if any, have been updated or created
  • The relevant tests, if any, have been updated or created

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.

Copy link

netlify bot commented Jul 5, 2025

Deploy Preview for continuedev canceled.

Name Link
🔨 Latest commit 9a5c4c0
🔍 Latest deploy log https://app.netlify.com/projects/continuedev/deploys/6869533e6d45910008ba6d36

@sestinj sestinj marked this pull request as ready for review July 5, 2025 16:31
@sestinj sestinj requested a review from a team as a code owner July 5, 2025 16:31
@sestinj sestinj requested review from RomneyDa and removed request for a team July 5, 2025 16:31
@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Jul 5, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a 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.",
Copy link
Contributor

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.

Suggested change
"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.",

@sestinj sestinj merged commit dc0546d into main Jul 5, 2025
42 checks passed
@sestinj sestinj deleted the nate/search-and-replace-improvements branch July 5, 2025 17:03
@github-project-automation github-project-automation bot moved this from Todo to Done in Issues and PRs Jul 5, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jul 5, 2025
@sestinj
Copy link
Contributor Author

sestinj commented Jul 22, 2025

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
released size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant