feat: improve regenerate SQL chat feature

This commit is contained in:
ulleo
2025-12-11 16:22:33 +08:00
committed by ulleo
parent 52bba50929
commit 4d49819533
15 changed files with 334 additions and 35 deletions
+8 -3
View File
@@ -51,6 +51,7 @@ export class ChatRecord {
recommended_question?: string
analysis_record_id?: number
predict_record_id?: number
regenerate_record_id?: number
constructor()
constructor(
@@ -75,7 +76,8 @@ export class ChatRecord {
first_chat: boolean,
recommended_question: string | undefined,
analysis_record_id: number | undefined,
predict_record_id: number | undefined
predict_record_id: number | undefined,
regenerate_record_id: number | undefined
)
constructor(
id?: number,
@@ -99,7 +101,8 @@ export class ChatRecord {
first_chat?: boolean,
recommended_question?: string,
analysis_record_id?: number,
predict_record_id?: number
predict_record_id?: number,
regenerate_record_id?: number
) {
this.id = id
this.chat_id = chat_id
@@ -123,6 +126,7 @@ export class ChatRecord {
this.recommended_question = recommended_question
this.analysis_record_id = analysis_record_id
this.predict_record_id = predict_record_id
this.regenerate_record_id = regenerate_record_id
}
}
@@ -252,7 +256,8 @@ const toChatRecord = (data?: any): ChatRecord | undefined => {
data.first_chat,
data.recommended_question,
data.analysis_record_id,
data.predict_record_id
data.predict_record_id,
data.regenerate_record_id
)
}
const toChatRecordList = (list: any = []): ChatRecord[] => {