Improve CustomEntry docs and make it generic

- Add detailed doc comment explaining purpose (hook state persistence)
- Make CustomEntry<T = unknown> generic
- Clarify difference from CustomMessageEntry in plan
- Update changelog
This commit is contained in:
Mario Zechner 2025-12-26 21:40:09 +01:00
parent e841942377
commit efb1036d8e
3 changed files with 17 additions and 6 deletions

View file

@ -93,14 +93,14 @@ Questions to resolve:
### CustomMessageEntry<T>
Hooks can define their own custom message entry types and inject them into the session.
Hook-injected messages that participate in LLM context. Unlike `CustomEntry<T>` (for hook state only), these are sent to the model.
```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 (like tool result details)
details?: T; // Hook-specific data for state reconstruction on reload
display: boolean; // Whether to display in TUI
}
```
@ -115,6 +115,8 @@ Behavior:
- [ ] Define injection mechanism for hooks to add CustomMessageEntry
- [ ] Hook registration for custom renderers
See also: `CustomEntry<T>` for storing hook state that does NOT participate in context.
### HTML Export
- [ ] Add collapsible sidebar showing full tree structure