Skip to content

Commit 9c27950

Browse files
committed
Fix lint
1 parent 6fdb45a commit 9c27950

13 files changed

Lines changed: 56 additions & 28 deletions

File tree

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ const markdownComponents = {
158158

159159
// Headings - minimal margins for chat context
160160
h1: ({ children }: React.HTMLAttributes<HTMLHeadingElement>) => (
161-
<h1 className='mt-2 mb-1 font-season font-semibold text-base text-[var(--text-primary)] first:mt-0'>
161+
<h1 className='mt-2 mb-1 font-season font-semibold text-[var(--text-primary)] text-base first:mt-0'>
162162
{children}
163163
</h1>
164164
),
@@ -168,12 +168,12 @@ const markdownComponents = {
168168
</h2>
169169
),
170170
h3: ({ children }: React.HTMLAttributes<HTMLHeadingElement>) => (
171-
<h3 className='mt-1.5 mb-0.5 font-season font-semibold text-sm text-[var(--text-primary)] first:mt-0'>
171+
<h3 className='mt-1.5 mb-0.5 font-season font-semibold text-[var(--text-primary)] text-sm first:mt-0'>
172172
{children}
173173
</h3>
174174
),
175175
h4: ({ children }: React.HTMLAttributes<HTMLHeadingElement>) => (
176-
<h4 className='mt-1.5 mb-0.5 font-season font-semibold text-sm text-[var(--text-primary)] first:mt-0'>
176+
<h4 className='mt-1.5 mb-0.5 font-season font-semibold text-[var(--text-primary)] text-sm first:mt-0'>
177177
{children}
178178
</h4>
179179
),
@@ -197,7 +197,7 @@ const markdownComponents = {
197197
),
198198
li: ({ children }: React.LiHTMLAttributes<HTMLLIElement>) => (
199199
<li
200-
className='font-base font-season text-sm text-[var(--text-primary)] leading-[1.4] dark:font-[470]'
200+
className='font-base font-season text-[var(--text-primary)] text-sm leading-[1.4] dark:font-[470]'
201201
style={{ display: 'list-item' }}
202202
>
203203
{children}
@@ -295,9 +295,7 @@ const markdownComponents = {
295295
</div>
296296
),
297297
thead: ({ children }: React.HTMLAttributes<HTMLTableSectionElement>) => (
298-
<thead className='bg-[var(--surface-5)] text-left dark:bg-[var(--surface-4)]'>
299-
{children}
300-
</thead>
298+
<thead className='bg-[var(--surface-5)] text-left dark:bg-[var(--surface-4)]'>{children}</thead>
301299
),
302300
tbody: ({ children }: React.HTMLAttributes<HTMLTableSectionElement>) => (
303301
<tbody className='divide-y divide-[var(--border-1)]'>{children}</tbody>
@@ -331,7 +329,7 @@ const markdownComponents = {
331329
*/
332330
function CopilotMarkdownRenderer({ content }: CopilotMarkdownRendererProps) {
333331
return (
334-
<div className='max-w-full break-words font-base font-season text-[var(--text-primary)] text-sm leading-[1.4] [&_*]:max-w-full [&_a]:break-all [&_code:not(pre_code)]:break-words [&_li]:break-words [&_p]:break-words dark:font-[470]'>
332+
<div className='max-w-full break-words font-base font-season text-[var(--text-primary)] text-sm leading-[1.4] dark:font-[470] [&_*]:max-w-full [&_a]:break-all [&_code:not(pre_code)]:break-words [&_li]:break-words [&_p]:break-words'>
335333
<ReactMarkdown remarkPlugins={[remarkGfm]} components={markdownComponents}>
336334
{content}
337335
</ReactMarkdown>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,9 @@ export const SmoothStreamingText = memo(
168168
},
169169
(prevProps, nextProps) => {
170170
// Prevent re-renders during streaming unless content actually changed
171-
return prevProps.content === nextProps.content && prevProps.isStreaming === nextProps.isStreaming
171+
return (
172+
prevProps.content === nextProps.content && prevProps.isStreaming === nextProps.isStreaming
173+
)
172174
}
173175
)
174176

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ const SmoothThinkingText = memo(
7777
if (elapsed >= THINKING_DELAY) {
7878
if (currentIndex < currentContent.length) {
7979
// Reveal multiple characters per frame for faster streaming
80-
const newIndex = Math.min(currentIndex + THINKING_CHARS_PER_FRAME, currentContent.length)
80+
const newIndex = Math.min(
81+
currentIndex + THINKING_CHARS_PER_FRAME,
82+
currentContent.length
83+
)
8184
const newDisplayed = currentContent.slice(0, newIndex)
8285
setDisplayedContent(newDisplayed)
8386
indexRef.current = newIndex
@@ -142,7 +145,9 @@ const SmoothThinkingText = memo(
142145
)
143146
},
144147
(prevProps, nextProps) => {
145-
return prevProps.content === nextProps.content && prevProps.isStreaming === nextProps.isStreaming
148+
return (
149+
prevProps.content === nextProps.content && prevProps.isStreaming === nextProps.isStreaming
150+
)
146151
}
147152
)
148153

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1973,7 +1973,7 @@ export function ToolCall({ toolCall: toolCallProp, toolCallId, onStateChange }:
19731973
'tour',
19741974
'info',
19751975
'workflow',
1976-
'superagent'
1976+
'superagent',
19771977
]
19781978
const isSubagentTool = SUBAGENT_TOOLS.includes(toolCall.name)
19791979

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,9 @@ export function SlashMenu({ mentionMenu, message, onSelectCommand }: SlashMenuPr
229229
id='web'
230230
title='Web'
231231
onOpen={() => setOpenSubmenuFor('Web')}
232-
active={isInFolderNavigationMode && mentionActiveIndex === TOP_LEVEL_COMMANDS.length}
232+
active={
233+
isInFolderNavigationMode && mentionActiveIndex === TOP_LEVEL_COMMANDS.length
234+
}
233235
data-idx={TOP_LEVEL_COMMANDS.length}
234236
>
235237
{WEB_COMMANDS.map((cmd) => (

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

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,13 @@ const UserInput = forwardRef<UserInputRef, UserInputProps>(
430430
const last = WEB_COMMANDS.length - 1
431431
mentionMenu.setSubmenuActiveIndex((prev) => {
432432
const next =
433-
e.key === 'ArrowDown' ? (prev >= last ? 0 : prev + 1) : prev <= 0 ? last : prev - 1
433+
e.key === 'ArrowDown'
434+
? prev >= last
435+
? 0
436+
: prev + 1
437+
: prev <= 0
438+
? last
439+
: prev - 1
434440
requestAnimationFrame(() => mentionMenu.scrollActiveItemIntoView(next))
435441
return next
436442
})
@@ -441,7 +447,13 @@ const UserInput = forwardRef<UserInputRef, UserInputProps>(
441447
mentionMenu.setSubmenuActiveIndex((prev) => {
442448
if (filtered.length === 0) return 0
443449
const next =
444-
e.key === 'ArrowDown' ? (prev >= last ? 0 : prev + 1) : prev <= 0 ? last : prev - 1
450+
e.key === 'ArrowDown'
451+
? prev >= last
452+
? 0
453+
: prev + 1
454+
: prev <= 0
455+
? last
456+
: prev - 1
445457
requestAnimationFrame(() => mentionMenu.scrollActiveItemIntoView(next))
446458
return next
447459
})
@@ -451,7 +463,13 @@ const UserInput = forwardRef<UserInputRef, UserInputProps>(
451463
const last = totalItems - 1
452464
mentionMenu.setMentionActiveIndex((prev) => {
453465
const next =
454-
e.key === 'ArrowDown' ? (prev >= last ? 0 : prev + 1) : prev <= 0 ? last : prev - 1
466+
e.key === 'ArrowDown'
467+
? prev >= last
468+
? 0
469+
: prev + 1
470+
: prev <= 0
471+
? last
472+
: prev - 1
455473
requestAnimationFrame(() => mentionMenu.scrollActiveItemIntoView(next))
456474
return next
457475
})
@@ -502,7 +520,8 @@ const UserInput = forwardRef<UserInputRef, UserInputProps>(
502520

503521
if (mentionMenu.openSubmenuFor === 'Web') {
504522
// Select from Web submenu
505-
const selectedCommand = WEB_COMMANDS[mentionMenu.submenuActiveIndex] || WEB_COMMANDS[0]
523+
const selectedCommand =
524+
WEB_COMMANDS[mentionMenu.submenuActiveIndex] || WEB_COMMANDS[0]
506525
handleSlashCommandSelect(selectedCommand)
507526
} else if (showAggregatedView) {
508527
// Select from filtered view
@@ -831,7 +850,9 @@ const UserInput = forwardRef<UserInputRef, UserInputProps>(
831850
(disabled || isLoading) && 'cursor-not-allowed'
832851
)}
833852
>
834-
<span className='flex h-3 w-3 items-center justify-center text-[11px] font-medium leading-none'>/</span>
853+
<span className='flex h-3 w-3 items-center justify-center font-medium text-[11px] leading-none'>
854+
/
855+
</span>
835856
</Badge>
836857

837858
{/* Selected Context Pills */}

apps/sim/lib/copilot/tools/client/blocks/get-block-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { createLogger } from '@sim/logger'
22
import { FileCode, Loader2, MinusCircle, XCircle } from 'lucide-react'
3-
import { getBlock } from '@/blocks/registry'
43
import {
54
BaseClientTool,
65
type BaseClientToolMetadata,
@@ -11,6 +10,7 @@ import {
1110
GetBlockConfigInput,
1211
GetBlockConfigResult,
1312
} from '@/lib/copilot/tools/shared/schemas'
13+
import { getBlock } from '@/blocks/registry'
1414

1515
interface GetBlockConfigArgs {
1616
blockType: string

apps/sim/lib/copilot/tools/client/blocks/get-block-options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { createLogger } from '@sim/logger'
22
import { ListFilter, Loader2, MinusCircle, XCircle } from 'lucide-react'
3-
import { getBlock } from '@/blocks/registry'
43
import {
54
BaseClientTool,
65
type BaseClientToolMetadata,
@@ -11,6 +10,7 @@ import {
1110
GetBlockOptionsInput,
1211
GetBlockOptionsResult,
1312
} from '@/lib/copilot/tools/shared/schemas'
13+
import { getBlock } from '@/blocks/registry'
1414

1515
interface GetBlockOptionsArgs {
1616
blockId: string

apps/sim/lib/copilot/tools/client/other/crawl-website.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,3 @@ export class CrawlWebsiteClientTool extends BaseClientTool {
5151
return
5252
}
5353
}
54-

apps/sim/lib/copilot/tools/client/other/get-page-contents.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,3 @@ export class GetPageContentsClientTool extends BaseClientTool {
5252
return
5353
}
5454
}
55-

0 commit comments

Comments
 (0)