fix(web): stabilize compact card snapshots
This commit is contained in:
@@ -275,7 +275,7 @@ const CommandRow = memo(function CommandRow({ renderSlot, node, compaction, t }:
|
||||
t: ChatViewSlotProps['t']
|
||||
}) {
|
||||
const owner = useMemo(() => ({ node, ...compaction === undefined ? {} : { compaction } }), [compaction, node])
|
||||
const fallback = node.name === 'compact' || compaction !== undefined
|
||||
const fallback = node.name === 'compact'
|
||||
? <CompactionCommandCard {...owner} t={t} />
|
||||
: <GenericCommandCard {...owner} t={t} />
|
||||
return (
|
||||
|
||||
@@ -19,7 +19,7 @@ export function CompactionCommandCard({ node, compaction, t }: CompactionCommand
|
||||
return (
|
||||
<CompactionItem
|
||||
node={compaction}
|
||||
title={node.name ?? 'compact'}
|
||||
title="compact"
|
||||
fallbackSummary={node.outcome?.text ?? null}
|
||||
t={t}
|
||||
/>
|
||||
@@ -31,7 +31,7 @@ export function CompactionCommandCard({ node, compaction, t }: CompactionCommand
|
||||
t={t}
|
||||
variant="others"
|
||||
icon={<IconApiOutline14 size={14} />}
|
||||
title={node.name ?? 'compact'}
|
||||
title="compact"
|
||||
summary={t('message.compaction.running')}
|
||||
body={null}
|
||||
state="running"
|
||||
|
||||
@@ -21,7 +21,7 @@ interface CompactionItemProps {
|
||||
node: CompactionSummaryNode
|
||||
/** Optional command title for a manual compaction folded into this marker. */
|
||||
title?: string
|
||||
/** Command settlement text used only when the summary provenance page is absent. */
|
||||
/** Command settlement text used when structured compaction counts are unavailable. */
|
||||
fallbackSummary?: string | null
|
||||
/** The owning view's locale seat. */
|
||||
t: ChatViewSlotProps['t']
|
||||
|
||||
@@ -155,7 +155,6 @@ export function deriveChatFlow(nodes: readonly ConversationNode[]): ChatFlowItem
|
||||
for (const node of nodes) {
|
||||
if (rendersNothing(node)) continue
|
||||
if (node.kind === 'command' && pairs.byCommandId.has(node.commandId)) {
|
||||
group = null
|
||||
continue
|
||||
}
|
||||
if (node.kind === 'compaction') {
|
||||
|
||||
Reference in New Issue
Block a user