@@ -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" ,
@@ -121,12 +117,10 @@ function App() {
121117 } ) ,
122118 } ) ;
123119
124-
125-
126120 const data = await response . json ( ) ;
127121 const code = data . code ;
128122
129- addMessage ( { text : data . text , type : "message" , role : "system " } ) ;
123+ addMessage ( { text : data . text , type : "message" , role : "generator " } ) ;
130124
131125 if ( response . status != 200 ) {
132126 setWaitingForSystem ( WaitingStates . Idle ) ;
@@ -165,12 +159,7 @@ function App() {
165159 }
166160
167161 function completeUpload ( message : string ) {
168- addMessage ( {
169- text : message ,
170- type : "message" ,
171- role : "system" ,
172- } ) ;
173-
162+ addMessage ( { text : message , type : "message" , role : "upload" } ) ;
174163 setWaitingForSystem ( WaitingStates . Idle ) ;
175164
176165 // Inform prompt server
0 commit comments