Skip to content

Commit 3fbdd7c

Browse files
committed
fix: build errors
1 parent 30e0f21 commit 3fbdd7c

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { memo, useState } from 'react'
22
import { FileText, Image } from 'lucide-react'
3-
import type { MessageFileAttachment } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/copilot/components/user-input/user-input'
3+
import type { MessageFileAttachment } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/copilot/components/user-input/hooks/use-file-attachments'
44

55
/**
66
* File size units for formatting

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/copilot/components/user-input/hooks/use-mention-keyboard.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -520,13 +520,15 @@ export function useMentionKeyboard({
520520
const idx = Math.max(0, Math.min(submenuActiveIndex, aggregated.length - 1))
521521
const chosen = aggregated[idx]
522522
if (chosen) {
523-
if (chosen.type === 'Chats') insertPastChatMention(chosen.value)
524-
else if (chosen.type === 'Workflows') insertWorkflowMention(chosen.value)
525-
else if (chosen.type === 'Knowledge') insertKnowledgeMention(chosen.value)
526-
else if (chosen.type === 'Workflow Blocks') insertWorkflowBlockMention(chosen.value)
527-
else if (chosen.type === 'Blocks') insertBlockMention(chosen.value)
528-
else if (chosen.type === 'Templates') insertTemplateMention(chosen.value)
529-
else if (chosen.type === 'Logs') insertLogMention(chosen.value)
523+
if (chosen.type === 'Chats') insertPastChatMention(chosen.value as ChatItem)
524+
else if (chosen.type === 'Workflows') insertWorkflowMention(chosen.value as WorkflowItem)
525+
else if (chosen.type === 'Knowledge')
526+
insertKnowledgeMention(chosen.value as KnowledgeItem)
527+
else if (chosen.type === 'Workflow Blocks')
528+
insertWorkflowBlockMention(chosen.value as BlockItem)
529+
else if (chosen.type === 'Blocks') insertBlockMention(chosen.value as BlockItem)
530+
else if (chosen.type === 'Templates') insertTemplateMention(chosen.value as TemplateItem)
531+
else if (chosen.type === 'Logs') insertLogMention(chosen.value as LogItem)
530532
}
531533
} else if (!openSubmenuFor && selected === 'Chats') {
532534
resetActiveMentionQuery()

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-node-utilities.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export function useNodeUtilities(blocks: Record<string, any>) {
171171
dimensions: { width: number; height: number }
172172
} | null => {
173173
const containingNodes = getNodes()
174-
.filter((n) => isContainerType(n.type))
174+
.filter((n) => n.type && isContainerType(n.type))
175175
.filter((n) => {
176176
// Use absolute coordinates for nested containers
177177
const absolutePos = getNodeAbsolutePosition(n.id)
@@ -241,7 +241,7 @@ export function useNodeUtilities(blocks: Record<string, any>) {
241241
maxY = Math.max(maxY, node.position.y + nodeHeight + 50)
242242
})
243243

244-
const hasNestedContainers = childNodes.some((node) => isContainerType(node.type))
244+
const hasNestedContainers = childNodes.some((node) => node.type && isContainerType(node.type))
245245

246246
const sidePadding = hasNestedContainers ? 150 : 120
247247

@@ -262,7 +262,7 @@ export function useNodeUtilities(blocks: Record<string, any>) {
262262
const resizeLoopNodes = useCallback(
263263
(updateNodeDimensions: (id: string, dimensions: { width: number; height: number }) => void) => {
264264
const containerNodes = getNodes()
265-
.filter((node) => isContainerType(node.type))
265+
.filter((node) => node.type && isContainerType(node.type))
266266
.map((node) => ({
267267
...node,
268268
depth: getNodeDepth(node.id),

0 commit comments

Comments
 (0)