Skip to content

Commit adfc138

Browse files
authored
Remove error display temporarily (supabase#37804)
1 parent 1e10ee6 commit adfc138

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

apps/studio/components/ui/AIAssistantPanel/AIAssistant.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ export const AIAssistant = ({ className }: AIAssistantProps) => {
218218
onFinish: handleChatFinish,
219219
})
220220

221-
const formattedError = tryParseJson(error?.message ?? {})
222221
const isChatLoading = chatStatus === 'submitted' || chatStatus === 'streaming'
223222

224223
const updateMessage = useCallback(
@@ -446,10 +445,6 @@ export const AIAssistant = ({ className }: AIAssistantProps) => {
446445
Sorry, I'm having trouble responding right now. If the error persists while
447446
retrying, you may try clearing the conversation's messages and try again.
448447
</p>
449-
450-
<p className="text-foreground-lighter text-xs mt-1">
451-
Error: {formattedError.message}
452-
</p>
453448
</div>
454449
</div>
455450
<div className="flex items-center gap-x-2">

apps/studio/pages/api/ai/sql/generate-v4.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ async function handlePost(req: NextApiRequest, res: NextApiResponse) {
8383
}
8484
// [Joshen] Am also filtering out any tool calls which state is "input-streaming"
8585
// this happens when a user stops the assistant response while the tool is being called
86-
if (msg && msg.role === 'assistant') {
86+
if (msg && msg.role === 'assistant' && msg.parts) {
8787
const cleanedParts = msg.parts.filter((part: any) => {
8888
return !(part.type.startsWith('tool-') && part.state === 'input-streaming')
8989
})

0 commit comments

Comments
 (0)