@copilotkit/react-core
Version:
<img src="https://github.com/user-attachments/assets/0a6b64d9-e193-4940-a3f6-60334ac34084" alt="banner" style="border-radius: 12px; border: 2px solid #d6d4fa;" />
14 lines (12 loc) • 381 B
text/typescript
import { useCopilotAction } from "./use-copilot-action";
import { CatchAllFrontendAction } from "../types/frontend-action";
export function useDefaultTool(
tool: Omit<CatchAllFrontendAction, "name">,
dependencies?: any[],
) {
// Use the existing useCopilotAction hook
useCopilotAction(
{ ...tool, name: "*" } satisfies CatchAllFrontendAction,
dependencies,
);
}