@@ -4,6 +4,7 @@ var app = new Vue({
44 progressWidth : '0%' ,
55 modelSpec : LLM_SPECS [ 0 ] ,
66 budget : 50 ,
7+ latency : 0 ,
78 isFocused : false , // Tracks if the textarea is focused
89 showParams : false ,
910 showResetConfirmation : false ,
@@ -121,6 +122,7 @@ var app = new Vue({
121122 const state = {
122123 modelSpec : this . modelSpec ,
123124 budget : this . budget ,
125+ selectedConfig : this . selectedConfig ,
124126 dataConfig : this . dataConfig ,
125127 optimize : this . optimize ,
126128 enableChartDiagram : this . enableChartDiagram ,
@@ -139,6 +141,7 @@ var app = new Vue({
139141 this . optimize = state . optimize ;
140142 this . enableChartDiagram = state . enableChartDiagram ;
141143 this . enableMultiStepAttack = state . enableMultiStepAttack ;
144+ this . selectedConfig = state . selectedConfig ;
142145 }
143146 } ,
144147 resetState ( ) {
@@ -198,10 +201,11 @@ var app = new Vue({
198201 body : JSON . stringify ( payload ) ,
199202 } ) ;
200203 console . log ( response ) ;
201- let txt = await response . text ( ) ;
204+ let r = await response . json ( ) ;
205+ this . latency = r . elapsed ;
202206 if ( ! response . ok ) {
203207 this . updateStatusDot ( false ) ;
204- this . errorMsg = 'Integration verification failed:' + txt ;
208+ this . errorMsg = 'Integration verification failed:' + JSON . stringify ( r ) ;
205209 } else {
206210 this . errorMsg = '' ;
207211 this . updateStatusDot ( true ) ;
0 commit comments