-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: new diff mode #86
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- also remove extra whitespace for token efficiency
* main: fix: model check for diff mode
* main: chore(release): 1.13.6 [skip ci]
revamp model config
add test coverage
🎉 This issue has been resolved in version 1.14.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
hashcacher
added a commit
to hashcacher/CodeWhisper
that referenced
this pull request
Aug 10, 2024
commit 11f1452808bdb976b2a0b16f0f3bfe73139f1a2b Author: Greg Guterman <[email protected]> Date: Fri Aug 9 15:42:58 2024 -0700 Fix diff commit 8fd72bf11afe8804a59d90a9f769928dc5af192d Author: Greg Guterman <[email protected]> Date: Fri Aug 9 13:53:58 2024 -0700 Add ASCII kitten art to all functions commit dc30f79602834d938d169b24cb8fc5dcc5490f3c Author: Greg Guterman <[email protected]> Date: Fri Aug 9 13:24:33 2024 -0700 Add ASCII kittens to all functions in pull request workflow commit fb0814099e0a0d9df0089e686985a1dd769c0251 Author: Greg Guterman <[email protected]> Date: Fri Aug 9 13:15:22 2024 -0700 milestone commit c6bedba Author: Greg Guterman <[email protected]> Date: Fri Aug 9 12:58:13 2024 -0700 milestone commit 30997cb Author: Greg Guterman <[email protected]> Date: Thu Aug 8 15:38:55 2024 -0700 milestone commit f9ff75f Author: Greg Guterman <[email protected]> Date: Thu Aug 8 15:31:10 2024 -0700 update hbs commit c66710c Author: Greg Guterman <[email protected]> Date: Thu Aug 8 14:57:04 2024 -0700 milestone commit d9542c9 Merge: 51b3e9f c7242f8 Author: Greg Guterman <[email protected]> Date: Thu Aug 8 14:48:58 2024 -0700 Merge remote-tracking branch 'upstream/main' into refactor-processFiles commit 51b3e9f Author: Greg Guterman <[email protected]> Date: Thu Aug 8 10:01:27 2024 -0700 milestone commit c7242f8 Author: semantic-release-bot <[email protected]> Date: Thu Aug 8 21:34:50 2024 +0000 chore(release): 1.14.1 [skip ci] ## [1.14.1](gmickel/CodeWhisper@v1.14.0...v1.14.1) (2024-08-08) ### Bug Fixes * cleanup stdout output ([9a1f351](gmickel@9a1f351)) * trigger release ([e5c8186](gmickel@e5c8186)) commit e5c8186 Author: Gordon Mickel <[email protected]> Date: Thu Aug 8 23:33:56 2024 +0200 fix: trigger release commit 3e40f14 Merge: 9a1f351 2bdbf9f Author: Gordon Mickel <[email protected]> Date: Thu Aug 8 23:33:16 2024 +0200 Merge branch 'main' of https://github.com/gmickel/CodeWhisper * 'main' of https://github.com/gmickel/CodeWhisper: chore(release): 1.14.0 [skip ci] commit 9a1f351 Author: Gordon Mickel <[email protected]> Date: Thu Aug 8 23:33:14 2024 +0200 fix: cleanup stdout output commit 2bdbf9f Author: semantic-release-bot <[email protected]> Date: Thu Aug 8 21:22:29 2024 +0000 chore(release): 1.14.0 [skip ci] # [1.14.0](gmickel/CodeWhisper@v1.13.6...v1.14.0) (2024-08-08) ### Features * new diff mode ([gmickel#86](gmickel#86)) ([b20e55b](gmickel@b20e55b)) * trigger release ([d646b46](gmickel@d646b46)) commit d646b46 Author: Gordon Mickel <[email protected]> Date: Thu Aug 8 23:21:32 2024 +0200 feat: trigger release commit b20e55b Author: Gordon Mickel <[email protected]> Date: Thu Aug 8 23:16:51 2024 +0200 feat: new diff mode (gmickel#86) * add: templates with new improved diff formatting - also remove extra whitespace for token efficiency * add: new parse codegen response logic * Merge branch 'main' into feature/new-diff-mode * main: fix: model check for diff mode * add: new apply-changes logic for new diff format * test: test the new diff mode implementation * fix: task-workflow and its corresponding test * wip: new diff mode * feat: new diff mode * remove extraenous import * improve apply-changes reliability * fix: make prompt provide unique search blocks * prompt engineering time * Merge branch 'main' into feature/new-diff-mode * main: chore(release): 1.13.6 [skip ci] * more prompt improvements * add new gpt-4o model version, adjust temperature * feat: use the diff mode specified in the model config * add diff mode and other new properties to model config * feat: add deepseek api support revamp model config * tests: update tests * docs: update Docs * docs: update Acknowledgments * fix: redo-task should also use the configured diff mode unless overwritten * fix: make flexible whitespace matching more robust * test: update redo-task tests * fix: template improvements * chore: template improvements * allow multiple identical changes per file again * more prompt tweaking * more prompt tweaks * try with system prompt * prompt tweaking * feat: a new approach * fix parser * remove extraneous console.log * prompt improvements * we'll get there * improve prompt templates * remove file.diff * add preprocess function * implement more reliable patching * refactor * test: adapt tests to new file structure and apply changes functionality * test: fix cross platform path resolution * missed one * improve change application * fix code modification application * fix code modification application * improving code application * add: integration for the application of changes * test: more assertions commit e3b68de Author: Greg Guterman <[email protected]> Date: Thu Aug 8 09:57:40 2024 -0700 refactor file-processor; factor out get-file-list commit 26afbe6 Author: Greg Guterman <[email protected]> Date: Thu Aug 8 09:08:48 2024 -0700 milestone commit 8134f56 Author: Greg Guterman <[email protected]> Date: Thu Aug 8 08:49:18 2024 -0700 milestone commit 6b777db Author: Greg Guterman <[email protected]> Date: Thu Aug 8 08:46:01 2024 -0700 milestone commit 7b4806f Author: Greg Guterman <[email protected]> Date: Thu Aug 8 08:37:48 2024 -0700 milestone commit 7e6371d Author: Greg Guterman <[email protected]> Date: Thu Aug 8 08:28:49 2024 -0700 milestone commit 88f2a50 Merge: aff5a71 5c5a1d6 Author: Greg Guterman <[email protected]> Date: Tue Aug 6 12:01:01 2024 -0700 Merge remote-tracking branch 'upstream/main' into feature/implement-pr-changes-ai-1 commit aff5a71 Merge: d76ce96 98519c0 Author: Greg Guterman <[email protected]> Date: Tue Aug 6 12:00:56 2024 -0700 Merge remote-tracking branch 'upstream/main' into feature/implement-pr-changes-ai-1 commit 5c5a1d6 Author: semantic-release-bot <[email protected]> Date: Tue Aug 6 16:27:03 2024 +0000 chore(release): 1.13.6 [skip ci] ## [1.13.6](gmickel/CodeWhisper@v1.13.5...v1.13.6) (2024-08-06) ### Bug Fixes * model check for diff mode ([d64ce8c](gmickel@d64ce8c)) commit d64ce8c Author: Gordon Mickel <[email protected]> Date: Tue Aug 6 18:26:13 2024 +0200 fix: model check for diff mode commit d76ce96 Author: Greg Guterman <[email protected]> Date: Tue Aug 6 09:18:05 2024 -0700 milestone commit 98519c0 Author: semantic-release-bot <[email protected]> Date: Tue Aug 6 08:22:25 2024 +0000 chore(release): 1.13.5 [skip ci] ## [1.13.5](gmickel/CodeWhisper@v1.13.4...v1.13.5) (2024-08-06) ### Bug Fixes * set diff mode to be default false ([14165ac](gmickel@14165ac)) * test ([5800e15](gmickel@5800e15)) commit 5800e15 Author: Gordon Mickel <[email protected]> Date: Tue Aug 6 10:18:51 2024 +0200 fix: test commit 5bf8814 Author: Gordon Mickel <[email protected]> Date: Tue Aug 6 10:13:18 2024 +0200 docs: update documentation for diff mode commit afd7b08 Author: Gordon Mickel <[email protected]> Date: Tue Aug 6 10:13:09 2024 +0200 add a warning if the user selects diff mode with an unsupported model commit 14165ac Author: Gordon Mickel <[email protected]> Date: Tue Aug 6 10:12:42 2024 +0200 fix: set diff mode to be default false commit 2512a46 Author: semantic-release-bot <[email protected]> Date: Tue Aug 6 07:22:00 2024 +0000 chore(release): 1.13.4 [skip ci] ## [1.13.4](gmickel/CodeWhisper@v1.13.3...v1.13.4) (2024-08-06) ### Bug Fixes * revert back to our working diff method ([gmickel#82](gmickel#82)) ([8ba856a](gmickel@8ba856a)) commit 8ba856a Author: Gordon Mickel <[email protected]> Date: Tue Aug 6 09:21:11 2024 +0200 fix: revert back to our working diff method (gmickel#82) * fix: diff mode * test: update test * test: update test * chore: update no plan diff template commit cbfd9d0 Author: semantic-release-bot <[email protected]> Date: Tue Aug 6 01:29:13 2024 +0000 chore(release): 1.13.3 [skip ci] ## [1.13.3](gmickel/CodeWhisper@v1.13.2...v1.13.3) (2024-08-06) ### Bug Fixes * more diff mode improvements ([gmickel#81](gmickel#81)) ([2e3ceb3](gmickel@2e3ceb3)) commit 2e3ceb3 Author: Gordon Mickel <[email protected]> Date: Tue Aug 6 03:28:26 2024 +0200 fix: more diff mode improvements (gmickel#81) * fix: more diff mode improvements * fix: actually apply the changes * fix: actually apply the changes commit 40a560b Author: semantic-release-bot <[email protected]> Date: Tue Aug 6 00:02:23 2024 +0000 chore(release): 1.13.2 [skip ci] ## [1.13.2](gmickel/CodeWhisper@v1.13.1...v1.13.2) (2024-08-06) ### Bug Fixes * add correct version number to cli ([gmickel#79](gmickel#79)) ([4ff493e](gmickel@4ff493e)) commit 4ff493e Author: Gordon Mickel <[email protected]> Date: Tue Aug 6 02:01:37 2024 +0200 fix: add correct version number to cli (gmickel#79) commit bc96055 Author: semantic-release-bot <[email protected]> Date: Mon Aug 5 23:55:39 2024 +0000 chore(release): 1.13.1 [skip ci] ## [1.13.1](gmickel/CodeWhisper@v1.13.0...v1.13.1) (2024-08-05) ### Bug Fixes * cleanup task-workflow ([gmickel#78](gmickel#78)) ([baac5ec](gmickel@baac5ec)) commit baac5ec Author: Gordon Mickel <[email protected]> Date: Tue Aug 6 01:54:56 2024 +0200 fix: cleanup task-workflow (gmickel#78) * fix: clean up task-workflow fix redo option with --no-plan option * fix: ensure redo task respects the plan/no-plan setting of the prev task * docs: clarify --redo usage * docs: clarify --redo usage commit e54f24d Merge: 1df5085 931e4b8 Author: Greg Guterman <[email protected]> Date: Mon Aug 5 15:15:16 2024 -0700 Merge remote-tracking branch 'upstream/main' into feature/implement-pr-changes-ai-1 commit 1df5085 Author: Greg Guterman <[email protected]> Date: Mon Aug 5 12:47:49 2024 -0700 milestone commit 931e4b8 Author: semantic-release-bot <[email protected]> Date: Mon Aug 5 22:07:01 2024 +0000 chore(release): 1.13.0 [skip ci] # [1.13.0](gmickel/CodeWhisper@v1.12.1...v1.13.0) (2024-08-05) ### Features * Add --no-plan mode for streamlined code generatio ([gmickel#77](gmickel#77)) ([2fffd57](gmickel@2fffd57)) commit 2fffd57 Author: Gordon Mickel <[email protected]> Date: Tue Aug 6 00:06:15 2024 +0200 feat: Add --no-plan mode for streamlined code generatio (gmickel#77) * prompting: further improve prompts * feat: add --no-plan mode commit b764f23 Author: Greg Guterman <[email protected]> Date: Mon Aug 5 12:41:42 2024 -0700 milestone commit d580039 Author: Greg Guterman <[email protected]> Date: Mon Aug 5 12:03:20 2024 -0700 milestone commit 1fb66a8 Author: Greg Guterman <[email protected]> Date: Mon Aug 5 11:44:15 2024 -0700 milestone commit a80c427 Author: Greg Guterman <[email protected]> Date: Mon Aug 5 11:42:08 2024 -0700 milestone commit 6405461 Author: Greg Guterman <[email protected]> Date: Mon Aug 5 11:28:11 2024 -0700 milestone commit 7834bb6 Author: Greg Guterman <[email protected]> Date: Sun Aug 4 22:38:33 2024 -0700 fix spinner commit d1203f8 Author: Greg Guterman <[email protected]> Date: Sun Aug 4 22:35:22 2024 -0700 checkpoint commit 733a307 Author: Greg Guterman <[email protected]> Date: Sun Aug 4 22:26:58 2024 -0700 ai generated checkpoint commit 71f3062 Author: semantic-release-bot <[email protected]> Date: Mon Aug 5 21:01:11 2024 +0000 chore(release): 1.12.1 [skip ci] ## [1.12.1](gmickel/CodeWhisper@v1.12.0...v1.12.1) (2024-08-05) ### Bug Fixes * trigger release ([d9d4efc](gmickel@d9d4efc)) commit d9d4efc Author: Gordon Mickel <[email protected]> Date: Mon Aug 5 22:59:33 2024 +0200 fix: trigger release commit fd54570 Author: Gordon Mickel <[email protected]> Date: Mon Aug 5 22:56:18 2024 +0200 fix:improve-diff-mode (gmickel#76) * fix: do not autoformat hbs files, it breaks the llm output * fix: improve diff handling commit 4a1b6f0 Author: Gordon Mickel <[email protected]> Date: Mon Aug 5 15:19:55 2024 +0200 docs: update README commit 577837f Merge: 5cd342a 09b3e06 Author: Gordon Mickel <[email protected]> Date: Mon Aug 5 11:24:33 2024 +0200 Merge branch 'main' of https://github.com/gmickel/CodeWhisper * 'main' of https://github.com/gmickel/CodeWhisper: chore(release): 1.12.0 [skip ci] feat: Improve-docs-and-diff-mode (gmickel#73) commit 09b3e06 Author: semantic-release-bot <[email protected]> Date: Mon Aug 5 09:23:53 2024 +0000 chore(release): 1.12.0 [skip ci] # [1.12.0](gmickel/CodeWhisper@v1.11.0...v1.12.0) (2024-08-05) ### Features * Improve-docs-and-diff-mode ([gmickel#73](gmickel#73)) ([0ff9323](gmickel@0ff9323)) commit 0ff9323 Author: Gordon Mickel <[email protected]> Date: Mon Aug 5 11:23:08 2024 +0200 feat: Improve-docs-and-diff-mode (gmickel#73) * test: update e2e to not use diff mode explicitly * fix: --diff is not enabled by default * fix: improve diff parsing reliability * docs: prettify all docs commit 5cd342a Author: Gordon Mickel <[email protected]> Date: Mon Aug 5 10:32:37 2024 +0200 test: update e2e to not use diff mode explicitly commit db94980 Author: Gordon Mickel <[email protected]> Date: Mon Aug 5 08:50:55 2024 +0200 chore: update dependencies commit 40ba0fc Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Aug 5 08:41:58 2024 +0200 chore(deps-dev): bump bumpp from 9.4.1 to 9.4.2 (gmickel#68) Bumps [bumpp](https://github.com/antfu/bumpp) from 9.4.1 to 9.4.2. - [Release notes](https://github.com/antfu/bumpp/releases) - [Commits](antfu-collective/bumpp@v9.4.1...v9.4.2) --- updated-dependencies: - dependency-name: bumpp dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit eef758f Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Aug 5 08:41:36 2024 +0200 chore(deps-dev): bump @types/node from 20.14.13 to 20.14.14 (gmickel#69) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.14.13 to 20.14.14. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 63c9d96 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Aug 5 08:41:08 2024 +0200 chore(deps): bump @ai-sdk/anthropic from 0.0.34 to 0.0.35 (gmickel#70) Bumps [@ai-sdk/anthropic](https://github.com/vercel/ai) from 0.0.34 to 0.0.35. - [Release notes](https://github.com/vercel/ai/releases) - [Commits](https://github.com/vercel/ai/compare/@ai-sdk/[email protected]...@ai-sdk/[email protected]) --- updated-dependencies: - dependency-name: "@ai-sdk/anthropic" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 8681090 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Aug 5 08:40:57 2024 +0200 chore(deps): bump @inquirer/prompts from 5.3.6 to 5.3.7 (gmickel#71) Bumps [@inquirer/prompts](https://github.com/SBoudrias/Inquirer.js) from 5.3.6 to 5.3.7. - [Release notes](https://github.com/SBoudrias/Inquirer.js/releases) - [Commits](https://github.com/SBoudrias/Inquirer.js/compare/@inquirer/[email protected]...@inquirer/[email protected]) --- updated-dependencies: - dependency-name: "@inquirer/prompts" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 8f1ef66 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Aug 5 08:40:47 2024 +0200 chore(deps-dev): bump tsup from 8.2.3 to 8.2.4 (gmickel#72) Bumps [tsup](https://github.com/egoist/tsup) from 8.2.3 to 8.2.4. - [Release notes](https://github.com/egoist/tsup/releases) - [Changelog](https://github.com/egoist/tsup/blob/dev/.releaserc.json) - [Commits](egoist/tsup@v8.2.3...v8.2.4) --- updated-dependencies: - dependency-name: tsup dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a new improved diff mode for the code modification prompt.
Instead of using the Standard Unified Diff Format, which works fine with Claude 3.5 Sonnet, this PR introduces a diff format more akin to Conflict Markers in Version Control which should be easier for LLMs to output.
This PR also:
Adds Deepseek API / deepseek-coder support
Configures the --diff, --no-diff mode automatically based on the selected model. This behaviour can be overriden using the --diff and --no-diff flags.
the --diff flag is no longer set to be true or false (see above)
adds the new 'gpt-4o-2024-08-06' version of gpt-4o which is cheaper and has a 4x longer output token limit
adds a more detailed model recommendation to the README
fixes #84 #85 #87