sharktide commited on
Commit
bbd337a
·
verified ·
1 Parent(s): 6ef88a3

Update server/sessionStore.js

Browse files
Files changed (1) hide show
  1. server/sessionStore.js +4 -0
server/sessionStore.js CHANGED
@@ -53,6 +53,9 @@ function ensureSessionShape(raw, fallbackId = null) {
53
  created,
54
  history: Array.isArray(raw?.history) ? raw.history : [],
55
  model: raw?.model || null,
 
 
 
56
  };
57
  }
58
 
@@ -177,6 +180,7 @@ function sessionForList(meta, loaded) {
177
  created: Number.isFinite(source.created) ? source.created : Date.now(),
178
  history: loaded?.history || [],
179
  model: source.model || null,
 
180
  };
181
  }
182
 
 
53
  created,
54
  history: Array.isArray(raw?.history) ? raw.history : [],
55
  model: raw?.model || null,
56
+ updatedAt: typeof raw?.updatedAt === 'string' && raw.updatedAt.trim()
57
+ ? raw.updatedAt
58
+ : nowIso(),
59
  };
60
  }
61
 
 
180
  created: Number.isFinite(source.created) ? source.created : Date.now(),
181
  history: loaded?.history || [],
182
  model: source.model || null,
183
+ updatedAt: source.updatedAt || null,
184
  };
185
  }
186