mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 19:05:11 +00:00
Add CustomMessageEntry for hook-injected messages in LLM context
- CustomMessageEntry<T> type with customType, content, display, details - appendCustomMessageEntry() in SessionManager - buildSessionContext() includes custom_message entries as user messages - Exported CustomEntry and CustomMessageEntry from main index CustomEntry is for hook state (not in context). CustomMessageEntry is for hook-injected content (in context).
This commit is contained in:
parent
9bba388ec5
commit
9da36e5ac6
4 changed files with 100 additions and 11 deletions
|
|
@ -118,14 +118,14 @@ export interface CustomMessageEntry<T = unknown> extends SessionEntryBase {
|
|||
```
|
||||
|
||||
Behavior:
|
||||
- [ ] Participates in context and compaction as user messages (after messageTransformer)
|
||||
- [ ] Not displayed as user messages in TUI
|
||||
- [ ] Display options:
|
||||
- [x] Type definition matching plan
|
||||
- [x] `appendCustomMessageEntry(customType, content, display, details?)` in SessionManager
|
||||
- [x] `buildSessionContext()` includes custom_message entries as user messages
|
||||
- [x] Exported from main index
|
||||
- [ ] TUI rendering:
|
||||
- `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
|
||||
- Custom renderer defined by the hook that contributes it (future)
|
||||
|
||||
See also: `CustomEntry<T>` for storing hook state that does NOT participate in context.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue