Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ThinkingLoader } from '@/components/ui'
import { WorkflowShowcase } from '@/app/(landing)/components/features/components/build-callout/components/workflow-showcase'
import { ThinkingLoader } from '@/app/(landing)/components/thinking-loader'

/**
* The Build beat's callout - the finished workflow canvas centered on the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useEffect, useRef, useState } from 'react'
import { cn } from '@sim/emcn'
import { Blimp } from '@sim/emcn/icons'
import { ArrowUp, Mic, Paperclip, Plus, Slash } from 'lucide-react'
import { ThinkingLoader } from '@/app/(landing)/components/thinking-loader'
import { ThinkingLoader } from '@/components/ui'

const PROMPT = 'Build a workflow to schedule and publish posts to my X account.'
const REPLY =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import {
ThumbsDown,
ThumbsUp,
} from 'lucide-react'
import { ThinkingLoader } from '@/components/ui'
import { HERO_TOOLTIP_OFFSET } from '@/app/(landing)/components/hero/components/hero-platform-loop/sidebar-hotspots'
import { ThinkingLoader } from '@/app/(landing)/components/thinking-loader'

/** The conversation the loop plays - mirrors the seeded capture chat. */
const USER_MESSAGE = 'When a new lead signs up, enrich it with company data and post it to #sales.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
useState,
} from 'react'
import { cn } from '@sim/emcn'
import { ThinkingLoader } from '@/components/ui'
import { BlockHandles } from '@/app/(landing)/components/hero/components/hero-visual/block-handles'
import {
type HomeMode,
Expand Down Expand Up @@ -37,7 +38,6 @@ import {
TYPE_MS_PER_ATOM,
WORKFLOW_FOCUS_SCALE,
} from '@/app/(landing)/components/hero/components/hero-visual/workflow-data'
import { ThinkingLoader } from '@/app/(landing)/components/thinking-loader'

/**
* Animated hero visual - the only client island in the hero, decorative and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import { useEffect, useRef, useState } from 'react'
import { cn } from '@sim/emcn'
import { ThinkingLoader } from '@/components/ui'
import { LandingPreviewChatInput } from '@/app/(landing)/components/landing-preview/components/landing-preview-chat/chat-input'
import { LandingPreviewChatTitleBar } from '@/app/(landing)/components/landing-preview/components/landing-preview-chat/chat-title-bar'
import type { PreviewChat } from '@/app/(landing)/components/landing-preview/components/landing-preview-workflow/workflow-data'
import { useLandingSubmit } from '@/app/(landing)/components/landing-preview/hooks/use-landing-submit'
import { ThinkingLoader } from '@/app/(landing)/components/thinking-loader'

interface LandingPreviewChatProps {
/** The scripted exchange to play, or `null` to show only the input. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { type CSSProperties, type ReactNode, useState } from 'react'
import { cn } from '@sim/emcn'
import { ThinkingLoader } from '@/app/(landing)/components/thinking-loader'
import { ThinkingLoader } from '@/components/ui'

interface LogoMarkProps {
/** Server-rendered Sim wordmark, shown by default. */
Expand Down
1 change: 0 additions & 1 deletion apps/sim/app/(landing)/components/thinking-loader/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
toast,
} from '@sim/emcn'
import { useParams } from 'next/navigation'
import { ThinkingLoader } from '@/components/ui'
import { canonicalWorkspaceFilePath } from '@/lib/copilot/vfs/path-utils'
import { isSafeHttpUrl } from '@/lib/core/utils/urls'
import { OAUTH_PROVIDERS } from '@/lib/oauth/oauth'
Expand Down Expand Up @@ -390,13 +391,6 @@ export function parseSpecialTags(content: string, isStreaming: boolean): ParsedS
return { segments, hasPendingTag }
}

const THINKING_BLOCKS = [
{ color: '#2ABBF8', delay: '0s' },
{ color: '#00F701', delay: '0.2s' },
{ color: '#FA4EDF', delay: '0.6s' },
{ color: '#FFCC02', delay: '0.4s' },
] as const

interface SpecialTagsProps {
segment: Exclude<ContentSegment, { type: 'text' }>
onOptionSelect?: (id: string) => void
Expand Down Expand Up @@ -435,17 +429,8 @@ export function SpecialTags({
*/
export function PendingTagIndicator() {
return (
<div className='flex animate-stream-fade-in items-center gap-2 py-2'>
<div className='grid size-[16px] grid-cols-2 gap-[1.5px]'>
{THINKING_BLOCKS.map((block, i) => (
<div
key={i}
className='animate-thinking-block rounded-xs'
style={{ backgroundColor: block.color, animationDelay: block.delay }}
/>
))}
</div>
<span className='text-[var(--text-body)] text-sm'>Thinking…</span>
<div className='animate-stream-fade-in py-2'>
<ThinkingLoader size={20} startVariant='corners' label='Thinking…' labelRatio={0.7} />
</div>
)
}
Expand Down
1 change: 1 addition & 0 deletions apps/sim/components/ui/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ export {
SelectTrigger,
SelectValue,
} from './select'
export { ThinkingLoader, type ThinkingLoaderVariant } from './thinking-loader'
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { type CSSProperties, type ReactNode, useEffect, useId, useState } from 'react'
import { cn } from '@sim/emcn'
import styles from '@/app/(landing)/components/thinking-loader/thinking-loader.module.css'
import styles from '@/components/ui/thinking-loader.module.css'

const VARIANTS = [
'metaballs',
Expand Down
5 changes: 0 additions & 5 deletions apps/sim/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,6 @@ export default {
from: { opacity: '0' },
to: { opacity: '1' },
},
'thinking-block': {
'0%, 100%': { opacity: '0.15' },
'30%, 55%': { opacity: '1' },
},
'slide-in-right': {
from: { transform: 'translateX(40px)' },
to: { transform: 'translateX(0)' },
Expand Down Expand Up @@ -251,7 +247,6 @@ export default {
'ring-pulse': 'ring-pulse 1.5s ease-in-out infinite',
'stream-fade-in': 'stream-fade-in 300ms ease-out forwards',
'stream-fade-in-delayed': 'stream-fade-in 300ms ease-out 1.5s forwards',
'thinking-block': 'thinking-block 1.6s ease-in-out infinite',
'slide-in-right': 'slide-in-right 350ms ease-out forwards',
'slide-in-bottom': 'slide-in-bottom 400ms cubic-bezier(0.16, 1, 0.3, 1)',
'collapsible-down': 'collapsible-down 300ms cubic-bezier(0.4, 0, 0.2, 1)',
Expand Down
Loading