Skip to content

Commit

Permalink
fix user page crshing (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincelwt authored Jun 15, 2024
1 parent 555a9b0 commit 903be0d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/frontend/components/SmartViewer/Message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,8 @@ export function ChatMessage({

// Add/remove the 'id' and 'name' props required on tool calls
useEffect(() => {
if (!data) return

// Add/remove the 'name' props required on tool calls
if (data.role === "tool" && editable && typeof data.name !== "string") {
onChange({ ...data, name: "some-tool-name" })
Expand Down

0 comments on commit 903be0d

Please sign in to comment.