mirror of
https://github.com/supabase/supabase.git
synced 2026-10-09 19:35:06 +03:00
Assistant error state (#36907)
* ui refinements * rename chat * copy * prose message styles * add icon back * fix message save * simplify empty state * update suggestions * pass through props * button styles * onboarding icons * name button * remove results * current chat name * use type * fix down arrow * error and retry --------- Co-authored-by: Alaister Young <a@alaisteryoung.com>
This commit is contained in:
1 parent
94c45c2863
commit
182986bb1d
1 file changed
+13
@@ -149,6 +149,8 @@ export const AIAssistant = ({ className }: AIAssistantProps) => {
|
||||
isLoading: isChatLoading,
|
||||
append,
|
||||
setMessages,
|
||||
error,
|
||||
reload,
|
||||
} = useChat({
|
||||
id: snap.activeChatId,
|
||||
api: useBedrockAssistant
|
||||
@@ -439,6 +441,17 @@ export const AIAssistant = ({ className }: AIAssistantProps) => {
|
||||
{hasMessages ? (
|
||||
<div className="w-full px-7 py-8 space-y-6">
|
||||
{renderedMessages}
|
||||
{error && (
|
||||
<div className="border rounded-md pl-2 pr-1 py-1 flex items-center justify-between">
|
||||
<div className="flex items-center gap-2 text-foreground-light text-sm">
|
||||
<Info size={16} />
|
||||
<p>Sorry, I'm having trouble responding right now</p>
|
||||
</div>
|
||||
<Button type="text" size="tiny" onClick={() => reload()} className="text-xs">
|
||||
Retry
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
<AnimatePresence>
|
||||
{isChatLoading && (
|
||||
<motion.div
|
||||
|
||||
Reference in new issue
Block a user