From 7bc644a478adf2e63e72c53033bd75a8216fe1b7 Mon Sep 17 00:00:00 2001 From: Siddharth Ganesan Date: Tue, 8 Jul 2025 16:42:10 -0700 Subject: [PATCH] Better formatting --- .../components/panel/components/copilot/copilot.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/copilot.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/copilot.tsx index d263e65526..e9e536e000 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/copilot.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/copilot.tsx @@ -205,21 +205,21 @@ export const Copilot = forwardRef(({ panelWidth }, ref return date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }) } - // Function to render content with inline hyperlinked citations and basic markdown + // Function to render content with inline hyperlinked citations and basic markdown const renderContentWithCitations = (content: string, sources: Message['sources'] = []) => { if (!content) return content - + let processedContent = content - + // Replace {cite:1}, {cite:2}, etc. with clickable citation icons processedContent = processedContent.replace(/\{cite:(\d+)\}/g, (match, num) => { const sourceIndex = Number.parseInt(num) - 1 const source = sources[sourceIndex] - + if (source) { return `↗` } - + return match })