From 728332ce9364efa4bc2b0071cf04784c0e75cf27 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Wed, 11 Nov 2026 13:16:58 -0800 Subject: [PATCH] chore(deps): bump streamdown to 2.7.1 Streamdown 2.6+ hands streaming placeholders (streamdown:incomplete-link, streamdown:incomplete-image) to custom components instead of stripping them, so the mothership chat link and image renderers now withhold those until the URL completes. --- .../components/chat-content/chat-content.tsx | 25 ++++++++++++------- apps/sim/package.json | 2 +- bun.lock | 10 +++----- packages/workflow-renderer/package.json | 2 +- 4 files changed, 22 insertions(+), 17 deletions(-) diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/chat-content/chat-content.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/chat-content/chat-content.tsx index f1fdb49e952..a5dc59d2132 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/chat-content/chat-content.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/chat-content/chat-content.tsx @@ -189,6 +189,14 @@ function SourceReference({ index, children }: SourceReferenceProps) { ) } +/** + * Placeholder URLs Streamdown's streaming parser substitutes for a link or image + * whose URL is still arriving. Neither resolves, so a pending link renders as + * its text and a pending image is withheld until the URL completes. + */ +const INCOMPLETE_LINK_HREF = 'streamdown:incomplete-link' +const INCOMPLETE_IMAGE_SRC = 'streamdown:incomplete-image' + const WORKSPACE_LINK_PREFIX = '#sim-workspace-ref-' const WorkspaceRefsContext = createContext<{ resources: WorkspaceResourceTagData[] @@ -375,6 +383,7 @@ const MARKDOWN_COMPONENTS = { href?: string 'data-footnote-ref'?: boolean }) { + if (href === INCOMPLETE_LINK_HREF) return <>{children} if (href?.startsWith(SOURCE_LINK_PREFIX)) { return ( @@ -488,7 +497,7 @@ const MARKDOWN_COMPONENTS = { return {children} }, img({ src, alt }: ComponentPropsWithoutRef<'img'>) { - if (typeof src !== 'string' || !src) return null + if (typeof src !== 'string' || !src || src === INCOMPLETE_IMAGE_SRC) return null return (