diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-modal/copilot-modal.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-modal/copilot-modal.tsx
index 69c4a547bd..4c04c4c469 100644
--- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-modal/copilot-modal.tsx
+++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-modal/copilot-modal.tsx
@@ -61,6 +61,19 @@ function ModalCopilotMessage({ message }: CopilotModalMessage) {
return match
})
+ // Also replace standalone ↗ symbols with clickable citation links
+ if (citations && citations.length > 0) {
+ let citationIndex = 0
+ processedText = processedText.replace(/↗/g, () => {
+ if (citationIndex < citations.length) {
+ const citation = citations[citationIndex]
+ citationIndex++
+ return `↗`
+ }
+ return '↗'
+ })
+ }
+
return processedText
}
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 0a88eb4d53..1676d25559 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
@@ -342,6 +342,20 @@ export const Copilot = forwardRef(
return match
})
+ // Also replace standalone ↗ symbols with clickable citation links
+ // This handles cases where the LLM outputs ↗ directly
+ if (citations && citations.length > 0) {
+ let citationIndex = 0
+ processedContent = processedContent.replace(/↗/g, () => {
+ if (citationIndex < citations.length) {
+ const citation = citations[citationIndex]
+ citationIndex++
+ return `↗`
+ }
+ return '↗'
+ })
+ }
+
// Basic markdown processing for better formatting
processedContent = processedContent
// Handle code blocks