fix: chat response rendering

This commit is contained in:
Carl-Robert Linnupuu 2024-10-01 17:31:45 +03:00
parent c31497ae2c
commit 9e056ef6ce

View file

@ -47,6 +47,7 @@ import javax.swing.Icon;
import javax.swing.JPanel;
import javax.swing.JTextPane;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import org.jetbrains.annotations.Nullable;
public class ChatMessageResponseBody extends JPanel {
@ -113,10 +114,6 @@ public class ChatMessageResponseBody extends JPanel {
}
public ChatMessageResponseBody withResponse(String response) {
if (!responseReceived) {
removeAll();
}
for (var message : MarkdownUtil.splitCodeBlocks(response)) {
processResponse(message, message.startsWith("```"), false);
}