-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
π Bug: UseAgentUpdate enum is not exported, causing TypeScript errors
β»οΈ Reproduction Steps
- Use
useAgentwithupdatesparameter:const { agent } = useAgent({ agentId: 'plan', updates: ['OnStateChanged'], });
- TypeScript error:
Type '"OnStateChanged"' is not assignable to type 'UseAgentUpdate'.
β Expected Behavior
The UseAgentUpdate enum should be exported and usable:
import { useAgent, UseAgentUpdate } from '@copilotkitnext/react';
const { agent } = useAgent({
agentId: 'plan',
updates: [UseAgentUpdate.OnStateChanged],
});The enum is defined in index.d.ts (lines 498-502) but not exported (line 636).
β Actual Behavior
TypeScript error forces users to use as any workaround:
updates: ['OnStateChanged' as any];π CopilotKit Version
βββ @copilotkitnext/[email protected]
βββ @copilotkitnext/[email protected]
π Logs (Optional)
Type '"OnStateChanged"' is not assignable to type 'UseAgentUpdate'.
Fix: Export UseAgentUpdate enum from @copilotkitnext/react.
Metadata
Metadata
Assignees
Labels
No labels