chore: test deploy snapshot
This commit is contained in:
@@ -66,6 +66,7 @@ import { ChatActivityChecklist, buildChatActivityChecklistEntries } from './Chat
|
||||
import { describeExecutorCommand } from './executorActivitySummary';
|
||||
import { buildComposerFilePickKey } from './composerFilePickKey';
|
||||
import { ChatPromptCard, buildPromptTargetSignature, type PromptDraftSelection, type PromptSubmitPayload } from './ChatPromptCard';
|
||||
import { ChatStructuredPreviewCard } from './ChatStructuredPreviewCard';
|
||||
import { openChatExternalLink } from './linkNavigation';
|
||||
import { classifyPreviewKind } from './previewKind';
|
||||
import { isPromptResolved } from './promptState';
|
||||
@@ -495,6 +496,7 @@ type MessageRenderPayload = {
|
||||
diffBlocks: string[];
|
||||
rankedLinkTargets: RankedLinkPreviewTarget[];
|
||||
linkCardTargets: Extract<ChatMessagePart, { type: 'link_card' }>[];
|
||||
previewCardTargets: Extract<ChatMessagePart, { type: 'preview_card' }>[];
|
||||
promptTargets: Extract<ChatMessagePart, { type: 'prompt' }>[];
|
||||
};
|
||||
|
||||
@@ -1172,6 +1174,17 @@ function extractMessageRenderPayload(message: ChatMessage): MessageRenderPayload
|
||||
...structuredParts.filter((part): part is Extract<ChatMessagePart, { type: 'link_card' }> => part.type === 'link_card'),
|
||||
...extractedMessageParts.parts.filter((part): part is Extract<ChatMessagePart, { type: 'link_card' }> => part.type === 'link_card'),
|
||||
].filter((part, index, collection) => collection.findIndex((candidate) => `${candidate.title}:${candidate.url}` === `${part.title}:${part.url}`) === index);
|
||||
const previewCardTargets = [
|
||||
...structuredParts.filter((part): part is Extract<ChatMessagePart, { type: 'preview_card' }> => part.type === 'preview_card'),
|
||||
...extractedMessageParts.parts.filter((part): part is Extract<ChatMessagePart, { type: 'preview_card' }> => part.type === 'preview_card'),
|
||||
].filter(
|
||||
(part, index, collection) =>
|
||||
collection.findIndex(
|
||||
(candidate) =>
|
||||
`${candidate.title}:${candidate.preview.type}:${candidate.preview.url ?? ''}:${candidate.preview.content ?? ''}` ===
|
||||
`${part.title}:${part.preview.type}:${part.preview.url ?? ''}:${part.preview.content ?? ''}`,
|
||||
) === index,
|
||||
);
|
||||
const promptTargets = (() => {
|
||||
const promptParts = [
|
||||
...structuredParts.filter((part): part is Extract<ChatMessagePart, { type: 'prompt' }> => part.type === 'prompt'),
|
||||
@@ -1219,6 +1232,7 @@ function extractMessageRenderPayload(message: ChatMessage): MessageRenderPayload
|
||||
diffBlocks,
|
||||
rankedLinkTargets,
|
||||
linkCardTargets,
|
||||
previewCardTargets,
|
||||
promptTargets,
|
||||
};
|
||||
}
|
||||
@@ -6098,7 +6112,7 @@ export function ChatConversationView({
|
||||
const baseMessageBodyClassName = `app-chat-message__body${shouldTruncateMessage ? ' app-chat-message__body--collapsed' : ''}${
|
||||
isRecoveredMissingRequest || isRecoveredExecutionFailure ? ' app-chat-message__body--system-status' : ''
|
||||
}`;
|
||||
const { previewSourceText, visibleText, diffBlocks, rankedLinkTargets, linkCardTargets, promptTargets } =
|
||||
const { previewSourceText, visibleText, diffBlocks, rankedLinkTargets, linkCardTargets, previewCardTargets, promptTargets } =
|
||||
messageRenderPayloadById.get(message.id) ?? extractMessageRenderPayload(message);
|
||||
const renderedText = isRecoveredMissingRequest
|
||||
? getMissingRequestMessageText(message)
|
||||
@@ -6122,6 +6136,7 @@ export function ChatConversationView({
|
||||
inlinePreviewTargets.length > 0 ||
|
||||
rankedLinkTargets.length > 0 ||
|
||||
linkCardTargets.length > 0 ||
|
||||
previewCardTargets.length > 0 ||
|
||||
promptTargets.length > 0;
|
||||
const shouldRenderStandalonePreview =
|
||||
hasPreviewCards && !visibleText && (message.author === 'codex' || message.author === 'system');
|
||||
@@ -6540,6 +6555,19 @@ export function ChatConversationView({
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
{previewCardTargets.map((target, index) => (
|
||||
<ChatStructuredPreviewCard
|
||||
key={`${message.id}-preview-card-${index}-${target.title}`}
|
||||
target={target}
|
||||
onOpen={(previewUrl) => {
|
||||
markPreviewArtifactOpened(message.clientRequestId ?? null);
|
||||
|
||||
if (previewUrl) {
|
||||
markPreviewResourceOpened(previewUrl);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
{promptTargets.map((target, index) => (
|
||||
(() => {
|
||||
const selectionKey = buildPendingPromptSelectionKey(message.id, index, target.title, target);
|
||||
|
||||
Reference in New Issue
Block a user