co-mono/packages/coding-agent/docs
Mario Zechner c8d9382aaa Move hook command execution to AgentSession.prompt()
Hook commands registered via pi.registerCommand() are now handled in
AgentSession.prompt() alongside file-based slash commands. This:

- Removes duplicate tryHandleHookCommand from interactive-mode and rpc-mode
- All modes (interactive, RPC, print) share the same command handling logic
- AgentSession._tryExecuteHookCommand() builds CommandContext using:
  - UI context from hookRunner (set by mode)
  - sessionManager, modelRegistry from AgentSession
  - sendMessage via sendHookMessage
  - exec via exported execCommand
- Handler returning string uses it as prompt, undefined returns early

Also:
- Export execCommand from hooks/runner.ts
- Add getUIContext() and getHasUI() to HookRunner
- Make HookRunner.emitError() public for error reporting
2025-12-30 22:42:18 +01:00
..
custom-tools.md Rename /clear to /new, update hook events to before_new/new 2025-12-25 04:15:10 +01:00
extension-loading.md Update extension-loading.md with install/remove/update commands 2025-12-26 20:51:15 +01:00
hooks-v2.md Fix model selector not showing models with settings.json API keys 2025-12-24 21:23:44 +01:00
hooks.md Rename /clear to /new, update hook events to before_new/new 2025-12-25 04:15:10 +01:00
rpc.md Add before/after session events with cancellation support 2025-12-22 18:18:38 +01:00
sdk.md feat(coding-agent): Add --session-dir flag for custom session directory 2025-12-25 20:27:41 +01:00
session-tree-plan.md Move hook command execution to AgentSession.prompt() 2025-12-30 22:42:18 +01:00
session-tree.md Add session version field and migrate-on-load strategy 2025-12-25 22:52:04 +01:00
session.md Add bash mode for executing shell commands 2025-12-08 22:40:32 +01:00
skills.md feat(coding-agent): add --skills CLI flag for filtering skills 2025-12-21 20:58:54 +01:00
theme.md Improve system prompt docs, clean up theme/skills/hooks docs, fix toolResults type 2025-12-17 21:27:28 +01:00