diff --git a/.cursorrules b/.cursorrules index 583c84e65..a8f1e657b 100644 --- a/.cursorrules +++ b/.cursorrules @@ -8,7 +8,7 @@ ENSURE that you use the logger.info and logger.warn and logger.error instead of ## Comments -You must use TSDOC for comments. Do not use ==== for comments to separate sections. +You must use TSDOC for comments. Do not use ==== for comments to separate sections. Do not leave any comments that are not TSDOC. ## Globals styles diff --git a/apps/sim/.cursorrules b/apps/sim/.cursorrules index 73ae78123..9b86fbb07 100644 --- a/apps/sim/.cursorrules +++ b/apps/sim/.cursorrules @@ -1,6 +1,6 @@ # Sim App Architecture Guidelines -You are building features in the Sim app following the architecture established by the sidebar-new component. This file defines the patterns, structures, and conventions you must follow. +You are building features in the Sim app following the architecture. This file defines the patterns, structures, and conventions you must follow. --- @@ -428,20 +428,22 @@ setSidebarWidth: (width) => { ### Tailwind Classes 1. **No Inline Styles**: Use Tailwind utility classes exclusively -2. **Dark Mode**: Always include dark mode variants (`dark:bg-[var(--surface-1)]`) -3. **Exact Values**: Use exact values from design system (`text-[14px]`, `h-[25px]`) -4. **clsx for Conditionals**: Use clsx() for conditional classes -5. **Consistent Spacing**: Use spacing tokens (`gap-[8px]`, `px-[14px]`) -6. **Transitions**: Add transitions for interactive states (`transition-colors`) -7. **Prefer px units**: Use arbitrary px values over scale utilities (e.g., `px-[4px]` instead of `px-1`) +2. **Dark Mode**: Include dark mode variants only when the value differs from light mode +3. **No Duplicate Dark Classes**: Never add a `dark:` class when the value is identical to the light mode class (e.g., `text-[var(--text-primary)] dark:text-[var(--text-primary)]` is redundant - just use `text-[var(--text-primary)]`) +4. **Exact Values**: Use exact values from design system (`text-[14px]`, `h-[25px]`) +5. **cn for Conditionals**: Use `cn()` from `@/lib/utils` for conditional classes (wraps clsx + tailwind-merge for conflict resolution) +6. **Consistent Spacing**: Use spacing tokens (`gap-[8px]`, `px-[14px]`) +7. **Transitions**: Add transitions for interactive states (`transition-colors`) +8. **Prefer px units**: Use arbitrary px values over scale utilities (e.g., `px-[4px]` instead of `px-1`) ```typescript +import { cn } from '@/lib/utils' +
``` @@ -620,9 +622,10 @@ Before considering a component/hook complete, verify: ### Styling - [ ] No styles attributes (use className with Tailwind) -- [ ] Dark mode variants included +- [ ] Dark mode variants only when values differ from light mode +- [ ] No duplicate dark: classes with identical values - [ ] Consistent spacing using design tokens -- [ ] clsx for conditional classes +- [ ] cn() for conditional classes ### Accessibility - [ ] Semantic HTML elements @@ -652,6 +655,11 @@ Before considering a component/hook complete, verify: // ❌ Inline styles
+// ❌ Duplicate dark mode classes (same value as light mode) +
+
+
+ // ❌ console.log console.log('Debug info') @@ -690,6 +698,14 @@ export function Component() { // ✅ Tailwind classes
+// ✅ No duplicate dark classes - CSS variables already handle theming +
+
+
+ +// ✅ Only add dark: when values differ between modes +
+ // ✅ Logger logger.info('Debug info', { context }) diff --git a/apps/sim/app/_shell/providers/theme-provider.tsx b/apps/sim/app/_shell/providers/theme-provider.tsx index c1f847bb0..bd18e559e 100644 --- a/apps/sim/app/_shell/providers/theme-provider.tsx +++ b/apps/sim/app/_shell/providers/theme-provider.tsx @@ -7,25 +7,23 @@ import { ThemeProvider as NextThemesProvider } from 'next-themes' export function ThemeProvider({ children, ...props }: ThemeProviderProps) { const pathname = usePathname() - // Force dark mode for workspace pages and templates - // Force light mode for certain public pages + // Force light mode for public/marketing pages + // Workspace and templates respect user's theme preference from settings const forcedTheme = - pathname.startsWith('/workspace') || pathname.startsWith('/templates') - ? 'dark' - : pathname === '/' || - pathname.startsWith('/login') || - pathname.startsWith('/signup') || - pathname.startsWith('/sso') || - pathname.startsWith('/terms') || - pathname.startsWith('/privacy') || - pathname.startsWith('/invite') || - pathname.startsWith('/verify') || - pathname.startsWith('/careers') || - pathname.startsWith('/changelog') || - pathname.startsWith('/chat') || - pathname.startsWith('/studio') - ? 'light' - : undefined + pathname === '/' || + pathname.startsWith('/login') || + pathname.startsWith('/signup') || + pathname.startsWith('/sso') || + pathname.startsWith('/terms') || + pathname.startsWith('/privacy') || + pathname.startsWith('/invite') || + pathname.startsWith('/verify') || + pathname.startsWith('/careers') || + pathname.startsWith('/changelog') || + pathname.startsWith('/chat') || + pathname.startsWith('/studio') + ? 'light' + : undefined return (
-
+
{authorImageUrl ? (
{author} diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/create-chunk-modal/create-chunk-modal.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/create-chunk-modal/create-chunk-modal.tsx index f971bb19c..3a4449f01 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/create-chunk-modal/create-chunk-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/create-chunk-modal/create-chunk-modal.tsx @@ -2,7 +2,8 @@ import { useRef, useState } from 'react' import { AlertCircle, Loader2, X } from 'lucide-react' -import { Button, Modal, ModalContent, ModalTitle, Textarea } from '@/components/emcn' +import { Button, Textarea } from '@/components/emcn' +import { Modal, ModalContent, ModalTitle } from '@/components/emcn/components/modal/modal' import { Label } from '@/components/ui/label' import { createLogger } from '@/lib/logs/console/logger' import type { ChunkData, DocumentData } from '@/stores/knowledge/store' diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/components/create-modal/create-modal.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/components/create-modal/create-modal.tsx index fc033b3ef..fc77a48f7 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/components/create-modal/create-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/components/create-modal/create-modal.tsx @@ -6,7 +6,8 @@ import { AlertCircle, Check, Loader2, X } from 'lucide-react' import { useParams } from 'next/navigation' import { useForm } from 'react-hook-form' import { z } from 'zod' -import { Button, Input, Label, Modal, ModalContent, ModalTitle, Textarea } from '@/components/emcn' +import { Button, Input, Label, Textarea } from '@/components/emcn' +import { Modal, ModalContent, ModalTitle } from '@/components/emcn/components/modal/modal' import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert' import { Progress } from '@/components/ui/progress' import { createLogger } from '@/lib/logs/console/logger' diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/components/icons/document-icons.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/components/icons/document-icons.tsx index dbbfe9840..161dff219 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/components/icons/document-icons.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/components/icons/document-icons.tsx @@ -125,7 +125,7 @@ export const TxtIcon: React.FC = ({ className = 'w-6 h-6' }) => ( {hasDuration && ( @@ -467,12 +467,12 @@ export function WorkflowDetails({
{statusLabel} diff --git a/apps/sim/app/workspace/[workspaceId]/logs/logs.tsx b/apps/sim/app/workspace/[workspaceId]/logs/logs.tsx index b8ef9d1a8..c35afcdc8 100644 --- a/apps/sim/app/workspace/[workspaceId]/logs/logs.tsx +++ b/apps/sim/app/workspace/[workspaceId]/logs/logs.tsx @@ -483,12 +483,12 @@ export default function Logs() {
{statusLabel} diff --git a/apps/sim/app/workspace/[workspaceId]/templates/components/template-card.tsx b/apps/sim/app/workspace/[workspaceId]/templates/components/template-card.tsx index 1e15ddcfa..48f3fd3c0 100644 --- a/apps/sim/app/workspace/[workspaceId]/templates/components/template-card.tsx +++ b/apps/sim/app/workspace/[workspaceId]/templates/components/template-card.tsx @@ -27,7 +27,12 @@ interface TemplateCardProps { export function TemplateCardSkeleton({ className }: { className?: string }) { return ( -
+
@@ -196,7 +201,10 @@ function TemplateCardInner({ return (
+{blockTypes.length - 3} @@ -277,7 +285,7 @@ function TemplateCardInner({ {author}
) : ( -
+
)} diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/chat.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/chat.tsx index ae4e71ae2..c7713fed8 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/chat.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/chat.tsx @@ -28,13 +28,13 @@ import { ChatMessage, OutputSelect, } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/chat/components' -import { - useChatBoundarySync, - useChatDrag, - useChatFileUpload, - useChatResize, -} from '@/app/workspace/[workspaceId]/w/[workflowId]/components/chat/hooks' +import { useChatFileUpload } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/chat/hooks' import { useScrollManagement } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks' +import { + useFloatBoundarySync, + useFloatDrag, + useFloatResize, +} from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-float' import { useWorkflowExecution } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-workflow-execution' import type { BlockLog, ExecutionResult } from '@/executor/types' import { getChatPosition, useChatStore } from '@/stores/chat/store' @@ -312,7 +312,7 @@ export function Chat() { ) // Drag hook - const { handleMouseDown } = useChatDrag({ + const { handleMouseDown } = useFloatDrag({ position: actualPosition, width: chatWidth, height: chatHeight, @@ -320,7 +320,7 @@ export function Chat() { }) // Boundary sync hook - keeps chat within bounds when layout changes - useChatBoundarySync({ + useFloatBoundarySync({ isOpen: isChatOpen, position: actualPosition, width: chatWidth, @@ -334,7 +334,7 @@ export function Chat() { handleMouseMove: handleResizeMouseMove, handleMouseLeave: handleResizeMouseLeave, handleMouseDown: handleResizeMouseDown, - } = useChatResize({ + } = useFloatResize({ position: actualPosition, width: chatWidth, height: chatHeight, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/components/output-select/output-select.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/components/output-select/output-select.tsx index 239ee1896..40ff48244 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/components/output-select/output-select.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/components/output-select/output-select.tsx @@ -65,7 +65,7 @@ export function OutputSelect({ valueMode = 'id', disablePopoverPortal = false, align = 'start', - maxHeight = 300, + maxHeight = 200, }: OutputSelectProps) { const [open, setOpen] = useState(false) const [highlightedIndex, setHighlightedIndex] = useState(-1) @@ -423,6 +423,7 @@ export function OutputSelect({ maxHeight={maxHeight} maxWidth={300} minWidth={160} + border disablePortal={disablePopoverPortal} onKeyDown={handleKeyDown} tabIndex={0} diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/hooks/index.ts b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/hooks/index.ts index dc85c4971..a1b7370b8 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/hooks/index.ts +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/hooks/index.ts @@ -1,5 +1 @@ -export { useChatBoundarySync } from './use-chat-boundary-sync' -export { useChatDrag } from './use-chat-drag' -export type { ChatFile } from './use-chat-file-upload' -export { useChatFileUpload } from './use-chat-file-upload' -export { useChatResize } from './use-chat-resize' +export { type ChatFile, useChatFileUpload } from './use-chat-file-upload' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/diff-controls/diff-controls.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/diff-controls/diff-controls.tsx index 2e7e5c328..570b2edc0 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/diff-controls/diff-controls.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/diff-controls/diff-controls.tsx @@ -1,8 +1,10 @@ import { memo, useCallback } from 'react' +import clsx from 'clsx' import { Eye, EyeOff } from 'lucide-react' import { Button } from '@/components/emcn' import { createLogger } from '@/lib/logs/console/logger' import { useCopilotStore } from '@/stores/panel/copilot/store' +import { useTerminalStore } from '@/stores/terminal' import { useWorkflowDiffStore } from '@/stores/workflow-diff' import { useWorkflowRegistry } from '@/stores/workflows/registry/store' import { mergeSubblockState } from '@/stores/workflows/utils' @@ -11,6 +13,7 @@ import { useWorkflowStore } from '@/stores/workflows/workflow/store' const logger = createLogger('DiffControls') export const DiffControls = memo(function DiffControls() { + const isTerminalResizing = useTerminalStore((state) => state.isResizing) // Optimized: Single diff store subscription const { isShowingDiff, @@ -312,7 +315,10 @@ export const DiffControls = memo(function DiffControls() { return (
diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/note-block/note-block.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/note-block/note-block.tsx index 9e5e870f3..4ca430d85 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/note-block/note-block.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/note-block/note-block.tsx @@ -4,7 +4,7 @@ import type { NodeProps } from 'reactflow' import remarkGfm from 'remark-gfm' import { cn } from '@/lib/core/utils/cn' import { useUserPermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider' -import { useBlockCore } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks' +import { useBlockVisual } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks' import { BLOCK_DIMENSIONS, useBlockDimensions, @@ -76,7 +76,7 @@ const NoteMarkdown = memo(function NoteMarkdown({ content }: { content: string } return ( {children} @@ -121,9 +121,10 @@ const NoteMarkdown = memo(function NoteMarkdown({ content }: { content: string } export const NoteBlock = memo(function NoteBlock({ id, data }: NodeProps) { const { type, config, name } = data - const { activeWorkflowId, isEnabled, isFocused, handleClick, hasRing, ringStyles } = useBlockCore( - { blockId: id, data } - ) + const { activeWorkflowId, isEnabled, handleClick, hasRing, ringStyles } = useBlockVisual({ + blockId: id, + data, + }) const storedValues = useSubBlockStore( useCallback( (state) => { diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/notifications/notifications.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/notifications/notifications.tsx index fe40868ed..410f87750 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/notifications/notifications.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/notifications/notifications.tsx @@ -1,4 +1,5 @@ import { memo, useCallback } from 'react' +import clsx from 'clsx' import { X } from 'lucide-react' import { useParams } from 'next/navigation' import { Button } from '@/components/emcn' @@ -10,6 +11,7 @@ import { openCopilotWithMessage, useNotificationStore, } from '@/stores/notifications' +import { useTerminalStore } from '@/stores/terminal' const logger = createLogger('Notifications') const MAX_VISIBLE_NOTIFICATIONS = 4 @@ -29,6 +31,7 @@ export const Notifications = memo(function Notifications() { const removeNotification = useNotificationStore((state) => state.removeNotification) const clearNotifications = useNotificationStore((state) => state.clearNotifications) const visibleNotifications = notifications.slice(0, MAX_VISIBLE_NOTIFICATIONS) + const isTerminalResizing = useTerminalStore((state) => state.isResizing) /** * Executes a notification action and handles side effects. @@ -95,7 +98,12 @@ export const Notifications = memo(function Notifications() { } return ( -
+
{[...visibleNotifications].reverse().map((notification, index, stacked) => { const depth = stacked.length - index - 1 const xOffset = depth * 3 @@ -105,7 +113,7 @@ export const Notifications = memo(function Notifications() {
0 ? '-mt-[78px]' : '' }`} > diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/components/markdown-renderer.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/components/markdown-renderer.tsx index bc64ca929..3f8969afd 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/components/markdown-renderer.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/components/markdown-renderer.tsx @@ -137,29 +137,29 @@ export default function CopilotMarkdownRenderer({ content }: CopilotMarkdownRend () => ({ // Paragraph p: ({ children }: React.HTMLAttributes) => ( -

+

{children}

), // Headings h1: ({ children }: React.HTMLAttributes) => ( -

+

{children}

), h2: ({ children }: React.HTMLAttributes) => ( -

+

{children}

), h3: ({ children }: React.HTMLAttributes) => ( -

+

{children}

), h4: ({ children }: React.HTMLAttributes) => ( -

+

{children}

), @@ -167,7 +167,7 @@ export default function CopilotMarkdownRenderer({ content }: CopilotMarkdownRend // Lists ul: ({ children }: React.HTMLAttributes) => (
    {children} @@ -175,7 +175,7 @@ export default function CopilotMarkdownRenderer({ content }: CopilotMarkdownRend ), ol: ({ children }: React.HTMLAttributes) => (
      {children} @@ -186,7 +186,7 @@ export default function CopilotMarkdownRenderer({ content }: CopilotMarkdownRend ordered, }: React.LiHTMLAttributes & { ordered?: boolean }) => (
    1. {children} @@ -309,33 +309,35 @@ export default function CopilotMarkdownRenderer({ content }: CopilotMarkdownRend // Bold text strong: ({ children }: React.HTMLAttributes) => ( - {children} + + {children} + ), // Bold text (alternative) b: ({ children }: React.HTMLAttributes) => ( - {children} + {children} ), // Italic text em: ({ children }: React.HTMLAttributes) => ( - {children} + {children} ), // Italic text (alternative) i: ({ children }: React.HTMLAttributes) => ( - {children} + {children} ), // Blockquotes blockquote: ({ children }: React.HTMLAttributes) => ( -
      +
      {children}
      ), // Horizontal rule - hr: () =>
      , + hr: () =>
      , // Links a: ({ href, children, ...props }: React.AnchorHTMLAttributes) => ( @@ -347,29 +349,29 @@ export default function CopilotMarkdownRenderer({ content }: CopilotMarkdownRend // Tables table: ({ children }: React.TableHTMLAttributes) => (
      - +
      {children}
      ), thead: ({ children }: React.HTMLAttributes) => ( - {children} + {children} ), tbody: ({ children }: React.HTMLAttributes) => ( - {children} + {children} ), tr: ({ children }: React.HTMLAttributes) => ( - + {children} ), th: ({ children }: React.ThHTMLAttributes) => ( - + {children} ), td: ({ children }: React.TdHTMLAttributes) => ( - + {children} ), @@ -388,7 +390,7 @@ export default function CopilotMarkdownRenderer({ content }: CopilotMarkdownRend ) return ( -
      +
      {content} diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/components/thinking-block.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/components/thinking-block.tsx index 508cf3991..92bc338c8 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/components/thinking-block.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/components/thinking-block.tsx @@ -37,7 +37,7 @@ function ShimmerOverlayText({ label, value, active = false }: ShimmerOverlayText return ( {label} - {value} + {value} {active ? (
      ) } @@ -264,7 +264,7 @@ const CopilotMessage: FC = memo( {/* Inline Checkpoint Discard Confirmation - shown below input in edit mode */} {showCheckpointDiscardModal && ( -
      +

      Continue from a previous message?

      @@ -311,7 +311,7 @@ const CopilotMessage: FC = memo( onClick={handleMessageClick} onMouseEnter={() => setIsHoveringMessage(true)} onMouseLeave={() => setIsHoveringMessage(false)} - className='group relative w-full cursor-pointer rounded-[4px] border border-[var(--surface-11)] bg-[var(--surface-6)] px-[6px] py-[6px] transition-all duration-200 hover:border-[var(--surface-14)] hover:bg-[var(--surface-9)] dark:border-[var(--surface-11)] dark:bg-[var(--surface-9)] dark:hover:border-[var(--surface-13)] dark:hover:bg-[var(--surface-11)]' + className='group relative w-full cursor-pointer rounded-[4px] border border-[var(--surface-11)] bg-[var(--surface-6)] px-[6px] py-[6px] transition-all duration-200 hover:border-[var(--surface-14)] hover:bg-[var(--surface-9)] dark:bg-[var(--surface-9)] dark:hover:border-[var(--surface-13)] dark:hover:bg-[var(--surface-11)]' >
      = memo( {/* Inline Restore Checkpoint Confirmation */} {showRestoreConfirmation && ( -
      +

      Revert to checkpoint? This will restore your workflow to the state saved at this checkpoint.{' '} diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/index.ts b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/index.ts index a151aef4d..28de03e6c 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/index.ts +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/index.ts @@ -1,6 +1,6 @@ export * from './copilot-message/copilot-message' -export * from './inline-tool-call/inline-tool-call' export * from './plan-mode-section/plan-mode-section' export * from './todo-list/todo-list' +export * from './tool-call/tool-call' export * from './user-input/user-input' export * from './welcome/welcome' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/plan-mode-section/plan-mode-section.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/plan-mode-section/plan-mode-section.tsx index 23f016823..ec59e6237 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/plan-mode-section/plan-mode-section.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/plan-mode-section/plan-mode-section.tsx @@ -35,9 +35,9 @@ import CopilotMarkdownRenderer from '@/app/workspace/[workspaceId]/w/[workflowId /** * Shared border and background styles */ -const SURFACE_5 = 'bg-[var(--surface-5)] dark:bg-[var(--surface-5)]' -const SURFACE_9 = 'bg-[var(--surface-9)] dark:bg-[var(--surface-9)]' -const BORDER_STRONG = 'border-[var(--border-strong)] dark:border-[var(--border-strong)]' +const SURFACE_5 = 'bg-[var(--surface-5)]' +const SURFACE_9 = 'bg-[var(--surface-9)]' +const BORDER_STRONG = 'border-[var(--border-strong)]' export interface PlanModeSectionProps { /** @@ -184,8 +184,8 @@ const PlanModeSection: React.FC = ({ style={{ height: `${height}px` }} > {/* Header with build/edit/save/clear buttons */} -

      - +
      + Workflow Plan
      @@ -252,7 +252,7 @@ const PlanModeSection: React.FC = ({ ref={textareaRef} value={editedContent} onChange={(e) => setEditedContent(e.target.value)} - className='h-full min-h-full w-full resize-none border-0 bg-transparent p-0 font-[470] font-season text-[13px] text-[var(--text-primary)] leading-[1.4rem] outline-none ring-0 focus-visible:ring-0 focus-visible:ring-offset-0 dark:text-[var(--text-primary)]' + className='h-full min-h-full w-full resize-none border-0 bg-transparent p-0 font-[470] font-season text-[13px] text-[var(--text-primary)] leading-[1.4rem] outline-none ring-0 focus-visible:ring-0 focus-visible:ring-offset-0' placeholder='Enter your workflow plan...' /> ) : ( @@ -265,7 +265,7 @@ const PlanModeSection: React.FC = ({ className={cn( 'group flex h-[20px] w-full cursor-ns-resize items-center justify-center border-t', BORDER_STRONG, - 'transition-colors hover:bg-[var(--surface-9)] dark:hover:bg-[var(--surface-9)]', + 'transition-colors hover:bg-[var(--surface-9)]', isResizing && SURFACE_9 )} onMouseDown={handleResizeStart} @@ -273,7 +273,7 @@ const PlanModeSection: React.FC = ({ aria-orientation='horizontal' aria-label='Resize plan section' > - +
      ) diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/todo-list/todo-list.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/todo-list/todo-list.tsx index 26a7e417b..8eafe6216 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/todo-list/todo-list.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/todo-list/todo-list.tsx @@ -66,7 +66,7 @@ export const TodoList = memo(function TodoList({ return (
      @@ -84,19 +84,17 @@ export const TodoList = memo(function TodoList({ )} - - Todo: - - + Todo: + {completedCount}/{totalCount}
      {/* Progress bar */} -
      +
      @@ -122,21 +120,20 @@ export const TodoList = memo(function TodoList({ key={todo.id} className={cn( 'flex items-start gap-2 px-3 py-1.5 transition-colors hover:bg-[var(--surface-9)]/50 dark:hover:bg-[var(--surface-11)]/50', - index !== todos.length - 1 && - 'border-[var(--surface-11)] border-b dark:border-[var(--surface-11)]' + index !== todos.length - 1 && 'border-[var(--surface-11)] border-b' )} > {todo.executing ? (
      - +
      ) : (
      {todo.completed ? : null} @@ -146,9 +143,7 @@ export const TodoList = memo(function TodoList({ {todo.content} diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/inline-tool-call/inline-tool-call.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/tool-call/tool-call.tsx similarity index 96% rename from apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/inline-tool-call/inline-tool-call.tsx rename to apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/tool-call/tool-call.tsx index c43ae69ed..21a54d0bd 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/inline-tool-call/inline-tool-call.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/tool-call/tool-call.tsx @@ -12,7 +12,7 @@ import { getEnv } from '@/lib/core/config/env' import { CLASS_TOOL_METADATA, useCopilotStore } from '@/stores/panel/copilot/store' import type { CopilotToolCall } from '@/stores/panel/copilot/types' -interface InlineToolCallProps { +interface ToolCallProps { toolCall?: CopilotToolCall toolCallId?: string onStateChange?: (state: any) => void @@ -139,16 +139,11 @@ function ShimmerOverlayText({ // Special tools: use gradient for entire text if (isSpecial) { - const baseTextStyle = { - backgroundImage: 'linear-gradient(90deg, #B99FFD 0%, #D1BFFF 100%)', - WebkitBackgroundClip: 'text', - backgroundClip: 'text', - WebkitTextFillColor: 'transparent', - } - return ( - {text} + + {text} + {active ? (