Skip to content

Commit ed71eae

Browse files
committed
refactor: deleted duplicate dark styles
1 parent e8978fc commit ed71eae

43 files changed

Lines changed: 176 additions & 243 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/note-block/note-block.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const NoteMarkdown = memo(function NoteMarkdown({ content }: { content: string }
7676
return (
7777
<code
7878
{...props}
79-
className='whitespace-normal rounded bg-gray-200 px-1 py-0.5 font-mono text-[#F59E0B] text-xs dark:bg-[var(--surface-11)] dark:text-[#F59E0B]'
79+
className='whitespace-normal rounded bg-gray-200 px-1 py-0.5 font-mono text-[#F59E0B] text-xs dark:bg-[var(--surface-11)]'
8080
>
8181
{children}
8282
</code>

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/copilot-message.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { type FC, memo, useMemo, useState } from 'react'
44
import { Check, Copy, RotateCcw, ThumbsDown, ThumbsUp } from 'lucide-react'
55
import { Button } from '@/components/emcn'
6-
import { InlineToolCall } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components'
6+
import { ToolCall } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components'
77
import {
88
FileAttachmentDisplay,
99
SmoothStreamingText,
@@ -221,7 +221,7 @@ const CopilotMessage: FC<CopilotMessageProps> = memo(
221221
key={`tool-${block.toolCall.id}`}
222222
className='opacity-100 transition-opacity duration-300 ease-in-out'
223223
>
224-
<InlineToolCall toolCallId={block.toolCall.id} toolCall={block.toolCall} />
224+
<ToolCall toolCallId={block.toolCall.id} toolCall={block.toolCall} />
225225
</div>
226226
)
227227
}
@@ -264,7 +264,7 @@ const CopilotMessage: FC<CopilotMessageProps> = memo(
264264

265265
{/* Inline Checkpoint Discard Confirmation - shown below input in edit mode */}
266266
{showCheckpointDiscardModal && (
267-
<div className='mt-[8px] rounded-[4px] border border-[var(--surface-11)] bg-[var(--surface-6)] p-[10px] dark:border-[var(--surface-11)] dark:bg-[var(--surface-9)]'>
267+
<div className='mt-[8px] rounded-[4px] border border-[var(--surface-11)] bg-[var(--surface-6)] p-[10px] dark:bg-[var(--surface-9)]'>
268268
<p className='mb-[8px] text-[var(--text-primary)] text-sm'>
269269
Continue from a previous message?
270270
</p>
@@ -311,7 +311,7 @@ const CopilotMessage: FC<CopilotMessageProps> = memo(
311311
onClick={handleMessageClick}
312312
onMouseEnter={() => setIsHoveringMessage(true)}
313313
onMouseLeave={() => setIsHoveringMessage(false)}
314-
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)]'
314+
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)]'
315315
>
316316
<div
317317
ref={messageContentRef}
@@ -405,7 +405,7 @@ const CopilotMessage: FC<CopilotMessageProps> = memo(
405405

406406
{/* Inline Restore Checkpoint Confirmation */}
407407
{showRestoreConfirmation && (
408-
<div className='mt-[8px] rounded-[4px] border border-[var(--surface-11)] bg-[var(--surface-6)] p-[10px] dark:border-[var(--surface-11)] dark:bg-[var(--surface-9)]'>
408+
<div className='mt-[8px] rounded-[4px] border border-[var(--surface-11)] bg-[var(--surface-6)] p-[10px] dark:bg-[var(--surface-9)]'>
409409
<p className='mb-[8px] text-[var(--text-primary)] text-sm'>
410410
Revert to checkpoint? This will restore your workflow to the state saved at this
411411
checkpoint.{' '}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export * from './copilot-message/copilot-message'
2-
export * from './inline-tool-call/inline-tool-call'
32
export * from './plan-mode-section/plan-mode-section'
43
export * from './todo-list/todo-list'
4+
export * from './tool-call/tool-call'
55
export * from './user-input/user-input'
66
export * from './welcome/welcome'

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/plan-mode-section/plan-mode-section.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ import CopilotMarkdownRenderer from '@/app/workspace/[workspaceId]/w/[workflowId
3535
/**
3636
* Shared border and background styles
3737
*/
38-
const SURFACE_5 = 'bg-[var(--surface-5)] dark:bg-[var(--surface-5)]'
39-
const SURFACE_9 = 'bg-[var(--surface-9)] dark:bg-[var(--surface-9)]'
40-
const BORDER_STRONG = 'border-[var(--border-strong)] dark:border-[var(--border-strong)]'
38+
const SURFACE_5 = 'bg-[var(--surface-5)]'
39+
const SURFACE_9 = 'bg-[var(--surface-9)]'
40+
const BORDER_STRONG = 'border-[var(--border-strong)]'
4141

4242
export interface PlanModeSectionProps {
4343
/**
@@ -184,8 +184,8 @@ const PlanModeSection: React.FC<PlanModeSectionProps> = ({
184184
style={{ height: `${height}px` }}
185185
>
186186
{/* Header with build/edit/save/clear buttons */}
187-
<div className='flex flex-shrink-0 items-center justify-between border-[var(--border-strong)] border-b py-[6px] pr-[2px] pl-[12px] dark:border-[var(--border-strong)]'>
188-
<span className='font-[500] text-[11px] text-[var(--text-secondary)] uppercase tracking-wide dark:text-[var(--text-secondary)]'>
187+
<div className='flex flex-shrink-0 items-center justify-between border-[var(--border-strong)] border-b py-[6px] pr-[2px] pl-[12px]'>
188+
<span className='font-[500] text-[11px] text-[var(--text-secondary)] uppercase tracking-wide'>
189189
Workflow Plan
190190
</span>
191191
<div className='ml-auto flex items-center gap-[4px]'>
@@ -252,7 +252,7 @@ const PlanModeSection: React.FC<PlanModeSectionProps> = ({
252252
ref={textareaRef}
253253
value={editedContent}
254254
onChange={(e) => setEditedContent(e.target.value)}
255-
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)]'
255+
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'
256256
placeholder='Enter your workflow plan...'
257257
/>
258258
) : (
@@ -265,15 +265,15 @@ const PlanModeSection: React.FC<PlanModeSectionProps> = ({
265265
className={cn(
266266
'group flex h-[20px] w-full cursor-ns-resize items-center justify-center border-t',
267267
BORDER_STRONG,
268-
'transition-colors hover:bg-[var(--surface-9)] dark:hover:bg-[var(--surface-9)]',
268+
'transition-colors hover:bg-[var(--surface-9)]',
269269
isResizing && SURFACE_9
270270
)}
271271
onMouseDown={handleResizeStart}
272272
role='separator'
273273
aria-orientation='horizontal'
274274
aria-label='Resize plan section'
275275
>
276-
<GripHorizontal className='h-3 w-3 text-[var(--text-secondary)] transition-colors group-hover:text-[var(--text-primary)] dark:text-[var(--text-secondary)] dark:group-hover:text-[var(--text-primary)]' />
276+
<GripHorizontal className='h-3 w-3 text-[var(--text-secondary)] transition-colors group-hover:text-[var(--text-primary)]' />
277277
</div>
278278
</div>
279279
)

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/todo-list/todo-list.tsx

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export const TodoList = memo(function TodoList({
6666
return (
6767
<div
6868
className={cn(
69-
'w-full rounded-t-[4px] rounded-b-none border-[var(--surface-11)] border-x border-t bg-[var(--surface-6)] dark:border-[var(--surface-11)] dark:bg-[var(--surface-9)]',
69+
'w-full rounded-t-[4px] rounded-b-none border-[var(--surface-11)] border-x border-t bg-[var(--surface-6)] dark:bg-[var(--surface-9)]',
7070
className
7171
)}
7272
>
@@ -84,19 +84,17 @@ export const TodoList = memo(function TodoList({
8484
<ChevronDown className='h-[14px] w-[14px]' />
8585
)}
8686
</Button>
87-
<span className='font-medium text-[var(--text-primary)] text-xs dark:text-[var(--text-primary)]'>
88-
Todo:
89-
</span>
90-
<span className='font-medium text-[var(--text-primary)] text-xs dark:text-[var(--text-primary)]'>
87+
<span className='font-medium text-[var(--text-primary)] text-xs'>Todo:</span>
88+
<span className='font-medium text-[var(--text-primary)] text-xs'>
9189
{completedCount}/{totalCount}
9290
</span>
9391
</div>
9492

9593
<div className='flex flex-1 items-center gap-[8px] pl-[10px]'>
9694
{/* Progress bar */}
97-
<div className='h-1.5 flex-1 overflow-hidden rounded-full bg-[var(--surface-11)] dark:bg-[var(--surface-11)]'>
95+
<div className='h-1.5 flex-1 overflow-hidden rounded-full bg-[var(--surface-11)]'>
9896
<div
99-
className='h-full bg-[var(--brand-400)] transition-all duration-300 ease-out dark:bg-[var(--brand-400)]'
97+
className='h-full bg-[var(--brand-400)] transition-all duration-300 ease-out'
10098
style={{ width: `${progress}%` }}
10199
/>
102100
</div>
@@ -122,21 +120,20 @@ export const TodoList = memo(function TodoList({
122120
key={todo.id}
123121
className={cn(
124122
'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',
125-
index !== todos.length - 1 &&
126-
'border-[var(--surface-11)] border-b dark:border-[var(--surface-11)]'
123+
index !== todos.length - 1 && 'border-[var(--surface-11)] border-b'
127124
)}
128125
>
129126
{todo.executing ? (
130127
<div className='mt-0.5 flex h-4 w-4 flex-shrink-0 items-center justify-center'>
131-
<Loader2 className='h-3 w-3 animate-spin text-[var(--text-primary)] dark:text-[var(--text-primary)]' />
128+
<Loader2 className='h-3 w-3 animate-spin text-[var(--text-primary)]' />
132129
</div>
133130
) : (
134131
<div
135132
className={cn(
136133
'mt-0.5 flex h-4 w-4 flex-shrink-0 items-center justify-center rounded border transition-all',
137134
todo.completed
138-
? 'border-[var(--brand-400)] bg-[var(--brand-400)] dark:border-[var(--brand-400)] dark:bg-[var(--brand-400)]'
139-
: 'border-[#707070] dark:border-[#707070]'
135+
? 'border-[var(--brand-400)] bg-[var(--brand-400)]'
136+
: 'border-[#707070]'
140137
)}
141138
>
142139
{todo.completed ? <Check className='h-3 w-3 text-white' strokeWidth={3} /> : null}
@@ -146,9 +143,7 @@ export const TodoList = memo(function TodoList({
146143
<span
147144
className={cn(
148145
'flex-1 font-base text-[12px] leading-relaxed',
149-
todo.completed
150-
? 'text-[var(--text-muted)] line-through dark:text-[var(--text-muted)]'
151-
: 'text-[var(--white)] dark:text-[var(--white)]'
146+
todo.completed ? 'text-[var(--text-muted)] line-through' : 'text-[var(--white)]'
152147
)}
153148
>
154149
{todo.content}

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/inline-tool-call/inline-tool-call.tsx renamed to apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/tool-call/tool-call.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { getEnv } from '@/lib/env'
1212
import { CLASS_TOOL_METADATA, useCopilotStore } from '@/stores/panel/copilot/store'
1313
import type { CopilotToolCall } from '@/stores/panel/copilot/types'
1414

15-
interface InlineToolCallProps {
15+
interface ToolCallProps {
1616
toolCall?: CopilotToolCall
1717
toolCallId?: string
1818
onStateChange?: (state: any) => void
@@ -453,11 +453,7 @@ function RunSkipButtons({
453453
)
454454
}
455455

456-
export function InlineToolCall({
457-
toolCall: toolCallProp,
458-
toolCallId,
459-
onStateChange,
460-
}: InlineToolCallProps) {
456+
export function ToolCall({ toolCall: toolCallProp, toolCallId, onStateChange }: ToolCallProps) {
461457
const [, forceUpdate] = useState({})
462458
const liveToolCall = useCopilotStore((s) =>
463459
toolCallId ? s.toolCallsById[toolCallId] : undefined
@@ -869,7 +865,7 @@ export function InlineToolCall({
869865
text={displayName}
870866
active={isLoadingState}
871867
isSpecial={isSpecial}
872-
className='font-[470] font-season text-[#939393] text-sm dark:text-[#939393]'
868+
className='font-[470] font-season text-[#939393] text-sm'
873869
/>
874870
<div className='mt-[8px]'>{renderPendingDetails()}</div>
875871
{showButtons && (
@@ -895,7 +891,7 @@ export function InlineToolCall({
895891
text={displayName}
896892
active={isLoadingState}
897893
isSpecial={isSpecial}
898-
className='font-[470] font-season text-[#939393] text-sm dark:text-[#939393]'
894+
className='font-[470] font-season text-[#939393] text-sm'
899895
/>
900896
</div>
901897
{isExpandableTool && expanded && <div>{renderPendingDetails()}</div>}

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/user-input/components/mention-menu/mention-menu.tsx

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -552,15 +552,11 @@ export function MentionMenu({
552552
active={index === submenuActiveIndex}
553553
>
554554
<span className='min-w-0 flex-1 truncate'>{log.workflowName}</span>
555-
<span className='text-[10px] text-[var(--text-tertiary)] dark:text-[var(--text-tertiary)]'>
556-
·
557-
</span>
555+
<span className='text-[10px] text-[var(--text-tertiary)]'>·</span>
558556
<span className='whitespace-nowrap text-[10px]'>
559557
{formatTimestamp(log.createdAt)}
560558
</span>
561-
<span className='text-[10px] text-[var(--text-tertiary)] dark:text-[var(--text-tertiary)]'>
562-
·
563-
</span>
559+
<span className='text-[10px] text-[var(--text-tertiary)]'>·</span>
564560
<span className='text-[10px] capitalize'>
565561
{(log.trigger || 'manual').toLowerCase()}
566562
</span>
@@ -587,9 +583,7 @@ export function MentionMenu({
587583
<span className='flex-1 truncate'>{item.label}</span>
588584
{item.category === 'logs' && (
589585
<>
590-
<span className='text-[10px] text-[var(--text-tertiary)] dark:text-[var(--text-tertiary)]'>
591-
·
592-
</span>
586+
<span className='text-[10px] text-[var(--text-tertiary)]'>·</span>
593587
<span className='whitespace-nowrap text-[10px]'>
594588
{formatTimestamp(item.data.createdAt)}
595589
</span>
@@ -762,15 +756,11 @@ export function MentionMenu({
762756
mentionData.logsList.map((log) => (
763757
<PopoverItem key={log.id} onClick={() => insertLogMention(log)}>
764758
<span className='min-w-0 flex-1 truncate'>{log.workflowName}</span>
765-
<span className='text-[10px] text-[var(--text-tertiary)] dark:text-[var(--text-tertiary)]'>
766-
·
767-
</span>
759+
<span className='text-[10px] text-[var(--text-tertiary)]'>·</span>
768760
<span className='whitespace-nowrap text-[10px]'>
769761
{formatTimestamp(log.createdAt)}
770762
</span>
771-
<span className='text-[10px] text-[var(--text-tertiary)] dark:text-[var(--text-tertiary)]'>
772-
·
773-
</span>
763+
<span className='text-[10px] text-[var(--text-tertiary)]'>·</span>
774764
<span className='text-[10px] capitalize'>
775765
{(log.trigger || 'manual').toLowerCase()}
776766
</span>

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/welcome/welcome.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,14 @@ export function Welcome({ onQuestionClick, mode = 'ask' }: WelcomeProps) {
6464
>
6565
<div className='flex flex-col items-start'>
6666
<p className='font-medium'>{title}</p>
67-
<p className='text-[var(--text-secondary)] dark:text-[var(--text-secondary)]'>
68-
{question}
69-
</p>
67+
<p className='text-[var(--text-secondary)]'>{question}</p>
7068
</div>
7169
</Button>
7270
))}
7371
</div>
7472

7573
{/* Tips */}
76-
<p className='pt-[12px] text-center text-[13px] text-[var(--text-secondary)] dark:text-[var(--text-secondary)]'>
74+
<p className='pt-[12px] text-center text-[13px] text-[var(--text-secondary)]'>
7775
Tip: Use <span className='font-medium'>@</span> to reference chats, workflows, knowledge,
7876
blocks, or templates
7977
</p>

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/copilot.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,8 @@ export const Copilot = forwardRef<CopilotRef, CopilotProps>(({ panelWidth }, ref
385385
className='flex h-full flex-col overflow-hidden'
386386
>
387387
{/* Header */}
388-
<div className='flex flex-shrink-0 items-center justify-between rounded-[4px] bg-[#2A2A2A] px-[12px] py-[8px] dark:bg-[#2A2A2A]'>
389-
<h2 className='font-medium text-[14px] text-[var(--white)] dark:text-[var(--white)]'>
388+
<div className='flex flex-shrink-0 items-center justify-between rounded-[4px] bg-[#2A2A2A] px-[12px] py-[8px]'>
389+
<h2 className='font-medium text-[14px] text-[var(--white)]'>
390390
{currentChat?.title || 'New Chat'}
391391
</h2>
392392
<div className='flex items-center gap-[8px]'>
@@ -405,7 +405,7 @@ export const Copilot = forwardRef<CopilotRef, CopilotProps>(({ panelWidth }, ref
405405
<ChatHistorySkeleton />
406406
</PopoverScrollArea>
407407
) : groupedChats.length === 0 ? (
408-
<div className='px-[6px] py-[16px] text-center text-[12px] text-[var(--white)] dark:text-[var(--white)]'>
408+
<div className='px-[6px] py-[16px] text-center text-[12px] text-[var(--white)]'>
409409
No chats yet
410410
</div>
411411
) : (

0 commit comments

Comments
 (0)