Skip to content

Commit cbe0443

Browse files
fix: 优化执行详情显示
1 parent 1f88ee2 commit cbe0443

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

ui/src/components/ai-chat/ExecutionDetailDialog.vue

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,23 @@
348348
v-for="(history, historyIndex) in item.history_message"
349349
:key="historyIndex"
350350
>
351-
<span class="color-secondary mr-4">{{ history.role }}:</span
352-
><span>{{ history.content }}</span>
351+
<span class="color-secondary mr-4">{{ history.role }}:</span>
352+
353+
<span v-if="Array.isArray(history.content)">
354+
<template v-for="(h, i) in history.content" :key="i">
355+
<el-image
356+
v-if="h.type === 'image_url'"
357+
:src="h.image_url.url"
358+
alt=""
359+
fit="cover"
360+
style="width: 40px; height: 40px; display: block"
361+
class="border-r-4"
362+
/>
363+
<span v-else>{{ h.text }}</span>
364+
</template>
365+
</span>
366+
367+
<span v-else>{{ history.content }}</span>
353368
</p>
354369
</template>
355370
<template v-else> - </template>
@@ -359,7 +374,7 @@
359374
<h5 class="p-8-12">本次对话</h5>
360375
<div class="p-8-12 border-t-dashed lighter pre-wrap">
361376
<div v-if="item.image_list?.length > 0">
362-
<p class="mb-8 color-secondary">文件:</p>
377+
<p class="mb-8 color-secondary">图片:</p>
363378
<el-space wrap>
364379
<template v-for="(f, i) in item.image_list" :key="i">
365380
<el-image
@@ -371,7 +386,6 @@
371386
/>
372387
</template>
373388
</el-space>
374-
<p class="mb-8 color-secondary">提示词:</p>
375389
{{ item.question || '-' }}
376390
</div>
377391
</div>

0 commit comments

Comments
 (0)