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:
Mario Zechner 2025-12-27 20:52:12 +01:00
parent a2515cf43f
commit 204d27581b
13 changed files with 62 additions and 106 deletions

View file

@ -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.`,