( content: string | ContentBlock[], )
| 34 | } |
| 35 | |
| 36 | export function getSystemMessage( |
| 37 | content: string | ContentBlock[], |
| 38 | ): ChatMessage { |
| 39 | return { |
| 40 | id: `sys-${Date.now()}`, |
| 41 | variant: 'ai' as const, |
| 42 | ...(typeof content === 'string' |
| 43 | ? { |
| 44 | content, |
| 45 | } |
| 46 | : { |
| 47 | content: '', |
| 48 | blocks: content, |
| 49 | }), |
| 50 | timestamp: formatTimestamp(), |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * Get the message history file path |
no test coverage detected