<template>
	<div class="entry-card entry-card--compaction">
		<div class="entry-card__top">
			<span class="entry-chip">上下文压缩</span>
			<span class="entry-stats">
				{{ compactionTokenLabel(entry) }}
			</span>
		</div>
		<div class="node-meta-row">
			<span v-if="compactionBoundaryLabel(entry)" class="node-meta-pill">
				保留边界 {{ compactionBoundaryLabel(entry) }}
			</span>
		</div>
		<p>{{ compactionSummaryText(entry) }}</p>
	</div>
</template>

<script lang="ts" setup>
import type { SessionTreeEntry } from '../../types/index.d';

defineProps<{
	entry: SessionTreeEntry;
	compactionSummaryText: (entry: SessionTreeEntry) => string;
	compactionTokenLabel: (entry: SessionTreeEntry) => string;
	compactionBoundaryLabel: (entry: SessionTreeEntry) => string;
}>();
</script>
