-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: update artifact component #1007
base: main
Are you sure you want to change the base?
feat: update artifact component #1007
Conversation
@wonderwhy-er @thecodacus @mrsimpson Take a look to see if everything is ok! |
const actions = useStore( | ||
computed(artifact.runner.actions, (actions) => { | ||
computed(artifact?.runner?.actions ?? [], (actions) => { | ||
return Object.values(actions); | ||
}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think you can remove this check
// Early return if no artifact exists
if (!artifact) {
return null;
}
since you are already null checking in line 42
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and add a block before the return statement, otherwise react will not like it when the hooks are being called inconsistently
// Early return if no artifact exists
if (!artifact) {
return <></>;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try here, I don't know anything about programming hahaha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this part itself generates several problems, what do you think I should do?
// Early return if no artifact exists
if (!artifact) {
return null;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made the changes see if this works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it and it gave me the error below, that's what I'm talking about, the way I did it works perfectly but when I modify or remove it, another error is generated.
TypeError: Cannot convert undefined or null to object
at Object.values ()
at http://localhost:5174/app/components/chat/Artifact.tsx:36:19
at set (http://localhost:5174/node_modules/.vite/deps/chunk-SSLESP6V.js?v=50f5e49b:312:19)
at http://localhost:5174/node_modules/.vite/deps/chunk-SSLESP6V.js?v=50f5e49b:332:5
at listener (http://localhost:5174/node_modules/.vite/deps/chunk-SSLESP6V.js?v=50f5e49b:264:19)
at object.events..reduceRight.shared (http://localhost:5174/node_modules/.vite/deps/chunk-SSLESP6V.js?v=50f5e49b:174:58)
at Array.reduceRight ()
at http://localhost:5174/node_modules/.vite/deps/chunk-SSLESP6V.js?v=50f5e49b:174:31
at $store.listen (http://localhost:5174/node_modules/.vite/deps/chunk-SSLESP6V.js?v=50f5e49b:272:9)
at Object.get (http://localhost:5174/node_modules/.vite/deps/chunk-SSLESP6V.js?v=50f5e49b:77:15)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the console error:
4 Artifact.tsx:38 Uncaught TypeError: Cannot convert undefined or null to object
at Object.values ()
at Artifact.tsx:38:21
at set (chunk-SSLESP6V.js?v=50f5e49b:312:19)
at chunk-SSLESP6V.js?v=50f5e49b:332:5
at listener (chunk-SSLESP6V.js?v=50f5e49b:264:19)
at object.events..reduceRight.shared (chunk-SSLESP6V.js?v=50f5e49b:174:58)
at Array.reduceRight ()
at chunk-SSLESP6V.js?v=50f5e49b:174:31
at $store.listen (chunk-SSLESP6V.js?v=50f5e49b:272:9)
at Object.get (chunk-SSLESP6V.js?v=50f5e49b:77:15)
(anônimo) @ Artifact.tsx:38
set @ chunk-SSLESP6V.js?v=50f5e49b:312
(anônimo) @ chunk-SSLESP6V.js?v=50f5e49b:332
listener @ chunk-SSLESP6V.js?v=50f5e49b:264
object.events..reduceRight.shared @ chunk-SSLESP6V.js?v=50f5e49b:174
(anônimo) @ chunk-SSLESP6V.js?v=50f5e49b:174
$store.listen @ chunk-SSLESP6V.js?v=50f5e49b:272
get @ chunk-SSLESP6V.js?v=50f5e49b:77
mountSyncExternalStore @ chunk-RMBP4JJR.js?v=50f5e49b:18764
useSyncExternalStore @ chunk-RMBP4JJR.js?v=50f5e49b:19451
useSyncExternalStore @ chunk-MMYKBDYJ.js?v=50f5e49b:1405
useStore @ @nanostores_react.js?v=50f5e49b:32
(anônimo) @ Artifact.tsx:36
renderWithHooks @ chunk-RMBP4JJR.js?v=50f5e49b:18426
updateFunctionComponent @ chunk-RMBP4JJR.js?v=50f5e49b:21460
updateSimpleMemoComponent @ chunk-RMBP4JJR.js?v=50f5e49b:21341
updateMemoComponent @ chunk-RMBP4JJR.js?v=50f5e49b:21244
beginWork @ chunk-RMBP4JJR.js?v=50f5e49b:22855
callCallback2 @ chunk-RMBP4JJR.js?v=50f5e49b:10552
invokeGuardedCallbackDev @ chunk-RMBP4JJR.js?v=50f5e49b:10577
invokeGuardedCallback @ chunk-RMBP4JJR.js?v=50f5e49b:10611
beginWork$1 @ chunk-RMBP4JJR.js?v=50f5e49b:26643
performUnitOfWork @ chunk-RMBP4JJR.js?v=50f5e49b:26076
workLoopSync @ chunk-RMBP4JJR.js?v=50f5e49b:26015
renderRootSync @ chunk-RMBP4JJR.js?v=50f5e49b:25994
recoverFromConcurrentError @ chunk-RMBP4JJR.js?v=50f5e49b:25614
performConcurrentWorkOnRoot @ chunk-RMBP4JJR.js?v=50f5e49b:25562
workLoop @ chunk-RMBP4JJR.js?v=50f5e49b:462
flushWork @ chunk-RMBP4JJR.js?v=50f5e49b:441
performWorkUntilDeadline @ chunk-RMBP4JJR.js?v=50f5e49b:649Entenda o erroAI
chunk-SCWIOAUD.js?v=50f5e49b:2942 TypeError: Cannot convert undefined or null to object
at Object.values ()
at Artifact.tsx:38:21
at set (chunk-SSLESP6V.js?v=50f5e49b:312:19)
at chunk-SSLESP6V.js?v=50f5e49b:332:5
at listener (chunk-SSLESP6V.js?v=50f5e49b:264:19)
at object.events..reduceRight.shared (chunk-SSLESP6V.js?v=50f5e49b:174:58)
at Array.reduceRight ()
at chunk-SSLESP6V.js?v=50f5e49b:174:31
at $store.listen (chunk-SSLESP6V.js?v=50f5e49b:272:9)
at Object.get (chunk-SSLESP6V.js?v=50f5e49b:77:15)
RemixRootDefaultErrorBoundary @ chunk-SCWIOAUD.js?v=50f5e49b:2942
renderWithHooks @ chunk-RMBP4JJR.js?v=50f5e49b:18426
mountIndeterminateComponent @ chunk-RMBP4JJR.js?v=50f5e49b:21804
beginWork @ chunk-RMBP4JJR.js?v=50f5e49b:22792
beginWork$1 @ chunk-RMBP4JJR.js?v=50f5e49b:26631
performUnitOfWork @ chunk-RMBP4JJR.js?v=50f5e49b:26076
workLoopSync @ chunk-RMBP4JJR.js?v=50f5e49b:26015
renderRootSync @ chunk-RMBP4JJR.js?v=50f5e49b:25994
recoverFromConcurrentError @ chunk-RMBP4JJR.js?v=50f5e49b:25614
performConcurrentWorkOnRoot @ chunk-RMBP4JJR.js?v=50f5e49b:25562
workLoop @ chunk-RMBP4JJR.js?v=50f5e49b:462
flushWork @ chunk-RMBP4JJR.js?v=50f5e49b:441
performWorkUntilDeadline @ chunk-RMBP4JJR.js?v=50f5e49b:649Entenda o erroAI
chunk-RMBP4JJR.js?v=50f5e49b:20910 The above error occurred in one of your React components:
at http://localhost:5174/app/components/chat/Artifact.tsx:27:3
at div (http://localhost:5174/app/components/chat/Markdown.tsx:27:9)
at div
at div (http://localhost:5174/app/components/chat/Markdown.tsx:27:9)
at div
at div (http://localhost:5174/app/components/chat/Markdown.tsx:27:9)
at Markdown (http://localhost:5174/node_modules/.vite/deps/react-markdown.js?v=50f5e49b:5840:35)
at http://localhost:5174/app/components/chat/Markdown.tsx:18:3
at div
at _c (http://localhost:5174/app/components/chat/AssistantMessage.tsx:11:3)
at div
at div
at div
at http://localhost:5174/app/components/chat/Messages.client.tsx:21:5
at ClientOnly (http://localhost:5174/node_modules/.vite/deps/remix-utils_client-only.js?v=50f5e49b:38:23)
at div
at div
at div
at div
at Provider (http://localhost:5174/node_modules/.vite/deps/chunk-6KZQL2HW.js?v=50f5e49b:86:15)
at TooltipProvider (http://localhost:5174/node_modules/.vite/deps/@radix-ui_react-tooltip.js?v=50f5e49b:98:5)
at http://localhost:5174/app/components/chat/BaseChat.tsx:36:3
at http://localhost:5174/app/components/chat/Chat.client.tsx:138:16
at Chat (http://localhost:5174/app/components/chat/Chat.client.tsx:43:7)
at ClientOnly (http://localhost:5174/node_modules/.vite/deps/remix-utils_client-only.js?v=50f5e49b:38:23)
at div
at Index
at RenderedRoute (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:413:5)
at Outlet (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:781:26)
at Layout (http://localhost:5174/app/root.tsx:99:3)
at App (http://localhost:5174/app/root.tsx:129:17)
at Layout (http://localhost:5174/app/root.tsx:99:3)
at RenderedRoute (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:413:5)
at RenderErrorBoundary (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:373:5)
at DataRoutes (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:1435:5)
at Router (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:788:15)
at RouterProvider (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:1249:5)
at RemixErrorBoundary (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:2904:5)
at RemixBrowser (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:4458:46)
React will try to recreate this component tree from scratch using the error boundary you provided, RenderErrorBoundary.
logCapturedError @ chunk-RMBP4JJR.js?v=50f5e49b:20910
callback @ chunk-RMBP4JJR.js?v=50f5e49b:20956
callCallback @ chunk-RMBP4JJR.js?v=50f5e49b:18126
commitUpdateQueue @ chunk-RMBP4JJR.js?v=50f5e49b:18143
commitLayoutEffectOnFiber @ chunk-RMBP4JJR.js?v=50f5e49b:23953
commitLayoutMountEffects_complete @ chunk-RMBP4JJR.js?v=50f5e49b:24858
commitLayoutEffects_begin @ chunk-RMBP4JJR.js?v=50f5e49b:24847
commitLayoutEffects @ chunk-RMBP4JJR.js?v=50f5e49b:24798
commitRootImpl @ chunk-RMBP4JJR.js?v=50f5e49b:26231
commitRoot @ chunk-RMBP4JJR.js?v=50f5e49b:26155
finishConcurrentRender @ chunk-RMBP4JJR.js?v=50f5e49b:25638
performConcurrentWorkOnRoot @ chunk-RMBP4JJR.js?v=50f5e49b:25596
workLoop @ chunk-RMBP4JJR.js?v=50f5e49b:462
flushWork @ chunk-RMBP4JJR.js?v=50f5e49b:441
performWorkUntilDeadline @ chunk-RMBP4JJR.js?v=50f5e49b:649Entenda o erroAI
chunk-SCWIOAUD.js?v=50f5e49b:400 React Router caught the following error during render TypeError: Cannot convert undefined or null to object
at Object.values ()
at Artifact.tsx:38:21
at set (chunk-SSLESP6V.js?v=50f5e49b:312:19)
at chunk-SSLESP6V.js?v=50f5e49b:332:5
at listener (chunk-SSLESP6V.js?v=50f5e49b:264:19)
at object.events..reduceRight.shared (chunk-SSLESP6V.js?v=50f5e49b:174:58)
at Array.reduceRight ()
at chunk-SSLESP6V.js?v=50f5e49b:174:31
at $store.listen (chunk-SSLESP6V.js?v=50f5e49b:272:9)
at Object.get (chunk-SSLESP6V.js?v=50f5e49b:77:15) {componentStack: '\n at http://localhost:5174/app/components/chat/…/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:4458:46)'}
componentDidCatch @ chunk-SCWIOAUD.js?v=50f5e49b:400
callback @ chunk-RMBP4JJR.js?v=50f5e49b:20962
callCallback @ chunk-RMBP4JJR.js?v=50f5e49b:18126
commitUpdateQueue @ chunk-RMBP4JJR.js?v=50f5e49b:18143
commitLayoutEffectOnFiber @ chunk-RMBP4JJR.js?v=50f5e49b:23953
commitLayoutMountEffects_complete @ chunk-RMBP4JJR.js?v=50f5e49b:24858
commitLayoutEffects_begin @ chunk-RMBP4JJR.js?v=50f5e49b:24847
commitLayoutEffects @ chunk-RMBP4JJR.js?v=50f5e49b:24798
commitRootImpl @ chunk-RMBP4JJR.js?v=50f5e49b:26231
commitRoot @ chunk-RMBP4JJR.js?v=50f5e49b:26155
finishConcurrentRender @ chunk-RMBP4JJR.js?v=50f5e49b:25638
performConcurrentWorkOnRoot @ chunk-RMBP4JJR.js?v=50f5e49b:25596
workLoop @ chunk-RMBP4JJR.js?v=50f5e49b:462
flushWork @ chunk-RMBP4JJR.js?v=50f5e49b:441
performWorkUntilDeadline @ chunk-RMBP4JJR.js?v=50f5e49b:649Entenda o erroAI
chunk-RMBP4JJR.js?v=50f5e49b:20910 The above error occurred in one of your React components:
at http://localhost:5174/app/components/chat/Artifact.tsx:27:3
at div (http://localhost:5174/app/components/chat/Markdown.tsx:27:9)
at div
at div (http://localhost:5174/app/components/chat/Markdown.tsx:27:9)
at div
at div (http://localhost:5174/app/components/chat/Markdown.tsx:27:9)
at Markdown (http://localhost:5174/node_modules/.vite/deps/react-markdown.js?v=50f5e49b:5840:35)
at http://localhost:5174/app/components/chat/Markdown.tsx:18:3
at div
at _c (http://localhost:5174/app/components/chat/AssistantMessage.tsx:11:3)
at div
at div
at div
at http://localhost:5174/app/components/chat/Messages.client.tsx:21:5
at ClientOnly (http://localhost:5174/node_modules/.vite/deps/remix-utils_client-only.js?v=50f5e49b:38:23)
at div
at div
at div
at div
at Provider (http://localhost:5174/node_modules/.vite/deps/chunk-6KZQL2HW.js?v=50f5e49b:86:15)
at TooltipProvider (http://localhost:5174/node_modules/.vite/deps/@radix-ui_react-tooltip.js?v=50f5e49b:98:5)
at http://localhost:5174/app/components/chat/BaseChat.tsx:36:3
at http://localhost:5174/app/components/chat/Chat.client.tsx:138:16
at Chat (http://localhost:5174/app/components/chat/Chat.client.tsx:43:7)
at ClientOnly (http://localhost:5174/node_modules/.vite/deps/remix-utils_client-only.js?v=50f5e49b:38:23)
at div
at Index
at RenderedRoute (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:413:5)
at Outlet (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:781:26)
at Layout (http://localhost:5174/app/root.tsx:99:3)
at App (http://localhost:5174/app/root.tsx:129:17)
at Layout (http://localhost:5174/app/root.tsx:99:3)
at RenderedRoute (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:413:5)
at RenderErrorBoundary (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:373:5)
at DataRoutes (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:1435:5)
at Router (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:788:15)
at RouterProvider (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:1249:5)
at RemixErrorBoundary (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:2904:5)
at RemixBrowser (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:4458:46)
React will try to recreate this component tree from scratch using the error boundary you provided, RenderErrorBoundary.
logCapturedError @ chunk-RMBP4JJR.js?v=50f5e49b:20910
callback @ chunk-RMBP4JJR.js?v=50f5e49b:20956
callCallback @ chunk-RMBP4JJR.js?v=50f5e49b:18126
commitUpdateQueue @ chunk-RMBP4JJR.js?v=50f5e49b:18143
commitLayoutEffectOnFiber @ chunk-RMBP4JJR.js?v=50f5e49b:23953
commitLayoutMountEffects_complete @ chunk-RMBP4JJR.js?v=50f5e49b:24858
commitLayoutEffects_begin @ chunk-RMBP4JJR.js?v=50f5e49b:24847
commitLayoutEffects @ chunk-RMBP4JJR.js?v=50f5e49b:24798
commitRootImpl @ chunk-RMBP4JJR.js?v=50f5e49b:26231
commitRoot @ chunk-RMBP4JJR.js?v=50f5e49b:26155
finishConcurrentRender @ chunk-RMBP4JJR.js?v=50f5e49b:25638
performConcurrentWorkOnRoot @ chunk-RMBP4JJR.js?v=50f5e49b:25596
workLoop @ chunk-RMBP4JJR.js?v=50f5e49b:462
flushWork @ chunk-RMBP4JJR.js?v=50f5e49b:441
performWorkUntilDeadline @ chunk-RMBP4JJR.js?v=50f5e49b:649Entenda o erroAI
chunk-SCWIOAUD.js?v=50f5e49b:400 React Router caught the following error during render TypeError: Cannot convert undefined or null to object
at Object.values ()
at Artifact.tsx:38:21
at set (chunk-SSLESP6V.js?v=50f5e49b:312:19)
at chunk-SSLESP6V.js?v=50f5e49b:332:5
at listener (chunk-SSLESP6V.js?v=50f5e49b:264:19)
at object.events..reduceRight.shared (chunk-SSLESP6V.js?v=50f5e49b:174:58)
at Array.reduceRight ()
at chunk-SSLESP6V.js?v=50f5e49b:174:31
at $store.listen (chunk-SSLESP6V.js?v=50f5e49b:272:9)
at Object.get (chunk-SSLESP6V.js?v=50f5e49b:77:15) {componentStack: '\n at http://localhost:5174/app/components/chat/…/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:4458:46)'}
componentDidCatch @ chunk-SCWIOAUD.js?v=50f5e49b:400
callback @ chunk-RMBP4JJR.js?v=50f5e49b:20962
callCallback @ chunk-RMBP4JJR.js?v=50f5e49b:18126
commitUpdateQueue @ chunk-RMBP4JJR.js?v=50f5e49b:18143
commitLayoutEffectOnFiber @ chunk-RMBP4JJR.js?v=50f5e49b:23953
commitLayoutMountEffects_complete @ chunk-RMBP4JJR.js?v=50f5e49b:24858
commitLayoutEffects_begin @ chunk-RMBP4JJR.js?v=50f5e49b:24847
commitLayoutEffects @ chunk-RMBP4JJR.js?v=50f5e49b:24798
commitRootImpl @ chunk-RMBP4JJR.js?v=50f5e49b:26231
commitRoot @ chunk-RMBP4JJR.js?v=50f5e49b:26155
finishConcurrentRender @ chunk-RMBP4JJR.js?v=50f5e49b:25638
performConcurrentWorkOnRoot @ chunk-RMBP4JJR.js?v=50f5e49b:25596
workLoop @ chunk-RMBP4JJR.js?v=50f5e49b:462
flushWork @ chunk-RMBP4JJR.js?v=50f5e49b:441
performWorkUntilDeadline @ chunk-RMBP4JJR.js?v=50f5e49b:649Entenda o erroAI
chunk-RMBP4JJR.js?v=50f5e49b:20910 The above error occurred in one of your React components:
at http://localhost:5174/app/components/chat/Artifact.tsx:27:3
at div (http://localhost:5174/app/components/chat/Markdown.tsx:27:9)
at div
at div (http://localhost:5174/app/components/chat/Markdown.tsx:27:9)
at div
at div (http://localhost:5174/app/components/chat/Markdown.tsx:27:9)
at Markdown (http://localhost:5174/node_modules/.vite/deps/react-markdown.js?v=50f5e49b:5840:35)
at http://localhost:5174/app/components/chat/Markdown.tsx:18:3
at div
at _c (http://localhost:5174/app/components/chat/AssistantMessage.tsx:11:3)
at div
at div
at div
at http://localhost:5174/app/components/chat/Messages.client.tsx:21:5
at ClientOnly (http://localhost:5174/node_modules/.vite/deps/remix-utils_client-only.js?v=50f5e49b:38:23)
at div
at div
at div
at div
at Provider (http://localhost:5174/node_modules/.vite/deps/chunk-6KZQL2HW.js?v=50f5e49b:86:15)
at TooltipProvider (http://localhost:5174/node_modules/.vite/deps/@radix-ui_react-tooltip.js?v=50f5e49b:98:5)
at http://localhost:5174/app/components/chat/BaseChat.tsx:36:3
at http://localhost:5174/app/components/chat/Chat.client.tsx:138:16
at Chat (http://localhost:5174/app/components/chat/Chat.client.tsx:43:7)
at ClientOnly (http://localhost:5174/node_modules/.vite/deps/remix-utils_client-only.js?v=50f5e49b:38:23)
at div
at Index
at RenderedRoute (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:413:5)
at Outlet (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:781:26)
at Layout (http://localhost:5174/app/root.tsx:99:3)
at App (http://localhost:5174/app/root.tsx:129:17)
at Layout (http://localhost:5174/app/root.tsx:99:3)
at RenderedRoute (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:413:5)
at RenderErrorBoundary (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:373:5)
at DataRoutes (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:1435:5)
at Router (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:788:15)
at RouterProvider (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:1249:5)
at RemixErrorBoundary (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:2904:5)
at RemixBrowser (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:4458:46)
React will try to recreate this component tree from scratch using the error boundary you provided, RenderErrorBoundary.
logCapturedError @ chunk-RMBP4JJR.js?v=50f5e49b:20910
callback @ chunk-RMBP4JJR.js?v=50f5e49b:20956
callCallback @ chunk-RMBP4JJR.js?v=50f5e49b:18126
commitUpdateQueue @ chunk-RMBP4JJR.js?v=50f5e49b:18143
commitLayoutEffectOnFiber @ chunk-RMBP4JJR.js?v=50f5e49b:23953
commitLayoutMountEffects_complete @ chunk-RMBP4JJR.js?v=50f5e49b:24858
commitLayoutEffects_begin @ chunk-RMBP4JJR.js?v=50f5e49b:24847
commitLayoutEffects @ chunk-RMBP4JJR.js?v=50f5e49b:24798
commitRootImpl @ chunk-RMBP4JJR.js?v=50f5e49b:26231
commitRoot @ chunk-RMBP4JJR.js?v=50f5e49b:26155
finishConcurrentRender @ chunk-RMBP4JJR.js?v=50f5e49b:25638
performConcurrentWorkOnRoot @ chunk-RMBP4JJR.js?v=50f5e49b:25596
workLoop @ chunk-RMBP4JJR.js?v=50f5e49b:462
flushWork @ chunk-RMBP4JJR.js?v=50f5e49b:441
performWorkUntilDeadline @ chunk-RMBP4JJR.js?v=50f5e49b:649Entenda o erroAI
chunk-SCWIOAUD.js?v=50f5e49b:400 React Router caught the following error during render TypeError: Cannot convert undefined or null to object
at Object.values ()
at Artifact.tsx:38:21
at set (chunk-SSLESP6V.js?v=50f5e49b:312:19)
at chunk-SSLESP6V.js?v=50f5e49b:332:5
at listener (chunk-SSLESP6V.js?v=50f5e49b:264:19)
at object.events..reduceRight.shared (chunk-SSLESP6V.js?v=50f5e49b:174:58)
at Array.reduceRight ()
at chunk-SSLESP6V.js?v=50f5e49b:174:31
at $store.listen (chunk-SSLESP6V.js?v=50f5e49b:272:9)
at Object.get (chunk-SSLESP6V.js?v=50f5e49b:77:15) {componentStack: '\n at http://localhost:5174/app/components/chat/…/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:4458:46)'}
componentDidCatch @ chunk-SCWIOAUD.js?v=50f5e49b:400
callback @ chunk-RMBP4JJR.js?v=50f5e49b:20962
callCallback @ chunk-RMBP4JJR.js?v=50f5e49b:18126
commitUpdateQueue @ chunk-RMBP4JJR.js?v=50f5e49b:18143
commitLayoutEffectOnFiber @ chunk-RMBP4JJR.js?v=50f5e49b:23953
commitLayoutMountEffects_complete @ chunk-RMBP4JJR.js?v=50f5e49b:24858
commitLayoutEffects_begin @ chunk-RMBP4JJR.js?v=50f5e49b:24847
commitLayoutEffects @ chunk-RMBP4JJR.js?v=50f5e49b:24798
commitRootImpl @ chunk-RMBP4JJR.js?v=50f5e49b:26231
commitRoot @ chunk-RMBP4JJR.js?v=50f5e49b:26155
finishConcurrentRender @ chunk-RMBP4JJR.js?v=50f5e49b:25638
performConcurrentWorkOnRoot @ chunk-RMBP4JJR.js?v=50f5e49b:25596
workLoop @ chunk-RMBP4JJR.js?v=50f5e49b:462
flushWork @ chunk-RMBP4JJR.js?v=50f5e49b:441
performWorkUntilDeadline @ chunk-RMBP4JJR.js?v=50f5e49b:649Entenda o erroAI
chunk-RMBP4JJR.js?v=50f5e49b:20910 The above error occurred in one of your React components:
at http://localhost:5174/app/components/chat/Artifact.tsx:27:3
at div (http://localhost:5174/app/components/chat/Markdown.tsx:27:9)
at li
at ul
at div
at div (http://localhost:5174/app/components/chat/Markdown.tsx:27:9)
at div
at div (http://localhost:5174/app/components/chat/Markdown.tsx:27:9)
at Markdown (http://localhost:5174/node_modules/.vite/deps/react-markdown.js?v=50f5e49b:5840:35)
at http://localhost:5174/app/components/chat/Markdown.tsx:18:3
at div
at _c (http://localhost:5174/app/components/chat/AssistantMessage.tsx:11:3)
at div
at div
at div
at http://localhost:5174/app/components/chat/Messages.client.tsx:21:5
at ClientOnly (http://localhost:5174/node_modules/.vite/deps/remix-utils_client-only.js?v=50f5e49b:38:23)
at div
at div
at div
at div
at Provider (http://localhost:5174/node_modules/.vite/deps/chunk-6KZQL2HW.js?v=50f5e49b:86:15)
at TooltipProvider (http://localhost:5174/node_modules/.vite/deps/@radix-ui_react-tooltip.js?v=50f5e49b:98:5)
at http://localhost:5174/app/components/chat/BaseChat.tsx:36:3
at http://localhost:5174/app/components/chat/Chat.client.tsx:138:16
at Chat (http://localhost:5174/app/components/chat/Chat.client.tsx:43:7)
at ClientOnly (http://localhost:5174/node_modules/.vite/deps/remix-utils_client-only.js?v=50f5e49b:38:23)
at div
at Index
at RenderedRoute (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:413:5)
at Outlet (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:781:26)
at Layout (http://localhost:5174/app/root.tsx:99:3)
at App (http://localhost:5174/app/root.tsx:129:17)
at Layout (http://localhost:5174/app/root.tsx:99:3)
at RenderedRoute (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:413:5)
at RenderErrorBoundary (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:373:5)
at DataRoutes (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:1435:5)
at Router (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:788:15)
at RouterProvider (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:1249:5)
at RemixErrorBoundary (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:2904:5)
at RemixBrowser (http://localhost:5174/node_modules/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:4458:46)
React will try to recreate this component tree from scratch using the error boundary you provided, RenderErrorBoundary.
logCapturedError @ chunk-RMBP4JJR.js?v=50f5e49b:20910
callback @ chunk-RMBP4JJR.js?v=50f5e49b:20956
callCallback @ chunk-RMBP4JJR.js?v=50f5e49b:18126
commitUpdateQueue @ chunk-RMBP4JJR.js?v=50f5e49b:18143
commitLayoutEffectOnFiber @ chunk-RMBP4JJR.js?v=50f5e49b:23953
commitLayoutMountEffects_complete @ chunk-RMBP4JJR.js?v=50f5e49b:24858
commitLayoutEffects_begin @ chunk-RMBP4JJR.js?v=50f5e49b:24847
commitLayoutEffects @ chunk-RMBP4JJR.js?v=50f5e49b:24798
commitRootImpl @ chunk-RMBP4JJR.js?v=50f5e49b:26231
commitRoot @ chunk-RMBP4JJR.js?v=50f5e49b:26155
finishConcurrentRender @ chunk-RMBP4JJR.js?v=50f5e49b:25638
performConcurrentWorkOnRoot @ chunk-RMBP4JJR.js?v=50f5e49b:25596
workLoop @ chunk-RMBP4JJR.js?v=50f5e49b:462
flushWork @ chunk-RMBP4JJR.js?v=50f5e49b:441
performWorkUntilDeadline @ chunk-RMBP4JJR.js?v=50f5e49b:649Entenda o erroAI
chunk-SCWIOAUD.js?v=50f5e49b:400 React Router caught the following error during render TypeError: Cannot convert undefined or null to object
at Object.values ()
at Artifact.tsx:38:21
at set (chunk-SSLESP6V.js?v=50f5e49b:312:19)
at chunk-SSLESP6V.js?v=50f5e49b:332:5
at listener (chunk-SSLESP6V.js?v=50f5e49b:264:19)
at object.events..reduceRight.shared (chunk-SSLESP6V.js?v=50f5e49b:174:58)
at Array.reduceRight ()
at chunk-SSLESP6V.js?v=50f5e49b:174:31
at $store.listen (chunk-SSLESP6V.js?v=50f5e49b:272:9)
at Object.get (chunk-SSLESP6V.js?v=50f5e49b:77:15) {componentStack: '\n at http://localhost:5174/app/components/chat/…/.vite/deps/chunk-SCWIOAUD.js?v=50f5e49b:4458:46)'}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it, can you try one more time
If you tell me that you are betting, I can help you try to solve the problem better, even though I don't know anything, I am very hard-working and persistent in solving problems until I solve them correctly. If you give me some tips, I would also like to learn more about programming. Thanks @thecodacus! |
the error that you pasted suggested the I am not able to replicate the issue from my side, so I am relying on you to test the changes. can you check the last change ? |
Yes, I can do it, but it will have to be tomorrow after work here it's already 5 o'clock in the morning. |
I actually got this error today when importing a github repo After git import it shows bolt ui with empty messages and then crashes |
@wonderwhy-er this is breaking cuz the url is not a .git url and the content has boltArtifact tags in it |
The problem happens regardless of whether there is .git in the link. |
you cannot import bolt.diy in bolt.diy. it wont work as of now |
@Toddyclipsgg @wonderwhy-er, raised a PR for importing bolt in bolt #1020 |
I wasn't trying to import bolt into bolt, it was just an example, the error happened with any repository link. |
And what can I help you with? @thecodacus |
You are very good man, it was perfect for me. Can I close this PR? @thecodacus |
Honestly, I don't know how to program, but I managed to fix this error below with GIT CLONE and I'm contributing to help the project's development. Who knows, maybe I'll learn from these excellent people.
Preview of the error in the video: https://www.youtube.com/watch?v=zgg0FpxraBk
Cannot read properties of undefined (reading 'runner')
at http://localhost:5173/app/components/chat/Artifact.tsx:35:46
at renderWithHooks (http://localhost:5173/node_modules/.vite/deps/chunk-RMBP4JJR.js?v=3737af0e:18426:26)
at updateFunctionComponent (http://localhost:5173/node_modules/.vite/deps/chunk-RMBP4JJR.js?v=3737af0e:21460:28)
at updateSimpleMemoComponent (http://localhost:5173/node_modules/.vite/deps/chunk-RMBP4JJR.js?v=3737af0e:21341:18)
at updateMemoComponent (http://localhost:5173/node_modules/.vite/deps/chunk-RMBP4JJR.js?v=3737af0e:21244:22)
at beginWork (http://localhost:5173/node_modules/.vite/deps/chunk-RMBP4JJR.js?v=3737af0e:22855:22)
at beginWork$1 (http://localhost:5173/node_modules/.vite/deps/chunk-RMBP4JJR.js?v=3737af0e:26631:22)
at performUnitOfWork (http://localhost:5173/node_modules/.vite/deps/chunk-RMBP4JJR.js?v=3737af0e:26076:20)
at workLoopSync (http://localhost:5173/node_modules/.vite/deps/chunk-RMBP4JJR.js?v=3737af0e:26015:13)
at renderRootSync (http://localhost:5173/node_modules/.vite/deps/chunk-RMBP4JJR.js?v=3737af0e:25994:15)