Paul Gauthier
360846320f
announce the edit format
2023-12-17 12:58:48 -08:00
Paul Gauthier
2609ec1b06
find_original_update_blocks now accepts fence param, raises on mangled <source>filename.ext #317
2023-11-02 12:05:39 -07:00
Paul Gauthier
15d3a5d581
Switch from "edit block" to "search/replace block"
...
Succeeded in tricky task in the grep-ast codebase:
- checkout ed714ffe58734 / tricky-search-and-replace-state
- "read and parse .gitignore once, not each time we recurse `enumerate_files`"
- was having a lot of trouble creating a head/updated block that matched the actual source code
- new search/replace block does much better
Benchmark had *best* try 1 result and *lowest* num_error_outputs ever seen on gpt-4-0613.
Low num_error_outputs means it's less likely to elide/... code in the before block (original/search).
──────────── tmp.benchmarks/2023-10-25-22-03-19--search-and-replace-and-think ─────────────
test-cases: 133
model: gpt-4
edit_format: diff
commit_hash: c9c2ddb
num_error_outputs: 6
num_user_asks: 0
num_exhausted_context_windows 0
test_timeouts: 2
50.4% correct after try 0
66.2% correct after try 1
2023-10-25 15:24:03 -07:00
Paul Gauthier
3299d90317
Handle successive editblocks from same file w/o filename #267
2023-10-22 11:28:22 -07:00
Paul Gauthier
e608a351f0
standardize on abs_root_path(), simplify get/apply_edit
2023-08-18 07:20:15 -07:00
Paul Gauthier
2455676a44
refactor to enumerate files to be edited, then make the edits
2023-08-17 10:07:22 -07:00
Paul Gauthier
529079ec01
quote the HEAD
2023-08-09 18:51:11 -03:00
Paul Gauthier
fb80377d18
ORIGINAL/UPDATED -> HEAD/updated
2023-08-09 16:16:43 -03:00
Paul Gauthier
73c4efea94
ssh
2023-08-09 12:00:37 -03:00
Paul Gauthier
00512e3d1c
no fuzy matching, stronger prompt for whitespace
2023-08-09 08:25:49 -03:00
Paul Gauthier
c6f6ab6070
corrected perfect replace
2023-08-09 08:20:16 -03:00
Paul Gauthier
8c401ceae7
cleanup
2023-08-03 16:30:38 -03:00
Paul Gauthier
5f7e1d8675
only add newline for non-empty blocks
2023-08-03 16:24:48 -03:00
Paul Gauthier
26ebc715eb
works
2023-08-03 16:22:49 -03:00
Paul Gauthier
a0f03ab0ce
regularize inputs
2023-08-03 15:39:46 -03:00
Paul Gauthier
a6c2841342
noop
2023-08-03 15:37:18 -03:00
Paul Gauthier
8456caae1d
refac
2023-08-03 15:36:06 -03:00
Paul Gauthier
e60a332fda
go for the full line match first
2023-08-03 14:59:59 -03:00
Paul Gauthier
004c0529c6
keepends
2023-08-03 14:56:29 -03:00
Paul Gauthier
390d7faec4
put back bailout logic
2023-08-03 14:49:20 -03:00
Paul Gauthier
c596ea543b
cleanup
2023-08-03 14:24:54 -03:00
Paul Gauthier
c7358c96b9
wip
2023-08-03 09:44:31 -03:00
Paul Gauthier
ea15aa72fa
cleanup
2023-07-20 09:34:09 -03:00
Paul Gauthier
4bc35a7376
Ask GPT to retry if original block is not found
2023-07-19 17:24:53 -03:00
Paul Gauthier
14ce1d43c7
strip the correct fence
2023-07-13 15:54:54 -07:00
Paul Gauthier
85c3bb8f12
rely on io.dry_run
2023-07-05 21:21:37 -07:00
Paul Gauthier
b46dffbb20
refactor to use io.write_text
2023-07-05 21:18:19 -07:00
Paul Gauthier
7c56dcb16f
noop
2023-07-05 21:02:40 -07:00
Paul Gauthier
4c220ff63f
refactor to use io.read_text
2023-07-05 20:31:22 -07:00
Paul Gauthier
fc6dd1877c
Merge branch 'main' into edit-formats
2023-06-23 07:54:24 -07:00
Paul Gauthier
08764215c3
refac
2023-06-22 11:29:59 -07:00
Paul Gauthier
4b69e2b85c
fixed test
2023-06-21 21:33:51 -07:00
Paul Gauthier
eb062cc504
refac and func update_files
2023-06-21 21:17:12 -07:00
Paul Gauthier
070f0a2919
refac
2023-06-20 17:46:47 -07:00