Show persistent timestamps for operation and teacher messages

This commit is contained in:
鲨鱼辣椒
2026-09-29 18:02:54 +08:00
parent 3a175101c9
commit ead3407890
24 changed files with 355 additions and 9 deletions

View File

@@ -1,3 +1,4 @@
import { messageTimestamp } from '../../../shared/message-timestamp';
import type {
CodingRuntimeErrorCode,
ConversationContentBlock,
@@ -235,6 +236,10 @@ async function projectEntries(
id: messageId,
sourceEntryId: entry.id,
role: message.role,
// Pi appends the entry on message_end; assistant.message.timestamp is its start time.
timestamp: message.role === 'user'
? messageTimestamp(message.timestamp) ?? messageTimestamp(entry.timestamp)
: messageTimestamp(entry.timestamp),
status: message.stopReason === 'aborted'
? 'aborted'
: message.stopReason === 'error' ? 'error' : 'complete',