File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ export const getSession = async (sessionId) => {
51
51
}
52
52
53
53
export const updateSession = async ( newSession ) => {
54
+ newSession . updatedAt = new Date ( ) . toISOString ( )
54
55
const currentSessions = await getSessions ( )
55
56
currentSessions [
56
57
currentSessions . findIndex ( ( session ) => session . sessionId === newSession . sessionId )
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ import { v4 as uuidv4 } from 'uuid'
7
7
* @property {Object[]|null } conversationRecords
8
8
* @property {string|null } sessionName
9
9
* @property {string|null } sessionId
10
+ * @property {string|null } createdAt
11
+ * @property {string|null } updatedAt
10
12
* @property {string|null } aiName
11
13
* @property {string|null } modelName
12
14
* @property {boolean|null } autoClean
@@ -45,6 +47,8 @@ export function initSession({
45
47
46
48
sessionName,
47
49
sessionId : uuidv4 ( ) ,
50
+ createdAt : new Date ( ) . toISOString ( ) ,
51
+ updatedAt : new Date ( ) . toISOString ( ) ,
48
52
49
53
aiName : modelName ? Models [ modelName ] . desc : null ,
50
54
modelName,
You can’t perform that action at this time.
0 commit comments