Skip to content
This repository was archived by the owner on Aug 1, 2025. It is now read-only.

Commit bcf9252

Browse files
authored
Fix empty files when saving code snippets from chat (#8180)
As the title says. Fixes https://linear.app/sourcegraph/issue/QA-743/jb-specific-code-not-applied-to-new-file-after-clicking-save-button-in ## Test plan 1. Open Cody chat in JetBrains IDE 2. Enter: "Write a Java program." 3. Wait for code snippet generation 4. Click the save button on the snippet 5. Name the file (e.g., "HelloWorld.java") and save <!-- Required. See https://docs-legacy.sourcegraph.com/dev/background-information/testing_principles. -->
1 parent 2e5b3ab commit bcf9252

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

jetbrains/src/main/kotlin/com/sourcegraph/cody/edit/EditService.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ class EditService(val project: Project) {
7878
uriString = op.uri,
7979
content = op.textContents,
8080
overwrite = op.options?.overwrite ?: false)
81-
return file != null
81+
file != null
8282
}
8383
is RenameFileOperation -> {
8484
logger.warn("Workspace edit operation renamed a file: ${op.oldUri} -> ${op.newUri}")
85-
return false
85+
false
8686
}
8787
is DeleteFileOperation -> {
8888
logger.warn("Workspace edit operation deleted a file: ${op.uri}")
89-
return false
89+
false
9090
}
9191
is EditFileOperation -> {
9292
logger.info("Applying workspace edit to a file: ${op.uri}")

0 commit comments

Comments
 (0)