UpstreetAI / upstreet-core

Build and deploy AI Agents, fast.
https://upstreet.ai
7 stars 3 forks source link

[SDK] DiscordBot is not defined when executing usdk chat with agent having Discord feature #625

Open AbdurrehmanSubhani opened 1 week ago

AbdurrehmanSubhani commented 1 week ago

Steps to Repro:

 usdk chat /Users/abdurrehmansubhani/Desktop/agents/discordAgent2 -g
npm warn Ignoring workspaces for specified package(s)
renderer crashed ReferenceError: DiscordBot is not defined
    at MyAgent (/Users/abdurrehmansubhani/Desktop/agents/discordAgent2/agent.tsx:12:8)
    at callComponentInDEV (/Users/abdurrehmansubhani/Desktop/agents/discordAgent2/node_modules/react-reconciler/cjs/react-reconciler.development.js:501:16)
    at renderWithHooks (/Users/abdurrehmansubhani/Desktop/agents/discordAgent2/node_modules/react-reconciler/cjs/react-reconciler.development.js:3842:22)
    at updateFunctionComponent (/Users/abdurrehmansubhani/Desktop/agents/discordAgent2/node_modules/react-reconciler/cjs/react-reconciler.development.js:5980:19)
    at beginWork (/Users/abdurrehmansubhani/Desktop/agents/discordAgent2/node_modules/react-reconciler/cjs/react-reconciler.development.js:7509:18)
    at runWithFiberInDEV (/Users/abdurrehmansubhani/Desktop/agents/discordAgent2/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
    at performUnitOfWork (/Users/abdurrehmansubhani/Desktop/agents/discordAgent2/node_modules/react-reconciler/cjs/react-reconciler.development.js:12436:22)
    at workLoopSync (/Users/abdurrehmansubhani/Desktop/agents/discordAgent2/node_modules/react-reconciler/cjs/react-reconciler.development.js:12272:41)
    at renderRootSync (/Users/abdurrehmansubhani/Desktop/agents/discordAgent2/node_modules/react-reconciler/cjs/react-reconciler.development.js:12250:11)
    at recoverFromConcurrentError (/Users/abdurrehmansubhani/Desktop/agents/discordAgent2/node_modules/react-reconciler/cjs/react-reconciler.development.js:11872:25) {
  componentStack: '\n' +
    '    at MyAgent (/Users/abdurrehmansubhani/Desktop/agents/discordAgent2/agent.tsx:12:8)\n' +
    '    at ErrorBoundary (/Users/abdurrehmansubhani/Desktop/agents/discordAgent2/packages/upstreet-agent/packages/react-agents/classes/agent-renderer.tsx:50:5)\n' +
    '    at AppComponent (/Users/abdurrehmansubhani/Desktop/agents/discordAgent2/packages/upstreet-agent/packages/react-agents/classes/agent-renderer.tsx:80:3)'
}
TypeError: onCaughtError is not a function
    at logCaughtError (/Users/abdurrehmansubhani/Desktop/agents/discordAgent2/node_modules/react-reconciler/cjs/react-reconciler.development.js:5458:9)
    at runWithFiberInDEV (/Users/abdurrehmansubhani/Desktop/agents/discordAgent2/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
    at inst.componentDidCatch.update.callback (/Users/abdurrehmansubhani/Desktop/agents/discordAgent2/node_modules/react-reconciler/cjs/react-reconciler.development.js:5505:11)
    at callCallback (/Users/abdurrehmansubhani/Desktop/agents/discordAgent2/node_modules/react-reconciler/cjs/react-reconciler.development.js:2452:16)
    at commitCallbacks (/Users/abdurrehmansubhani/Desktop/agents/discordAgent2/node_modules/react-reconciler/cjs/react-reconciler.development.js:2462:11)
    at commitClassCallbacks (/Users/abdurrehmansubhani/Desktop/agents/discordAgent2/node_modules/react-reconciler/cjs/react-reconciler.development.js:9507:11)
    at commitLayoutEffectOnFiber (/Users/abdurrehmansubhani/Desktop/agents/discordAgent2/node_modules/react-reconciler/cjs/react-reconciler.development.js:9679:25)
    at runWithFiberInDEV (/Users/abdurrehmansubhani/Desktop/agents/discordAgent2/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
    at recursivelyTraverseLayoutEffects (/Users/abdurrehmansubhani/Desktop/agents/discordAgent2/node_modules/react-reconciler/cjs/react-reconciler.development.js:10743:11)
    at commitLayoutEffectOnFiber (/Users/abdurrehmansubhani/Desktop/agents/discordAgent2/node_modules/react-reconciler/cjs/react-reconciler.development.js:9577:11)
^C
(base) abdurrehmansubhani@Abdurrehmans-MacBook-Pro usdk % 

Image

AbdurrehmanSubhani commented 1 week ago

Fix added in PR: https://github.com/UpstreetAI/monorepo/pull/627