fix(onboarding): missing step

This commit is contained in:
songkeys
2025-11-06 12:28:02 +08:00
parent 0634a79780
commit 6f02b5142a
@@ -20,17 +20,24 @@ import { useMessages } from "../ai-chat/store/hooks"
import { SearchResultContent } from "../discover/DiscoverFeedCard"
import { FeedIcon } from "../feed/feed-icon"
import type { FeedSelection } from "./store"
import { feedSelectionAtomsAtom, selectedFeedSelectionAtomsAtom } from "./store"
import { feedSelectionAtomsAtom, selectedFeedSelectionAtomsAtom, stepAtom } from "./store"
type FeedToSelect = Omit<FeedSelection, "selected">
export function FeedsSelectionList() {
const chatMessages = useMessages()
const setStep = useSetAtom(stepAtom)
const hasFeedsSelection = chatMessages.some((msg) =>
msg.parts.some((p) => p.type === "tool-onboardingGetTrendingFeeds" && p.output),
)
useEffect(() => {
if (hasFeedsSelection) {
setStep("selecting-feeds")
}
}, [hasFeedsSelection, setStep])
return (
<div className="col-span-4 h-full overflow-hidden">
<AnimatePresence mode="popLayout">