Add type guards for tool_result event narrowing
- Export isBashToolResult, isReadToolResult, etc. type guards - Update hooks.md with type guard usage examples - Document custom tool handling in hooks.md
This commit is contained in:
@@ -35,7 +35,6 @@ export type {
|
||||
ToolUIContext,
|
||||
} from "./core/custom-tools/index.js";
|
||||
export { discoverAndLoadCustomTools, loadCustomTools } from "./core/custom-tools/index.js";
|
||||
// Hook system types
|
||||
export type {
|
||||
AgentEndEvent,
|
||||
AgentStartEvent,
|
||||
@@ -62,6 +61,16 @@ export type {
|
||||
TurnStartEvent,
|
||||
WriteToolResultEvent,
|
||||
} from "./core/hooks/index.js";
|
||||
// Hook system types and type guards
|
||||
export {
|
||||
isBashToolResult,
|
||||
isEditToolResult,
|
||||
isFindToolResult,
|
||||
isGrepToolResult,
|
||||
isLsToolResult,
|
||||
isReadToolResult,
|
||||
isWriteToolResult,
|
||||
} from "./core/hooks/index.js";
|
||||
export { messageTransformer } from "./core/messages.js";
|
||||
export {
|
||||
type CompactionEntry,
|
||||
|
||||
Reference in New Issue
Block a user