mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 13:03:42 +00:00
Use CompactionResult type for hook compaction return value
- Import CompactionResult in hooks/types.ts - Replace inline type with CompactionResult for SessionEventResult.compaction - Add labels feature to changelog
This commit is contained in:
parent
9e68a59fed
commit
e841942377
3 changed files with 28 additions and 7 deletions
|
|
@ -91,6 +91,30 @@ Questions to resolve:
|
|||
- [ ] Display labels in UI (tree view, path view) - deferred to UI phase
|
||||
- [ ] `/label` command - deferred to UI phase
|
||||
|
||||
### CustomMessageEntry<T>
|
||||
|
||||
Hooks can define their own custom message entry types and inject them into the session.
|
||||
|
||||
```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)
|
||||
display: boolean; // Whether to display in TUI
|
||||
}
|
||||
```
|
||||
|
||||
Behavior:
|
||||
- [ ] Participates in context and compaction as user messages (after messageTransformer)
|
||||
- [ ] Not displayed as user messages in TUI
|
||||
- [ ] Display options:
|
||||
- `display: false` - hidden entirely
|
||||
- `display: true` - baseline renderer (content with different bg/fg color)
|
||||
- Custom renderer defined by the hook that contributes it
|
||||
- [ ] Define injection mechanism for hooks to add CustomMessageEntry
|
||||
- [ ] Hook registration for custom renderers
|
||||
|
||||
### HTML Export
|
||||
|
||||
- [ ] Add collapsible sidebar showing full tree structure
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue