hunk.code_window: import { useFeatureIsOn } from "@growthbook/growthbook-react";
   import { useQuery, useQueryClient } from "@tanstack/react-query";
   import { useParams } from "next/navigation";
   import { ONBOARDING_DATA_KEY } from "@/lib/api/onboarding/config";
   import { useOnboardingApi } from "@/lib/api/onboarding/useOnboardingApi";
  
hunk.labels: replace keep keep keep keep keep
hunk.file_path: frontend/lib/hooks/useOnboarding.ts
hunk.type: replace
file: import {
    FeedItemCrawlType,
    FeedItemUploadType,
  } from "@/app/chat/[chatId]/components/ActionsBar/types";
  import { useKnowledgeToFeedContext } from "@/lib/context/KnowledgeToFeedProvider/hooks/useKnowledgeToFeedContext";
  
  type UseKnowledgeToFeed = {
    files: File[];
    urls: string[];
  };
  export const useKnowledgeToFeed = (): UseKnowledgeToFeed => {
    const { knowledgeToFeed } = useKnowledgeToFeedContext();
  
    const files: File[] = (
      knowledgeToFeed.filter((c) => c.source === "upload") as FeedItemUploadType[]
    ).map((c) => c.file);
  
    const urls: string[] = (
      knowledgeToFeed.filter((c) => c.source === "crawl") as FeedItemCrawlType[]
    ).map((c) => c.url);
  
    return {
      files,
      urls,
    };
  };
  