Skip to content

Commit 2cca078

Browse files
committed
address comments
1 parent f932278 commit 2cca078

1 file changed

Lines changed: 8 additions & 16 deletions

File tree

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

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

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -349,22 +349,14 @@ export function useMentionData(props: UseMentionDataProps): MentionDataReturn {
349349
query: { workspaceId, limit: 50, details: 'full' },
350350
})
351351
const items = data.data
352-
const mapped = items.map((l) => {
353-
const workflowName =
354-
(l.workflow &&
355-
((l.workflow.name as string | null | undefined) ||
356-
(l.workflow as Record<string, unknown>).title)) ||
357-
(l as Record<string, unknown>).workflowName ||
358-
'Untitled Workflow'
359-
return {
360-
id: l.id,
361-
executionId: l.executionId || l.id,
362-
level: l.level,
363-
trigger: l.trigger || null,
364-
createdAt: l.createdAt,
365-
workflowName: typeof workflowName === 'string' ? workflowName : 'Untitled Workflow',
366-
}
367-
})
352+
const mapped = items.map((l) => ({
353+
id: l.id,
354+
executionId: l.executionId || l.id,
355+
level: l.level,
356+
trigger: l.trigger || null,
357+
createdAt: l.createdAt,
358+
workflowName: l.workflow?.name ?? 'Untitled Workflow',
359+
}))
368360
setLogsList(mapped)
369361
} catch {
370362
} finally {

0 commit comments

Comments
 (0)