mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-20 19:02:10 +00:00
Add timestamp to messages
This commit is contained in:
parent
ef09efaac9
commit
55dc0b6e08
24 changed files with 388 additions and 220 deletions
|
|
@ -162,6 +162,7 @@ export class Agent {
|
|||
role: "user",
|
||||
content,
|
||||
attachments: attachments?.length ? attachments : undefined,
|
||||
timestamp: Date.now(),
|
||||
};
|
||||
|
||||
this.abortController = new AbortController();
|
||||
|
|
@ -311,6 +312,7 @@ export class Agent {
|
|||
},
|
||||
stopReason: this.abortController?.signal.aborted ? "aborted" : "error",
|
||||
errorMessage: err?.message || String(err),
|
||||
timestamp: Date.now(),
|
||||
};
|
||||
this.appendMessage(msg as AppMessage);
|
||||
this.patch({ error: err?.message || String(err) });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue