fix(provider): remove stale image preview block from model test dialog

This commit is contained in:
ZheFox
2026-05-20 20:53:13 +08:00
parent d3355a8a09
commit 8838e9289b

View File

@@ -393,39 +393,6 @@
</div>
</div>
<div
v-if="resultImagePreviews.length > 0"
class="rounded-lg border border-border/60 bg-muted/20 p-3 space-y-3"
>
<div class="flex items-center justify-between gap-3 text-xs text-muted-foreground">
<span>图片预览</span>
<span>{{ resultImagePreviews.length }} </span>
</div>
<div class="grid gap-3 sm:grid-cols-2 lg:grid-cols-3">
<button
v-for="(preview, index) in resultImagePreviews"
:key="`${preview.src}-${index}`"
type="button"
class="group overflow-hidden rounded-md border border-border/60 bg-background text-left transition-colors hover:border-primary/60 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary/70"
:title="preview.label"
@click="openImagePreview(preview)"
>
<div class="aspect-square w-full overflow-hidden bg-muted/30">
<img
:src="preview.src"
:alt="preview.label"
class="h-full w-full object-contain"
loading="lazy"
>
</div>
<div class="flex items-center justify-between gap-2 border-t border-border/60 px-2 py-1 text-[11px] text-muted-foreground">
<span>{{ preview.label }}</span>
<span>{{ preview.source === 'base64' ? 'base64' : 'URL' }}</span>
</div>
</button>
</div>
</div>
<div
v-if="shouldCollapseAttempts"
class="flex items-center justify-between gap-3 text-xs text-muted-foreground"
@@ -1296,12 +1263,6 @@ const resultImageAttempt = computed(() => {
?? null
})
const resultImagePreviews = computed(() => (
resultImageAttempt.value
? extractModelTestImagePreviews(resultImageAttempt.value.response_body)
: []
))
const resultWinningTitle = computed(() => {
const summary = resultSummary.value
const keyName = summary.winning_key_name || summary.winning_key_id