Skip to content

Commit 20f27c3

Browse files
committed
refactor: enhance AI chat node display with additional reasoning content and improved formatting
1 parent 5ffc54c commit 20f27c3

1 file changed

Lines changed: 37 additions & 3 deletions

File tree

  • ui/src/components/execution-detail-card

ui/src/components/execution-detail-card/index.vue

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@
188188
</template>
189189
<!-- AI 对话 -->
190190
<template
191-
v-if="data.type == WorkflowType.AiChat || data.type == WorkflowType.ImageUnderstandNode || data.type == WorkflowType.VideoUnderstandNode">
191+
v-if="data.type == WorkflowType.AiChat">
192192
<div class="card-never border-r-6">
193193
<h5 class="p-8-12">
194194
{{ $t('views.application.form.roleSettings.label') }}
@@ -609,6 +609,22 @@
609609
</div>
610610
</div>
611611
</div>
612+
<div class="card-never border-r-6 mt-8">
613+
<h5 class="p-8-12">
614+
{{ $t('workflow.nodes.aiChatNode.think') }}
615+
</h5>
616+
<div class="p-8-12 border-t-dashed lighter">
617+
<MdPreview
618+
v-if="data.reasoning_content"
619+
ref="editorRef"
620+
editorId="preview-only"
621+
:modelValue="data.reasoning_content"
622+
style="background: none"
623+
noImgZoomIn
624+
/>
625+
<template v-else> -</template>
626+
</div>
627+
</div>
612628
<div class="card-never border-r-6 mt-8">
613629
<h5 class="p-8-12">
614630
{{ $t('chat.executionDetails.answer') }}
@@ -693,6 +709,22 @@
693709
</div>
694710
</div>
695711
</div>
712+
<div class="card-never border-r-6 mt-8">
713+
<h5 class="p-8-12">
714+
{{ $t('workflow.nodes.aiChatNode.think') }}
715+
</h5>
716+
<div class="p-8-12 border-t-dashed lighter">
717+
<MdPreview
718+
v-if="data.reasoning_content"
719+
ref="editorRef"
720+
editorId="preview-only"
721+
:modelValue="data.reasoning_content"
722+
style="background: none"
723+
noImgZoomIn
724+
/>
725+
<template v-else> -</template>
726+
</div>
727+
</div>
696728
<div class="card-never border-r-6 mt-8">
697729
<h5 class="p-8-12">
698730
{{ $t('chat.executionDetails.answer') }}
@@ -882,7 +914,8 @@
882914
</h5>
883915
<div class="p-8-12 border-t-dashed lighter">
884916
<div v-for="(f, i) in data.result_list" :key="i" class="mb-8">
885-
<span class="color-secondary">{{ f.name }} ({{ f.input_type }}):</span> {{ f.input_value }}
917+
<span class="color-secondary">{{ f.name }} ({{ f.input_type }}):</span>
918+
{{ f.input_value }}
886919
</div>
887920
</div>
888921
</div>
@@ -892,7 +925,8 @@
892925
</h5>
893926
<div class="p-8-12 border-t-dashed lighter">
894927
<div v-for="(f, i) in data.result_list" :key="i" class="mb-8">
895-
<span class="color-secondary">{{ f.name }} ({{ f.output_type }}):</span> {{ f.output_value }}
928+
<span class="color-secondary">{{ f.name }} ({{ f.output_type }}):</span>
929+
{{ f.output_value }}
896930
</div>
897931
</div>
898932
</div>

0 commit comments

Comments
 (0)