Reserve the rich PR card for the chat work drawer

Plain dropped GitHub PR links go back to the compact static chip they
had before; the live rich card (status, diff stats) now appears only in
the chat work drawer — at the same compact-attachment scale as the
generic chips — and agent-authored messages keep their banner variant.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
klopez4212
2026-07-04 11:57:34 +01:00
parent 0640bd31b2
commit 090d5f6d9c

View File

@@ -38,7 +38,6 @@ import { AttachmentGroup } from "@/shared/ui/attachment";
import { ConfigNudgeCard } from "@/shared/ui/config-nudge-attachment";
import {
AgentPullRequestCard,
GithubPullRequestCard,
LinkPreviewAttachment,
} from "@/shared/ui/link-preview-attachment";
import { useSmoothCorners } from "@/shared/ui/smoothCorners";
@@ -2078,13 +2077,11 @@ function MarkdownInner({
data-link-preview-list=""
>
{resolvedLinkPreviews.map((preview) =>
preview.kind === "github-pull-request" ? (
agentAuthored ? (
<AgentPullRequestCard key={preview.href} preview={preview} />
) : (
<GithubPullRequestCard key={preview.href} preview={preview} />
)
preview.kind === "github-pull-request" && agentAuthored ? (
<AgentPullRequestCard key={preview.href} preview={preview} />
) : (
// Plain dropped links keep the compact static chip; the
// live rich card is reserved for the chat work drawer.
<LinkPreviewAttachment key={preview.href} preview={preview} />
),
)}