diff --git a/apps/sim/app/workspace/[workspaceId]/files/loading.tsx b/apps/sim/app/workspace/[workspaceId]/files/loading.tsx new file mode 100644 index 00000000000..07ac2fca875 --- /dev/null +++ b/apps/sim/app/workspace/[workspaceId]/files/loading.tsx @@ -0,0 +1,55 @@ +export default function FilesLoading() { + return ( +
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {Array.from({ length: 5 }).map((_, i) => ( +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ))} +
+
+
+
+ ) +} diff --git a/apps/sim/app/workspace/[workspaceId]/home/loading.tsx b/apps/sim/app/workspace/[workspaceId]/home/loading.tsx new file mode 100644 index 00000000000..5f2ae3aedd1 --- /dev/null +++ b/apps/sim/app/workspace/[workspaceId]/home/loading.tsx @@ -0,0 +1,10 @@ +export default function HomeLoading() { + return ( +
+
+
+
+
+
+ ) +} diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/loading.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/loading.tsx new file mode 100644 index 00000000000..92bf4e25eac --- /dev/null +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/loading.tsx @@ -0,0 +1,31 @@ +export default function KnowledgeLoading() { + return ( +
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+ +
+ {Array.from({ length: 8 }).map((_, i) => ( +
+ ))} +
+
+
+
+ ) +} diff --git a/apps/sim/app/workspace/[workspaceId]/logs/loading.tsx b/apps/sim/app/workspace/[workspaceId]/logs/loading.tsx new file mode 100644 index 00000000000..c3e9e940149 --- /dev/null +++ b/apps/sim/app/workspace/[workspaceId]/logs/loading.tsx @@ -0,0 +1,43 @@ +export default function LogsLoading() { + return ( +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ {Array.from({ length: 8 }).map((_, i) => ( +
+
+
+
+
+
+
+ ))} +
+
+
+
+
+
+ ) +} diff --git a/apps/sim/app/workspace/[workspaceId]/schedules/loading.tsx b/apps/sim/app/workspace/[workspaceId]/schedules/loading.tsx new file mode 100644 index 00000000000..871b4b7a1d5 --- /dev/null +++ b/apps/sim/app/workspace/[workspaceId]/schedules/loading.tsx @@ -0,0 +1,69 @@ +export default function SchedulesLoading() { + return ( +
+
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+ {Array.from({ length: 3 }).map((_, i) => ( +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ))} +
+ +
+
+ {Array.from({ length: 2 }).map((_, i) => ( +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ))} +
+
+
+
+
+ ) +} diff --git a/apps/sim/app/workspace/[workspaceId]/settings/loading.tsx b/apps/sim/app/workspace/[workspaceId]/settings/loading.tsx new file mode 100644 index 00000000000..a17270905c5 --- /dev/null +++ b/apps/sim/app/workspace/[workspaceId]/settings/loading.tsx @@ -0,0 +1,22 @@ +export default function SettingsLoading() { + return ( +
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ) +} diff --git a/apps/sim/app/workspace/[workspaceId]/tables/loading.tsx b/apps/sim/app/workspace/[workspaceId]/tables/loading.tsx new file mode 100644 index 00000000000..bdd040f5a24 --- /dev/null +++ b/apps/sim/app/workspace/[workspaceId]/tables/loading.tsx @@ -0,0 +1,38 @@ +export default function TablesLoading() { + return ( +
+
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+ {Array.from({ length: 5 }).map((_, i) => ( +
+
+
+
+
+
+ ))} +
+
+
+
+ ) +} diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/components/chat-message/chat-message.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/components/chat-message/chat-message.tsx index a11983b0be2..ea009caa013 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/components/chat-message/chat-message.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/components/chat-message/chat-message.tsx @@ -1,5 +1,5 @@ import { useMemo } from 'react' -import { StreamingIndicator } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/components/smooth-streaming' +import { StreamingIndicator } from '@/components/ui/streaming-indicator' interface ChatAttachment { id: string diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/components/smooth-streaming/smooth-streaming.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/components/smooth-streaming/smooth-streaming.tsx index c0965808e8d..7fb72028dc4 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/components/smooth-streaming/smooth-streaming.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/components/smooth-streaming/smooth-streaming.tsx @@ -1,29 +1,9 @@ import { memo, useEffect, useRef, useState } from 'react' -import { cn } from '@/lib/core/utils/cn' import { CopilotMarkdownRenderer } from '../markdown-renderer' /** Character animation delay in milliseconds */ const CHARACTER_DELAY = 3 -/** Props for the StreamingIndicator component */ -interface StreamingIndicatorProps { - /** Optional class name for layout adjustments */ - className?: string -} - -/** Shows animated dots during message streaming when no content has arrived */ -export const StreamingIndicator = memo(({ className }: StreamingIndicatorProps) => ( -
-
-
-
-
-
-
-)) - -StreamingIndicator.displayName = 'StreamingIndicator' - /** Props for the SmoothStreamingText component */ interface SmoothStreamingTextProps { /** Content to display with streaming animation */ diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/copilot-message.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/copilot-message.tsx index 187ff159480..8c3f4705a14 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/copilot-message.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/copilot-message.tsx @@ -3,6 +3,7 @@ import { type FC, memo, useCallback, useMemo, useRef, useState } from 'react' import { RotateCcw } from 'lucide-react' import { Button } from '@/components/emcn' +import { StreamingIndicator } from '@/components/ui/streaming-indicator' import { OptionsSelector, parseSpecialTags, @@ -12,7 +13,6 @@ import { CheckpointConfirmation, FileAttachmentDisplay, SmoothStreamingText, - StreamingIndicator, ThinkingBlock, UsageLimitActions, } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/components' diff --git a/apps/sim/components/ui/streaming-indicator.tsx b/apps/sim/components/ui/streaming-indicator.tsx new file mode 100644 index 00000000000..d732baa5dcd --- /dev/null +++ b/apps/sim/components/ui/streaming-indicator.tsx @@ -0,0 +1,24 @@ +'use client' + +import { memo } from 'react' +import { cn } from '@/lib/core/utils/cn' + +interface StreamingIndicatorProps { + className?: string + label?: string +} + +export const StreamingIndicator = memo(({ className, label }: StreamingIndicatorProps) => { + return ( +
+
+
+
+
+
+ {label && {label}} +
+ ) +}) + +StreamingIndicator.displayName = 'StreamingIndicator'