Skip to content

Conversation

@mrubens
Copy link
Collaborator

@mrubens mrubens commented Dec 17, 2024


Important

Fixes line number handling in file content by adding functions to strip line numbers and updating relevant logic in Cline.ts and search-replace.ts.

  • Behavior:
    • In Cline.ts, diffViewProvider.update() now strips line numbers if present using stripLineNumbers().
    • In search-replace.ts, applyDiff() strips line numbers from search and replace sections if all lines have them.
  • Functions:
    • Add everyLineHasLineNumbers() and stripLineNumbers() to extract-text.ts.
  • Tests:
    • Add tests for everyLineHasLineNumbers() and stripLineNumbers() in extract-text.test.ts.
    • Add tests for line number stripping in search-replace.test.ts.

This description was created by Ellipsis for 86bb389. It will automatically update as commits are pushed.

@changeset-bot
Copy link

changeset-bot bot commented Dec 17, 2024

⚠️ No Changeset found

Latest commit: 86bb389

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mrubens mrubens merged commit 49067c0 into main Dec 17, 2024
6 checks passed
@mrubens mrubens deleted the strip_line_numbers_from_write_to_file branch December 17, 2024 14:52
roomote pushed a commit that referenced this pull request Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants