-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: initial implementation of direct code edits * fix: popup model selection * refactor: simplify code replacement logic * feat: interactive code modifications * refactor: remove junk
- Loading branch information
1 parent
cf5f383
commit 14a0d40
Showing
21 changed files
with
690 additions
and
181 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
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
27 changes: 27 additions & 0 deletions
27
src/main/kotlin/ee/carlrobert/codegpt/actions/editor/EditCodeAction.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package ee.carlrobert.codegpt.actions.editor | ||
|
||
import com.intellij.openapi.application.runInEdt | ||
import com.intellij.openapi.editor.Editor | ||
import com.intellij.openapi.project.Project | ||
import ee.carlrobert.codegpt.Icons | ||
import ee.carlrobert.codegpt.ui.EditCodePopover | ||
import javax.swing.Icon | ||
|
||
class EditCodeAction : BaseEditorAction { | ||
|
||
constructor() : this(Icons.Sparkle) | ||
|
||
constructor(icon: Icon) : super( | ||
"Edit Code", | ||
"Allow LLM to edit code directly in your editor", | ||
icon | ||
) { | ||
EditorActionsUtil.registerAction(this) | ||
} | ||
|
||
override fun actionPerformed(project: Project, editor: Editor, selectedText: String) { | ||
runInEdt { | ||
EditCodePopover(editor).show() | ||
} | ||
} | ||
} |
Oops, something went wrong.