Add timestamp to messages
This commit is contained in:
@@ -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, {
|
||||
|
||||
Reference in New Issue
Block a user