fix: scroll down on submit

This commit is contained in:
Carl-Robert Linnupuu 2025-05-13 00:11:27 +01:00
parent e03b22a18e
commit 8318fd7ec5
2 changed files with 7 additions and 0 deletions

View file

@ -369,6 +369,8 @@ public class ChatToolWindowTabPanel implements Disposable {
}
private Unit handleSubmit(String text) {
toolWindowScrollablePanel.scrollToBottom();
var application = ApplicationManager.getApplication();
application.executeOnPooledThread(() -> {
final Set<ClassStructure> psiStructure;

View file

@ -15,6 +15,7 @@ import ee.carlrobert.codegpt.settings.service.codegpt.CodeGPTServiceConfigurable
import ee.carlrobert.codegpt.toolwindow.ui.ResponseMessagePanel;
import ee.carlrobert.codegpt.ui.UIUtil;
import ee.carlrobert.codegpt.util.ApplicationUtil;
import java.awt.Rectangle;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
@ -89,6 +90,10 @@ public class ChatToolWindowScrollablePanel extends ScrollablePanel {
update();
}
public void scrollToBottom() {
scrollRectToVisible(new Rectangle(0, getHeight(), 1, 1));
}
public void update() {
repaint();
revalidate();