feat: fast code edits (#601)

* feat: initial implementation of direct code edits

* fix: popup model selection

* refactor: simplify code replacement logic

* feat: interactive code modifications

* refactor: remove junk
This commit is contained in:
Carl-Robert 2024-06-30 00:39:52 +03:00 committed by GitHub
parent cf5f38365d
commit 14a0d4085c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 690 additions and 181 deletions

View file

@ -44,6 +44,7 @@ import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.UUID;
import java.util.function.Consumer;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
@ -274,7 +275,7 @@ public class ChatToolWindowTabPanel implements Disposable {
panel.add(JBUI.Panels.simplePanel(createUserPromptTextAreaHeader(
project,
selectedService,
() -> {
(provider) -> {
ConversationService.getInstance().startConversation();
contentManager.createNewTabPanel();
})), BorderLayout.NORTH);
@ -285,7 +286,7 @@ public class ChatToolWindowTabPanel implements Disposable {
private JPanel createUserPromptTextAreaHeader(
Project project,
ServiceType selectedService,
Runnable onModelChange) {
Consumer<ServiceType> onModelChange) {
return JBUI.Panels.simplePanel()
.withBorder(Borders.emptyBottom(8))
.andTransparent()