Add about section to settings.json for multiple locales

This commit is contained in:
n4ze3m
2024-03-31 20:16:26 +05:30
parent e29cea82f5
commit 7b5062e5da
10 changed files with 191 additions and 6 deletions

View File

@@ -6,6 +6,7 @@ import {
type HistoryInfo = {
id: string
title: string
is_rag: boolean
createdAt: number
}
@@ -214,10 +215,10 @@ export const generateID = () => {
})
}
export const saveHistory = async (title: string) => {
export const saveHistory = async (title: string, is_rag?: boolean) => {
const id = generateID()
const createdAt = Date.now()
const history = { id, title, createdAt }
const history = { id, title, createdAt, is_rag }
const db = new PageAssitDatabase()
await db.addChatHistory(history)
return history