Fix CustomMessageEntry content type to match UserMessage

content: string | (TextContent | ImageContent)[]

This matches the UserMessage type from pi-ai, so content can be
passed directly to AppMessage without conversion.
This commit is contained in:
Mario Zechner 2025-12-26 22:50:04 +01:00
parent 9da36e5ac6
commit 3ecaaa5937
2 changed files with 11 additions and 30 deletions

View file

@ -110,10 +110,10 @@ Hook-injected messages that participate in LLM context. Unlike `CustomEntry<T>`
```typescript
export interface CustomMessageEntry<T = unknown> extends SessionEntryBase {
type: "custom_message";
customType: string; // Hook identifier
content: (string | Attachment)[]; // Message content
details?: T; // Hook-specific data for state reconstruction on reload
display: boolean; // Whether to display in TUI
customType: string; // Hook identifier
content: string | (TextContent | ImageContent)[]; // Message content (same as UserMessage)
details?: T; // Hook-specific data for state reconstruction on reload
display: boolean; // Whether to display in TUI
}
```