diff --git a/apps/rowboat/app/projects/[projectId]/copilot/components/actions.tsx b/apps/rowboat/app/projects/[projectId]/copilot/components/actions.tsx index 94f8126f..62eb2237 100644 --- a/apps/rowboat/app/projects/[projectId]/copilot/components/actions.tsx +++ b/apps/rowboat/app/projects/[projectId]/copilot/components/actions.tsx @@ -1,5 +1,5 @@ 'use client'; -import { createContext, useContext, useRef, useState } from "react"; +import { createContext, useContext, useRef, useState, useEffect } from "react"; import clsx from "clsx"; import { z } from "zod"; import { CopilotAssistantMessageActionPart } from "../../../../../src/entities/models/copilot"; @@ -384,6 +384,17 @@ export function StreamingAction({ }; loading: boolean; }) { + const [loadingStage, setLoadingStage] = useState<'fetching' | 'configuring'>('fetching'); + + // After 3 seconds, switch to "configuring" stage + useEffect(() => { + const timer = setTimeout(() => { + setLoadingStage('configuring'); + }, 3000); + + return () => clearTimeout(timer); + }, []); + // Use the same card container and header style as Action return (