🐛 Bug: UseAgentUpdate enum is not exported, causing TypeScript errors
♻️ Reproduction Steps
- Use
useAgent with updates parameter:
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/react@0.0.22
├── @copilotkitnext/runtime@0.0.22
📄 Logs (Optional)
Type '"OnStateChanged"' is not assignable to type 'UseAgentUpdate'.
Fix: Export UseAgentUpdate enum from @copilotkitnext/react.
🐛 Bug:
UseAgentUpdateenum is not exported, causing TypeScript errors♻️ Reproduction Steps
useAgentwithupdatesparameter:Type '"OnStateChanged"' is not assignable to type 'UseAgentUpdate'.✅ Expected Behavior
The
UseAgentUpdateenum should be exported and usable: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 anyworkaround:𝌚 CopilotKit Version
📄 Logs (Optional)
Fix: Export
UseAgentUpdateenum from@copilotkitnext/react.