summaryrefslogtreecommitdiffhomepage
path: root/js/src/session
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/session')
-rw-r--r--js/src/session/session.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/js/src/session/session.ts b/js/src/session/session.ts
index cbe6cd89c..8b3f7fba1 100644
--- a/js/src/session/session.ts
+++ b/js/src/session/session.ts
@@ -42,6 +42,7 @@ export namespace Session {
export type Message = UIMessage<{
time: {
created: number;
+ completed?: number;
};
sessionID: string;
tool: Record<string, Tool.Metadata>;
@@ -305,6 +306,8 @@ export namespace Session {
}
await write(next);
}
+ next.metadata!.time.completed = Date.now();
+ await write(next);
return next;
}
}