@@ -42,12 +42,12 @@ function App() {
4242 Array . from ( [
4343 {
4444 text : "Hello! I'm a GPT Code assistant. Ask me to do something for you! Pro tip: you can upload a file and I'll be able to use it." ,
45- role : "system " ,
45+ role : "generator " ,
4646 type : "message" ,
4747 } ,
4848 {
4949 text : "If I get stuck just type 'reset' and I'll restart the kernel." ,
50- role : "system " ,
50+ role : "generator " ,
5151 type : "message" ,
5252 } ,
5353 ] )
@@ -77,11 +77,7 @@ function App() {
7777
7878 const handleCommand = ( command : string ) => {
7979 if ( command == "reset" ) {
80- addMessage ( {
81- text : "Restarting the kernel." ,
82- type : "message" ,
83- role : "system" ,
84- } ) ;
80+ addMessage ( { text : "Restarting the kernel." , type : "message" , role : "system" } ) ;
8581
8682 fetch ( `${ Config . API_ADDRESS } /restart` , {
8783 method : "POST" ,
@@ -126,8 +122,7 @@ function App() {
126122 const data = await response . json ( ) ;
127123 const code = data . code ;
128124
129- addMessage ( { text : code , type : "code" , role : "system" } ) ;
130- addMessage ( { text : data . text , type : "message" , role : "system" } ) ;
125+ addMessage ( { text : data . text , type : "message" , role : "generator" } ) ;
131126
132127 if ( response . status != 200 ) {
133128 setWaitingForSystem ( WaitingStates . Idle ) ;
@@ -162,12 +157,7 @@ function App() {
162157 }
163158
164159 function completeUpload ( message : string ) {
165- addMessage ( {
166- text : message ,
167- type : "message" ,
168- role : "system" ,
169- } ) ;
170-
160+ addMessage ( { text : message , type : "message" , role : "upload" } ) ;
171161 setWaitingForSystem ( WaitingStates . Idle ) ;
172162
173163 // Inform prompt server
0 commit comments