-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow clients to redefine untitled files protocol during their creati…
…on (#1903) Closes https://linear.app/sourcegraph/issue/CODY-2004/bug-cody-recreates-the-file-that-was-created-by-generate-unit-tests ## Changes Some IDEs (maybe even most IDEs except VSC) does not have notion of unsaved files. Keeping two different models in IDE and in the agent is problematic and leads to hard to track errors. It is easier to let client be honest and notify agent about real protocol which it is using (most likely `file://` instead of `untitled://`). As a result that change slightly modifies behaviour of the `openTextDocument`. One could now call `openTextDocument` with `untitled://abc` parameter, and as a result get a `TextDocument` which uri points to `file://abc` (or any other path, really). ## Test plan 1. Build JetBrains with this PR using CODY_DIR env var and [this PR](sourcegraph/cody#4841) 2. Ask cody to generate tests for some file which does not have tests yet 3. Accept the changes 4. Delete that newly created file 5. Perform autocomplete in some other file 6. Make sure test file was not recreated
- Loading branch information
Showing
5 changed files
with
18 additions
and
34 deletions.
There are no files selected for viewing
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
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
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
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
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