Commit graph

134 commits

Author SHA1 Message Date
Matt Van Horn
9c08e5917a
fix: preserve indentation when applying code edits to Python files (#11289)
* fix: preserve indentation when applying code edits via fuzzy matching

When fallback matching strategies (trimmedMatch, whitespaceIgnoredMatch)
find a match with different indentation than the LLM-provided old_string,
the replacement new_string now has its indentation adjusted to match the
actual indentation level in the file. This fixes incorrect indentation in
Python code edits where the LLM provides unindented search/replace strings
that match indented code blocks.

Fixes #11282

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(core): adjust indentation when fallback match strategies splice replacements

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 13:12:00 -07:00
uinstinct
079ad17062 fix tests 2025-12-04 18:36:15 +05:30
uinstinct
0086509a4d add tests in findSearchMatches.test 2025-12-03 18:29:38 +05:30
uinstinct
c05dcffc2a add tests 2025-12-02 18:52:24 +05:30
uinstinct
ac476cc028 fix: add case insensitive match strategy for find and replace 2025-12-02 18:52:09 +05:30
Aditya Mitra
d8cc0b69d2
feat: sonnet lazy apply prompt should not change comments (#8665)
* feat: sonnet lazy apply prompt should not change comments

* change for ApplyManager.getApplyPrompt

* change for ApplyToFileHandler.buildApplyPrompt

* remove unused edit prompts in edit templates

* add do not change comments to edit templates

* tweak prompt to remove explicitly
2025-11-17 11:05:22 -08:00
Dallin Romney
fac7f5c449
feat: tool call args preprocessing (#7992)
* feat: preprocess tool call args

* fix: broken multi edit impl

* fix: preprocess test failures

* fix: preprocessing tests

* fix: tool calls test progress

* fix: tests using mock store

* fix: thunk tests working

* fix: mock ide messenger tests
2025-09-30 18:49:29 -07:00
Dallin Romney
436931df88 fix: remove toreversed 2025-09-20 02:55:47 -07:00
Dallin Romney
d1b4dbe7d2 fix: cubic feedback, lint 2025-09-20 02:49:52 -07:00
Dallin Romney
6d7bfb966d feat: search and replace fallback reintroduction cont. 2025-09-20 02:41:25 -07:00
Dallin Romney
c211ec8358 feat: unify search and replace 2025-09-20 01:15:20 -07:00
Dallin Romney
b28ce7094d feat: refactor multiedit 2025-09-19 22:05:58 -07:00
Dallin Romney
ffd3842097 Merge branch 'dallin/search-replace-error-codes-con-3928' of https://github.com/continuedev/continue into dallin/search-replace-fallbacks-v2 2025-09-19 17:42:12 -07:00
Dallin Romney
604ec09ef1 WIP: perform search and replace with fallbacks 2025-09-19 17:35:21 -07:00
Dallin Romney
5b5532f7e7 feat: find and replace fallbacks (restore) 2025-09-19 10:29:49 -07:00
Nate Sesti
d78fc99087
feat: add Mercury Apply endpoint support to Inception LLM (#7827)
* feat: add Mercury Apply endpoint support to Inception LLM

* refactor: begin to clean up the apply / streamDiff code

* fix: undo commenting out of instant apply

* fix: use underlyingProviderName
2025-09-18 23:44:25 -07:00
Nate
fbc078ff0f fix: use baseSystemMessage (chat) for apply if available 2025-09-09 23:43:32 -07:00
Dallin Romney
e9641b00a3
chore: remove unused search and replace tool (#7487)
* chore: remove unused search and replace tool

* chore: remove search and replace, continued

* chore: remove search and replace part 3

* chore: remove search replace tool p4
2025-08-29 15:18:40 -07:00
agrabauskas
00985d3a5c
Fix: Remove completionOptions and appliedRules from PromptLog 2025-08-22 18:32:42 +01:00
Dallin Romney
70ad8cbfad fix: remove jarowinkler similarity for search and replace 2025-08-19 10:47:04 -07:00
Patrick Erichsen
9a2b36ff6e fix types 2025-08-13 22:12:33 -07:00
Nate Sesti
54b1a6351d
fix: improve findSearchMatch to fix whitespace matching errors (#6816)
* fix: improve findSearchMatch to fix whitespace matching errors

* fix: prettier

* fix: prettier

---------

Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
2025-08-05 11:10:17 -07:00
chezsmithy
ad2bbc28c9 add back comments 2025-07-13 13:20:31 -07:00
chezsmithy
361685dc9d remove nova change 2025-07-13 11:41:35 -07:00
chezsmithy
f6d6c4fb81 deduplicate code 2025-07-13 11:40:50 -07:00
chezsmithy
938b7506cf Optimize for more tests and nova 2025-07-13 11:40:47 -07:00
chezsmithy
9cd2f8b34b enhancing the solution 2025-07-13 11:39:55 -07:00
Patrick Erichsen
7165a7b89a
Merge pull request #6466 from chezsmithy/feat-amazon-nova
feat: ✨ Enable amazon nova models
2025-07-07 11:24:12 -07:00
Nate
0a1c2db322 fix jaro winkler 2025-07-04 23:13:48 -07:00
chezsmithy
15a61ba8b8 feat: ✨ Enable amazon nova pro models 2025-07-04 21:24:39 -07:00
Nate
b5df848e63 add telemetry for match result 2025-07-04 20:04:53 -07:00
Nate
13d5527f2a whitespace ignored matching algorithm + tests 2025-07-04 19:27:53 -07:00
Nate
4868cdf885 refactor findSearchMatch 2025-07-04 19:07:49 -07:00
Dallin Romney
ac17c39620 remove onlyOneInsertion param 2025-07-02 13:56:05 -07:00
Dallin Romney
ce681260d8 remove the valid tool call check for now 2025-06-30 18:18:58 -07:00
Dallin Romney
bebc8bc71e construct message: tool messages 2025-06-30 11:15:48 -07:00
Patrick Erichsen
4bcbc49a8d Update findSearchMatch.ts 2025-06-27 08:16:25 -07:00
Patrick Erichsen
da185e35bd code cleanup 2025-06-26 17:45:16 -07:00
Patrick Erichsen
bf7b62890e feat: apply logic 2025-06-26 16:02:43 -07:00
Patrick Erichsen
525e5d448b feat: basic search and replace logic w/o streaming 2025-06-26 12:20:59 -07:00
Dallin Romney
ae97f1d6eb add apply cancellation test 2025-06-18 10:50:14 -07:00
Dallin Romney
a2879d13de merge main 2025-06-15 13:20:33 -07:00
Dallin Romney
a1dc1f8aa2 change to reject diffs approach rather than cancel apply approach 2025-05-29 16:04:35 -07:00
Dallin Romney
8d8cf3644e fix apply cancellation and make slash commands cancelable 2025-05-29 13:48:47 -07:00
Nate
184be8f092 npx prettier --check "core/**/*.{js,jsx,ts,tsx,json,css,md}" --ignore-p
ath .gitignore --ignore-path .prettierignore --write
2025-05-25 18:34:39 -07:00
Nate
dcb1615486 Merge branch 'main' into dallin/cancelable-apply 2025-05-25 16:11:53 -07:00
Tomasz Stefaniak
cd82f4c61f fix: type errors 2025-05-21 12:53:33 -07:00
Dallin Romney
d93d665512 cancelable apply 2025-05-15 15:55:15 -07:00
Dallin Romney
f22dd925af
Merge pull request #5465 from continuedev/dallin/edit-rules
include rules in edit requests
2025-05-02 17:05:34 -07:00
Dallin Romney
1c44b2549d let -> const 2025-05-02 16:20:26 -07:00