Skip to content
TypeScript

fix(web): render citations in queued messages (#12403)

maria5d9e27a59688
diff --git a/apps/web/src/components/chat/MessagesTimeline.tsx b/apps/web/src/components/chat/MessagesTimeline.tsx
index 42a45b99102..17e8fb1f56c 100644
--- a/apps/web/src/components/chat/MessagesTimeline.tsx
+++ b/apps/web/src/components/chat/MessagesTimeline.tsx
@@ -1778,7 +1778,7 @@ function QueuedMessageTimelineRow({
<div className="flex flex-col items-end" data-queued-message-id={queuedMessage.id}>
<div className="max-w-[80%] rounded-2xl border border-dashed border-border p-3 text-message-foreground/80">
{text.length > 0 ? (
- <div className="whitespace-pre-wrap break-words text-sm">{text}</div>
+ <UserMessageBody text={text} skills={ctx.skills} markdownCwd={ctx.markdownCwd} />
) : null}
{attachmentCount > 0 || contextCount > 0 ? (
<div className={cn("text-secondary-label text-xs", text.length > 0 && "mt-1.5")}>
@@ -4067,7 +4067,7 @@ const CollapsibleUserMessageBody = memo(function CollapsibleUserMessageBody(prop
const UserMessageBody = memo(function UserMessageBody(props: {
text: string;
- renderContextReference: (reference: ChatMarkdownContextReference) => ReactNode;
+ renderContextReference?: (reference: ChatMarkdownContextReference) => ReactNode;
skills: ReadonlyArray<Pick<ServerProviderSkill, "name" | "displayName">>;
markdownCwd: string | undefined;
}) {