diff --git a/j-lawyer-client/src/com/jdimension/jlawyer/client/assistant/AssistantChatDialog.java b/j-lawyer-client/src/com/jdimension/jlawyer/client/assistant/AssistantChatDialog.java index 5030d361..80e550db 100644 --- a/j-lawyer-client/src/com/jdimension/jlawyer/client/assistant/AssistantChatDialog.java +++ b/j-lawyer-client/src/com/jdimension/jlawyer/client/assistant/AssistantChatDialog.java @@ -1147,7 +1147,7 @@ protected Void doInBackground() throws Exception { ClientSettings settings = ClientSettings.getInstance(); Message incomingMsg = new Message(); - incomingMsg.setRole("assistant"); + incomingMsg.setRole(Message.ROLE_ASSISTANT); incomingMsg.setContent("..."); AiChatMessagePanel incomingMsgPanel = new AiChatMessagePanel(incomingMsg, owner); try { @@ -1244,6 +1244,7 @@ protected void done() { } AiChatMessagePanel msgPanel = incomingMessageRef.get(); msgPanel.getMessage().setContent(resultString.toString()); + messages.add(msgPanel.getMessage()); msgPanel.setMessage(msgPanel.getMessage(), owner); msgPanel.repaint(); msgPanel.updateUI();