@@ -26,6 +26,7 @@ def __init__(self, mpstate):
26
26
# create chat window
27
27
self .app = wx .App ()
28
28
self .frame = wx .Frame (None , title = "Chat" , size = (650 , 200 ))
29
+ self .frame .SetBackgroundColour (wx .SystemSettings .GetColour (wx .SYS_COLOUR_WINDOW ))
29
30
30
31
# add menu
31
32
self .menu = wx .Menu ()
@@ -63,7 +64,7 @@ def __init__(self, mpstate):
63
64
self .horiz_sizer .Add (self .send_button , proportion = 0 , flag = wx .ALIGN_TOP | wx .ALL , border = 5 )
64
65
65
66
# add a reply box and read-only text box
66
- self .text_reply = wx .TextCtrl (self .frame , id = - 1 , size = (600 , 80 ), style = wx .TE_READONLY | wx .TE_MULTILINE )
67
+ self .text_reply = wx .TextCtrl (self .frame , id = - 1 , size = (600 , 80 ), style = wx .TE_READONLY | wx .TE_MULTILINE | wx . TE_RICH )
67
68
68
69
# add a read-only status text box at the bottom
69
70
self .text_status = wx .TextCtrl (self .frame , id = - 1 , size = (600 , - 1 ), style = wx .TE_READONLY )
@@ -158,7 +159,7 @@ def send_text_to_assistant(self):
158
159
159
160
# copy user input text to reply box
160
161
orig_text_attr = self .text_reply .GetDefaultStyle ()
161
- wx .CallAfter (self .text_reply .SetDefaultStyle , wx .TextAttr (wx .RED , alignment = wx . TEXT_ALIGNMENT_RIGHT ))
162
+ wx .CallAfter (self .text_reply .SetDefaultStyle , wx .TextAttr (wx .RED ))
162
163
wx .CallAfter (self .text_reply .AppendText , send_text + "\n " )
163
164
164
165
# send text to assistant and place reply in reply box
0 commit comments