+ {isChatHistoryLoading && !hasError && (
+
+
- >
- )}
+ )}
+
+ {!isChatHistoryLoading && hasError && (
+
+
+
+ )}
+
+ {!isChatHistoryLoading && !hasError && (
+
{
+ setChatHistoryId(id);
+ window.history.replaceState(null, '', `/ai/chat/${id}`);
+ queryClient.invalidateQueries({
+ predicate: (query) => {
+ return query.queryKey[0] === 'list-chat-history';
+ },
+ });
+ }}
+ />
+ )}
+