mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-18 10:03:27 +00:00
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 |
||
|---|---|---|
| .. | ||
| custom-tools | ||
| hooks | ||
| tools | ||
| agent-session.ts | ||
| auth-storage.ts | ||
| bash-executor.ts | ||
| compaction.ts | ||
| export-html.ts | ||
| index.ts | ||
| messages.ts | ||
| model-registry.ts | ||
| model-resolver.ts | ||
| sdk.ts | ||
| session-manager.ts | ||
| settings-manager.ts | ||
| skills.ts | ||
| slash-commands.ts | ||
| system-prompt.ts | ||
| timings.ts | ||