File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed
ui/src/components/ai-chat Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change 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 >
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
371386 />
372387 </template >
373388 </el-space >
374- <p class =" mb-8 color-secondary" >提示词:</p >
375389 {{ item.question || '-' }}
376390 </div >
377391 </div >
You can’t perform that action at this time.
0 commit comments