Improve system prompt docs, clean up theme/skills/hooks docs, fix toolResults type

- System prompt: clearer pointers to specific doc files
- theme.md: added thinkingXhigh, bashMode tokens, fixed Theme class methods
- skills.md: rewrote with better framing, examples, and skill repositories
- hooks.md: fixed timeout/error handling docs, added custom tool interception note
- Breaking: turn_end event toolResults changed from AppMessage[] to ToolResultMessage[]
This commit is contained in:
Mario Zechner 2025-12-17 21:27:28 +01:00
parent 5cc0126991
commit 5e5bdadbf9
8 changed files with 232 additions and 141 deletions

View file

@ -4,6 +4,7 @@ import type {
AssistantMessageEvent,
Message,
Model,
ToolResultMessage,
UserMessage,
} from "@mariozechner/pi-ai";
@ -87,7 +88,7 @@ export type AgentEvent =
| { type: "agent_end"; messages: AppMessage[] }
// Turn lifecycle - a turn is one assistant response + any tool calls/results
| { type: "turn_start" }
| { type: "turn_end"; message: AppMessage; toolResults: AppMessage[] }
| { type: "turn_end"; message: AppMessage; toolResults: ToolResultMessage[] }
// Message lifecycle - emitted for user, assistant, and toolResult messages
| { type: "message_start"; message: AppMessage }
// Only emitted for assistant messages during streaming