diff --git a/src/components/TopicDetail/TopicDetailAI.tsx b/src/components/TopicDetail/TopicDetailAI.tsx index 0b346f048..b14570e50 100644 --- a/src/components/TopicDetail/TopicDetailAI.tsx +++ b/src/components/TopicDetail/TopicDetailAI.tsx @@ -7,6 +7,7 @@ import { queryClient } from '../../stores/query-client'; import { isLoggedIn, removeAuthToken } from '../../lib/jwt'; import { BotIcon, + ChevronRightIcon, Gift, Loader2Icon, LockIcon, @@ -220,9 +221,12 @@ export function TopicDetailAI(props: TopicDetailAIProps) { tokenUsage?.used || 0, tokenUsage?.limit || 0, ); - const hasSubjects = - roadmapTreeMapping?.subjects && roadmapTreeMapping?.subjects?.length > 0; const hasChatHistory = aiChatHistory.length > 1; + const nodeTextParts = roadmapTreeMapping?.text?.split('>') || []; + const hasSubjects = + (roadmapTreeMapping?.subjects && + roadmapTreeMapping?.subjects?.length > 0) || + nodeTextParts.length > 1; return (
@@ -261,6 +265,26 @@ export function TopicDetailAI(props: TopicDetailAIProps) { ); })} + + {roadmapTreeMapping?.subjects?.length === 0 && ( + + {nodeTextParts.map((text, index) => ( + <> + + {text} + + + {index !== nodeTextParts.length - 1 && ( + + )} + + ))} + + )}
)} @@ -295,7 +319,7 @@ export function TopicDetailAI(props: TopicDetailAIProps) {
{hasChatHistory && (