|
135 | 135 | v-if=" |
136 | 136 | item.type == WorkflowType.AiChat || |
137 | 137 | item.type == WorkflowType.Question || |
138 | | - item.type == WorkflowType.Application || |
139 | | - item.type == WorkflowType.ImageUnderstandNode |
| 138 | + item.type == WorkflowType.Application |
140 | 139 | " |
141 | 140 | > |
142 | 141 | <div |
|
326 | 325 | </div> |
327 | 326 | </div> |
328 | 327 | </template> |
| 328 | + <!-- 图片理解 --> |
| 329 | + <template v-if="item.type == WorkflowType.ImageUnderstandNode"> |
| 330 | + <div |
| 331 | + class="card-never border-r-4" |
| 332 | + v-if="item.type !== WorkflowType.Application" |
| 333 | + > |
| 334 | + <h5 class="p-8-12">角色设定 (System)</h5> |
| 335 | + <div class="p-8-12 border-t-dashed lighter"> |
| 336 | + {{ item.system || '-' }} |
| 337 | + </div> |
| 338 | + </div> |
| 339 | + <div |
| 340 | + class="card-never border-r-4 mt-8" |
| 341 | + v-if="item.type !== WorkflowType.Application" |
| 342 | + > |
| 343 | + <h5 class="p-8-12">历史记录</h5> |
| 344 | + <div class="p-8-12 border-t-dashed lighter"> |
| 345 | + <template v-if="item.history_message?.length > 0"> |
| 346 | + <p |
| 347 | + class="mt-4 mb-4" |
| 348 | + v-for="(history, historyIndex) in item.history_message" |
| 349 | + :key="historyIndex" |
| 350 | + > |
| 351 | + <span class="color-secondary mr-4">{{ history.role }}:</span |
| 352 | + ><span>{{ history.content }}</span> |
| 353 | + </p> |
| 354 | + </template> |
| 355 | + <template v-else> - </template> |
| 356 | + </div> |
| 357 | + </div> |
| 358 | + <div class="card-never border-r-4 mt-8"> |
| 359 | + <h5 class="p-8-12">本次对话</h5> |
| 360 | + <div class="p-8-12 border-t-dashed lighter pre-wrap"> |
| 361 | + <div v-if="item.image_list?.length > 0"> |
| 362 | + <p class="mb-8 color-secondary">文件:</p> |
| 363 | + <el-space wrap> |
| 364 | + <template v-for="(f, i) in item.image_list" :key="i"> |
| 365 | + <el-image |
| 366 | + :src="f.url" |
| 367 | + alt="" |
| 368 | + fit="cover" |
| 369 | + style="width: 40px; height: 40px; display: block" |
| 370 | + class="border-r-4" |
| 371 | + /> |
| 372 | + </template> |
| 373 | + </el-space> |
| 374 | + <p class="mb-8 color-secondary">提示词:</p> |
| 375 | + {{ item.prompt || '-' }} |
| 376 | + </div> |
| 377 | + </div> |
| 378 | + </div> |
| 379 | + <div class="card-never border-r-4 mt-8"> |
| 380 | + <h5 class="p-8-12"> |
| 381 | + {{ item.type == WorkflowType.Application ? '参数输出' : 'AI 回答' }} |
| 382 | + </h5> |
| 383 | + <div class="p-8-12 border-t-dashed lighter"> |
| 384 | + <MdPreview |
| 385 | + v-if="item.answer" |
| 386 | + ref="editorRef" |
| 387 | + editorId="preview-only" |
| 388 | + :modelValue="item.answer" |
| 389 | + style="background: none" |
| 390 | + /> |
| 391 | + <template v-else> - </template> |
| 392 | + </div> |
| 393 | + </div> |
| 394 | + </template> |
329 | 395 | </template> |
330 | 396 | <template v-else> |
331 | 397 | <div class="card-never border-r-4"> |
|
0 commit comments