mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 07:04:45 +00:00
Cleanup: unify HookMessage naming and simplify SessionContext
- Rename HookAppMessage to HookMessage, isHookAppMessage to isHookMessage - Remove entries array from SessionContext (use isHookMessage type guard instead) - HookMessage.content now accepts string directly (not just array) - Fix streamMessage type in AgentState (AppMessage, not Message) - Rename CustomMessageComponent to HookMessageComponent - Fix test hook to use pi.sendMessage
This commit is contained in:
parent
a2515cf43f
commit
204d27581b
13 changed files with 62 additions and 106 deletions
|
|
@ -11,7 +11,7 @@ export default function (pi: HookAPI) {
|
|||
const name = ctx.args.trim() || "world";
|
||||
|
||||
// Insert a custom message and trigger LLM response
|
||||
ctx.sendMessage(
|
||||
pi.sendMessage(
|
||||
{
|
||||
customType: "greeting",
|
||||
content: `Hello, ${name}! Please say something nice about them.`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue