Hooks
useToolCall
Tool-call status flags for agent execution surfaces.
Installed to components/refined-ui/hooks/use-tool-call.ts with the ToolCall component. It is local UI behavior — yours to own and edit.
Source
Installed hook source
Behavior hook
src/registry/hooks/use-tool-call.ts
import type { ToolCallProps } from "../contracts";type ToolCallState = NonNullable<ToolCallProps["state"]>;function getToolCallContext(state: ToolCallState = "pending") { return { state, isPending: state === "pending", isRunning: state === "running", isSuccess: state === "success", isError: state === "error", };}export function useToolCall(state: ToolCallState = "pending") { return getToolCallContext(state);}