@@ -7,8 +7,8 @@ interface ApplicationFormType {
77 model_id ?: string
88 dialogue_number ?: number
99 prologue ?: string
10- dataset_id_list ?: string [ ]
11- dataset_setting ?: any
10+ knowledge_id_list ?: string [ ]
11+ knowledge_setting ?: any
1212 model_setting ?: any
1313 problem_optimization ?: boolean
1414 problem_optimization_prompt ?: string
@@ -24,6 +24,7 @@ interface ApplicationFormType {
2424 tts_type ?: string
2525 tts_autoplay ?: boolean
2626 stt_autosend ?: boolean
27+ folder_id ?: string
2728}
2829interface Chunk {
2930 real_node_id : string
@@ -118,7 +119,7 @@ export class ChatRecordManage {
118119 chat_record_id ?: string ,
119120 runtime_node_id ?: string ,
120121 child_node ?: any ,
121- real_node_id ?: string
122+ real_node_id ?: string ,
122123 ) {
123124 if ( chunk_answer || reasoning_content ) {
124125 const set_index = index != undefined ? index : this . chat . answer_text_list . length - 1
@@ -142,7 +143,7 @@ export class ChatRecordManage {
142143 chat_record_id,
143144 runtime_node_id,
144145 child_node,
145- real_node_id
146+ real_node_id,
146147 } )
147148 }
148149 }
@@ -167,7 +168,7 @@ export class ChatRecordManage {
167168 return this . write_node_info
168169 }
169170 const run_node = this . node_list . filter (
170- ( item ) => item . reasoning_content_buffer . length > 0 || item . buffer . length > 0 || ! item . is_end
171+ ( item ) => item . reasoning_content_buffer . length > 0 || item . buffer . length > 0 || ! item . is_end ,
171172 ) [ 0 ]
172173
173174 if ( run_node ) {
@@ -185,7 +186,7 @@ export class ChatRecordManage {
185186 const none_index = this . findIndex (
186187 this . chat . answer_text_list ,
187188 ( item ) => ( item . length == 1 && item [ 0 ] . content == '' ) || item . length == 0 ,
188- 'index'
189+ 'index' ,
189190 )
190191 if ( none_index > - 1 ) {
191192 answer_text_list_index = none_index
@@ -196,7 +197,7 @@ export class ChatRecordManage {
196197 const none_index = this . findIndex (
197198 this . chat . answer_text_list ,
198199 ( item ) => ( item . length == 1 && item [ 0 ] . content == '' ) || item . length == 0 ,
199- 'index'
200+ 'index' ,
200201 )
201202 if ( none_index > - 1 ) {
202203 answer_text_list_index = none_index
@@ -208,7 +209,7 @@ export class ChatRecordManage {
208209 this . write_node_info = {
209210 current_node : run_node ,
210211 current_up_node : current_up_node ,
211- answer_text_list_index : answer_text_list_index
212+ answer_text_list_index : answer_text_list_index ,
212213 }
213214
214215 return this . write_node_info
@@ -241,7 +242,7 @@ export class ChatRecordManage {
241242 const last_index = this . findIndex (
242243 this . chat . answer_text_list ,
243244 ( item ) => ( item . length == 1 && item [ 0 ] . content == '' ) || item . length == 0 ,
244- 'last'
245+ 'last' ,
245246 )
246247 if ( last_index > 0 ) {
247248 this . chat . answer_text_list . splice ( last_index , 1 )
@@ -274,13 +275,13 @@ export class ChatRecordManage {
274275 ? current_node . buffer . splice ( 0 )
275276 : current_node . buffer . splice (
276277 0 ,
277- current_node . is_end ? undefined : current_node . buffer . length - 20
278+ current_node . is_end ? undefined : current_node . buffer . length - 20 ,
278279 )
279280 const reasoning_content = current_node . is_end
280281 ? current_node . reasoning_content_buffer . splice ( 0 )
281282 : current_node . reasoning_content_buffer . splice (
282283 0 ,
283- current_node . is_end ? undefined : current_node . reasoning_content_buffer . length - 20
284+ current_node . is_end ? undefined : current_node . reasoning_content_buffer . length - 20 ,
284285 )
285286 this . append_answer (
286287 context . join ( '' ) ,
@@ -289,7 +290,7 @@ export class ChatRecordManage {
289290 current_node . chat_record_id ,
290291 current_node . runtime_node_id ,
291292 current_node . child_node ,
292- current_node . real_node_id
293+ current_node . real_node_id ,
293294 )
294295 } else if ( this . is_close ) {
295296 while ( true ) {
@@ -305,7 +306,7 @@ export class ChatRecordManage {
305306 node_info . current_node . chat_record_id ,
306307 node_info . current_node . runtime_node_id ,
307308 node_info . current_node . child_node ,
308- node_info . current_node . real_node_id
309+ node_info . current_node . real_node_id ,
309310 )
310311
311312 if (
@@ -327,7 +328,7 @@ export class ChatRecordManage {
327328 current_node . chat_record_id ,
328329 current_node . runtime_node_id ,
329330 current_node . child_node ,
330- current_node . real_node_id
331+ current_node . real_node_id ,
331332 )
332333 }
333334 if ( reasoning_content !== undefined ) {
@@ -338,7 +339,7 @@ export class ChatRecordManage {
338339 current_node . chat_record_id ,
339340 current_node . runtime_node_id ,
340341 current_node . child_node ,
341- current_node . real_node_id
342+ current_node . real_node_id ,
342343 )
343344 }
344345 }
@@ -383,7 +384,7 @@ export class ChatRecordManage {
383384 node_type : chunk . node_type ,
384385 index : this . node_list . length ,
385386 view_type : chunk . view_type ,
386- is_end : false
387+ is_end : false ,
387388 }
388389 this . node_list . push ( n )
389390 }
@@ -395,16 +396,16 @@ export class ChatRecordManage {
395396 let set_index = this . findIndex (
396397 this . chat . answer_text_list ,
397398 ( item ) => item . length == 1 && item [ 0 ] . content == '' ,
398- 'index'
399+ 'index' ,
399400 )
400401 if ( set_index <= - 1 ) {
401402 set_index = 0
402403 }
403404 this . chat . answer_text_list [ set_index ] = [
404405 {
405406 content : answer_text_block ,
406- reasoning_content : reasoning_content ? reasoning_content : ''
407- }
407+ reasoning_content : reasoning_content ? reasoning_content : '' ,
408+ } ,
408409 ]
409410 }
410411}
0 commit comments