diff --git a/components/core/husky/husky-ai.tsx b/components/core/husky/husky-ai.tsx index 46c6e847..92359815 100644 --- a/components/core/husky/husky-ai.tsx +++ b/components/core/husky/husky-ai.tsx @@ -55,7 +55,7 @@ function HuskyAi({ mode = 'chat', initialChats = [], isLoggedIn, blogId, onClose const chatCnRef = useRef(null); const router = useRouter(); const { trackTabSelection, trackUserPrompt, trackAnswerCopy, trackFollowupQuestionClick, trackQuestionEdit, trackRegenerate, trackCopyUrl, trackFeedbackClick, trackAiResponse } = useHuskyAnalytics(); - + const { object, isLoading: isLoadingObject, @@ -79,6 +79,10 @@ function HuskyAi({ mode = 'chat', initialChats = [], isLoggedIn, blogId, onClose }), onFinish: (data) => { console.log(data); + }, + onError: (error) => { + console.error(error); + setAnswerLoadingStatus(false); } }); @@ -324,7 +328,7 @@ function HuskyAi({ mode = 'chat', initialChats = [], isLoggedIn, blogId, onClose useEffect(() => { if (object?.content && isLoadingObject) { - + setAnswerLoadingStatus(false); setChats((prev:any) => { if (prev.length === 0) { @@ -400,7 +404,7 @@ function HuskyAi({ mode = 'chat', initialChats = [], isLoggedIn, blogId, onClose mode="chat" onCopyAnswer={onCopyAnswer} /> - {isAnswerLoading &&
} + {isAnswerLoading && }
{((activeTab === 'home' && chats.length !== 0) || activeTab === 'supported-scope') &&
diff --git a/components/core/husky/husky-chat-actions.tsx b/components/core/husky/husky-chat-actions.tsx index 375ecb62..6f0d6ad9 100644 --- a/components/core/husky/husky-chat-actions.tsx +++ b/components/core/husky/husky-chat-actions.tsx @@ -20,19 +20,37 @@ function HuskyChatActions({ actions }: HuskyChatActionsProps) {
{actions.map((action: any) => ( -
+ onActionCardClicked(action)} className="chat-actions__cn__item" key={action.directoryLink}> +
+
+

{`(${action.type})`}

+
+
+ + + ))}