mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 19:04:37 +00:00
Add timestamp to messages
This commit is contained in:
parent
ef09efaac9
commit
55dc0b6e08
24 changed files with 388 additions and 220 deletions
|
|
@ -229,7 +229,14 @@ export class ToolMessage extends LitElement {
|
|||
|
||||
// Render tool content (renderer handles errors and styling)
|
||||
const result: ToolResultMessageType<any> | undefined = this.aborted
|
||||
? { role: "toolResult", isError: true, output: "", toolCallId: this.toolCall.id, toolName: this.toolCall.name }
|
||||
? {
|
||||
role: "toolResult",
|
||||
isError: true,
|
||||
output: "",
|
||||
toolCallId: this.toolCall.id,
|
||||
toolName: this.toolCall.name,
|
||||
timestamp: Date.now(),
|
||||
}
|
||||
: this.result;
|
||||
const renderResult = renderTool(
|
||||
toolName,
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ export class ProviderKeyInput extends LitElement {
|
|||
}
|
||||
|
||||
const context: Context = {
|
||||
messages: [{ role: "user", content: "Reply with: ok" }],
|
||||
messages: [{ role: "user", content: "Reply with: ok", timestamp: Date.now() }],
|
||||
};
|
||||
|
||||
const result = await complete(model, context, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue