Add timestamp to messages

This commit is contained in:
Mario Zechner 2025-10-26 00:43:43 +02:00
parent ef09efaac9
commit 55dc0b6e08
24 changed files with 388 additions and 220 deletions

View file

@ -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,

View file

@ -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, {