Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ui/src/workflow-canvas/WORKFLOW_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,9 @@ MkFormList 的排序、增删均以 `cloneDeep` 回写;MkTable 保留普通行
只读 Markdown 回答复用全局 `MdPreview`,透明背景与自适应高度由全局预览样式统一提供,
节点不重复添加局部覆盖或固定 `editor-id`。
AI 对话、图片理解、视频理解、图片生成、图生视频和文生视频的 AI 回答区域使用 `el-scrollbar`,
最大高度为 500px。AI 对话、图片理解和视频理解的应用与知识库模式详情均隐藏思考过程。
最大高度为 500px。LLM 的系统提示词、用户提示词和上下文,变量赋值与变量聚合的输入及输出参数,
以及 AI 对话的系统提示词、本次对话和应用模式的历史记录,正文均使用同样的滚动容器,标题置于容器外。
AI 对话、图片理解和视频理解的应用与知识库模式详情均隐藏思考过程。

循环详情是唯一递归点,负责循环设置和轮次选择,将选中轮次的子节点交给 `ExecutionDetailContent` 排序、分发,
并传 `show-content-on-error`,允许整体失败时查看已执行子节点。递归数据不得包含循环自身;
Expand Down
2 changes: 1 addition & 1 deletion ui/src/workflow-canvas/execution-details/BaseHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const tokenCount = computed(() => (props.data?.message_tokens || 0) + (props.dat
</script>

<template>
<div class="flex-between min-w-0 w-full gap-2">
<div class="flex-between min-w-0 w-full gap-1">
<div class="flex-align-center min-w-0 gap-2">
<component :is="nodeIconComponent" v-if="nodeIconComponent" class="shrink-0" :size="24" />
<h6 class="truncate" :title="data.name">{{ data.name }}</h6>
Expand Down
86 changes: 46 additions & 40 deletions ui/src/workflow-canvas/nodes/ai-chat-node/details/application.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,57 +24,63 @@ defineProps<{
<!-- 系统提示词 -->
<div class="mk-gray-card-sm">
<h6 class="mb-2">{{ t('workflow.systemPrompt.label') }}</h6>
<div>{{ data.system || '-' }}</div>
<el-scrollbar max-height="500" class="-mr-3" view-class="pr-3">
{{ data.system || '-' }}
</el-scrollbar>
</div>

<!-- 历史记录 -->
<div class="mk-gray-card-sm">
<h6 class="mb-2">{{ t('execution.details.history') }}</h6>
<div class="space-y-2">
<template v-if="data.history_message?.length > 0">
<p v-for="(history, historyIndex) in data.history_message" :key="historyIndex">
<span class="text-N600">{{ history.role }}:</span>
<span>{{ history.content }}</span>
</p>
</template>
<template v-else>-</template>
</div>
<el-scrollbar max-height="500" class="-mr-3" view-class="pr-3">
<div class="space-y-2">
<template v-if="data.history_message?.length > 0">
<p v-for="(history, historyIndex) in data.history_message" :key="historyIndex">
<span class="text-N600">{{ history.role }}:</span>
<span>{{ history.content }}</span>
</p>
</template>
<template v-else>-</template>
</div>
</el-scrollbar>
</div>

<!-- 本次对话 -->
<div class="mk-gray-card-sm">
<h6 class="mb-2">{{ t('execution.details.currentChat') }}</h6>
<div class="whitespace-pre-wrap space-y-2">
<p class="mb-1 text-N600" v-if="data?.image_list?.length > 0">{{ t('upload.types.image') }}:</p>
<!-- 查看本次对话图片 -->
<div v-if="data?.image_list?.length > 0" class="flex flex-wrap gap-2">
<template v-for="(imageItem, qIndex) in data?.image_list" :key="qIndex">
<ImageUploadCard
:file="{ name: t('upload.types.image'), status: 'success' }"
:src="imageItem.url || imageItem"
:size="58"
:show-remove="false"
:preview-src-list="[imageItem.url || imageItem]"
/>
</template>
</div>
<p class="mb-1 text-N600" v-if="data?.video_list?.length > 0">{{ t('upload.types.video') }}:</p>
<!-- 查看本次对话视频 -->
<div v-if="data?.video_list?.length > 0" class="grid grid-cols-1 gap-2 sm:grid-cols-2">
<template v-for="(videoItem, qIndex) in data?.video_list" :key="qIndex">
<MkVideo :src="videoItem.url || videoItem" :name="videoItem.url" class="w-60 max-w-full">
<el-card shadow="never" class="small cursor-pointer">
<div class="flex-align-center gap-2">
<img :src="getFileIconUrl('video.mp4')" alt="" width="24" class="shrink-0" />
<span class="min-w-0 truncate">{{ videoItem.url || videoItem }}</span>
</div>
</el-card>
</MkVideo>
</template>
</div>
<el-scrollbar max-height="500" class="-mr-3" view-class="pr-3">
<div class="whitespace-pre-wrap space-y-2">
<p class="mb-1 text-N600" v-if="data?.image_list?.length > 0">{{ t('upload.types.image') }}:</p>
<!-- 查看本次对话图片 -->
<div v-if="data?.image_list?.length > 0" class="flex flex-wrap gap-2">
<template v-for="(imageItem, qIndex) in data?.image_list" :key="qIndex">
<ImageUploadCard
:file="{ name: t('upload.types.image'), status: 'success' }"
:src="imageItem.url || imageItem"
:size="58"
:show-remove="false"
:preview-src-list="[imageItem.url || imageItem]"
/>
</template>
</div>
<p class="mb-1 text-N600" v-if="data?.video_list?.length > 0">{{ t('upload.types.video') }}:</p>
<!-- 查看本次对话视频 -->
<div v-if="data?.video_list?.length > 0" class="grid grid-cols-1 gap-2 sm:grid-cols-2">
<template v-for="(videoItem, qIndex) in data?.video_list" :key="qIndex">
<MkVideo :src="videoItem.url || videoItem" :name="videoItem.url" class="w-60 max-w-full">
<el-card shadow="never" class="small cursor-pointer">
<div class="flex-align-center gap-2">
<img :src="getFileIconUrl('video.mp4')" alt="" width="24" class="shrink-0" />
<span class="min-w-0 truncate">{{ videoItem.url || videoItem }}</span>
</div>
</el-card>
</MkVideo>
</template>
</div>

<MdPreview v-if="data.question?.content" :model-value="data.question?.content" noImgZoomIn />
</div>
<MdPreview v-if="data.question?.content" :model-value="data.question?.content" noImgZoomIn />
</div>
</el-scrollbar>
</div>

<!-- 思考过程 -->

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No syntax/structural issues are obvious in the shown diff. Main points to review:

Potential issues

  1. max-height="500" is implicit

    • Prefer explicit max-height="500px" or :max-height="500" to avoid relying on Element Plus numeric-string parsing.
  2. Multiple independent el-scrollbar regions

    • All three sections use max-height="500", which can create nested/awkward scrolling on one page. Consider a single outer scroll container or collapsible sections if content is long.
  3. Direct text inside el-scrollbar

    • This is legal, but wrapping it in a <div> is clearer:
      <el-scrollbar max-height="500px" class="-mr-3" view-class="pr-3">
        <div class="whitespace-pre-wrap break-words">{{ data.system || '-' }}</div>
      </el-scrollbar>
    • If system prompts contain newlines, add whitespace-pre-wrap to preserve them.
  4. Negative margin + padding scrollbar trick

    • class="-mr-3" and view-class="pr-3" can cause horizontal overflow or clipping in some layouts, especially RTL or overlay-scrollbar environments. Verify visually; consider scrollbar-gutter: stable or only pr-3.
  5. v-for key uses index

    • :key="historyIndex" / qIndex can cause rendering/state issues if lists reorder or update. Prefer a stable ID if available.
  6. Inconsistent optional chaining

    • data.system is not optional while other places use data?.. If data can be undefined, this can throw. Use data?.system.
  7. MkVideo name fallback is missing

    • :src="videoItem.url || videoItem" handles string items, but :name="videoItem.url" does not. Use:
      :name="videoItem.url || videoItem"

Optimization suggestions

  • Normalize image_list and video_list into computed arrays to avoid repeated item.url || item expressions.
  • Extract the repeated card + scrollbar wrapper into a small component or shared class.
  • Avoid creating inline object literals repeatedly, e.g. the ImageUploadCard :file object and getFileIconUrl('video.mp4').
  • Ensure scrollable regions are keyboard accessible; users should not need a mouse wheel to reach hidden content.
  • Simplify length > 0 checks to just data.history_message?.length if only truthiness matters, though the current form is fine.

Expand Down
66 changes: 35 additions & 31 deletions ui/src/workflow-canvas/nodes/ai-chat-node/details/knowledge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,43 +24,47 @@ defineProps<{
<!-- 系统提示词 -->
<div class="mk-gray-card-sm">
<h6 class="mb-2">{{ t('workflow.systemPrompt.label') }}</h6>
<div>{{ data.system || '-' }}</div>
<el-scrollbar max-height="500" class="-mr-3" view-class="pr-3">
{{ data.system || '-' }}
</el-scrollbar>
</div>

<!-- 本次对话 -->
<div class="mk-gray-card-sm">
<h6 class="mb-2">{{ t('execution.details.currentChat') }}</h6>
<div class="whitespace-pre-wrap space-y-2">
<p class="mb-1 text-N600" v-if="data?.image_list?.length > 0">{{ t('upload.types.image') }}:</p>
<!-- 查看本次对话图片 -->
<div v-if="data?.image_list?.length > 0" class="flex flex-wrap gap-2">
<template v-for="(imageItem, qIndex) in data?.image_list" :key="qIndex">
<ImageUploadCard
:file="{ name: t('upload.types.image'), status: 'success' }"
:src="imageItem.url || imageItem"
:size="58"
:show-remove="false"
:preview-src-list="[imageItem.url || imageItem]"
/>
</template>
</div>
<p class="mb-1 text-N600" v-if="data?.video_list?.length > 0">{{ t('upload.types.video') }}:</p>
<!-- 查看本次对话视频 -->
<div v-if="data?.video_list?.length > 0" class="grid grid-cols-1 gap-2 sm:grid-cols-2">
<template v-for="(videoItem, qIndex) in data?.video_list" :key="qIndex">
<MkVideo :src="videoItem.url || videoItem" :name="videoItem.url" class="w-60 max-w-full">
<el-card shadow="never" class="small cursor-pointer">
<div class="flex-align-center gap-2">
<img :src="getFileIconUrl('video.mp4')" alt="" width="24" class="shrink-0" />
<span class="min-w-0 truncate">{{ videoItem.url || videoItem }}</span>
</div>
</el-card>
</MkVideo>
</template>
</div>
<el-scrollbar max-height="500" class="-mr-3" view-class="pr-3">
<div class="whitespace-pre-wrap space-y-2">
<p class="mb-1 text-N600" v-if="data?.image_list?.length > 0">{{ t('upload.types.image') }}:</p>
<!-- 查看本次对话图片 -->
<div v-if="data?.image_list?.length > 0" class="flex flex-wrap gap-2">
<template v-for="(imageItem, qIndex) in data?.image_list" :key="qIndex">
<ImageUploadCard
:file="{ name: t('upload.types.image'), status: 'success' }"
:src="imageItem.url || imageItem"
:size="58"
:show-remove="false"
:preview-src-list="[imageItem.url || imageItem]"
/>
</template>
</div>
<p class="mb-1 text-N600" v-if="data?.video_list?.length > 0">{{ t('upload.types.video') }}:</p>
<!-- 查看本次对话视频 -->
<div v-if="data?.video_list?.length > 0" class="grid grid-cols-1 gap-2 sm:grid-cols-2">
<template v-for="(videoItem, qIndex) in data?.video_list" :key="qIndex">
<MkVideo :src="videoItem.url || videoItem" :name="videoItem.url" class="w-60 max-w-full">
<el-card shadow="never" class="small cursor-pointer">
<div class="flex-align-center gap-2">
<img :src="getFileIconUrl('video.mp4')" alt="" width="24" class="shrink-0" />
<span class="min-w-0 truncate">{{ videoItem.url || videoItem }}</span>
</div>
</el-card>
</MkVideo>
</template>
</div>

<MdPreview v-if="data.question?.content" :model-value="data.question?.content" noImgZoomIn />
</div>
<MdPreview v-if="data.question?.content" :model-value="data.question?.content" noImgZoomIn />
</div>
</el-scrollbar>
</div>

<!-- 思考过程 -->

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of the Diff

Overall the change is straightforward (wrapping two blocks in el-scrollbar), but there are several correctness risks, inconsistencies, and maintainability concerns.


1. Bugs / Potential Runtime Issues

a) :name is not normalized like :src (video branch)

<MkVideo :src="videoItem.url || videoItem" :name="videoItem.url" ... />
<span>{{ videoItem.url || videoItem }}</span>

If videoItem is a plain string (which the || videoItem fallback implies is a supported shape), videoItem.url is undefined, so MkVideo receives no name. Use the same fallback:

:name="videoItem.url || videoItem"

Same pattern should be extracted once instead of repeated three times (see §4).

b) max-height="500" without a unit
Element Plus runs maxHeight through addUnit, so a number usually becomes 500px, but this depends on the version. Prefer an explicit unit to be safe and self-documenting:

<el-scrollbar max-height="500px" ...>

c) Fragile coupling of -mr-3 / view-class="pr-3" to the card's padding
This only lines up if .mk-gray-card-sm uses exactly padding-right: 0.75rem. If the card class changes, the scrollbar will visibly overlap or be inset. Either (a) drop the negative margin and let the gutter sit inside the padding, or (b) drive both from a shared token/class rather than two magic Tailwind values.

d) Long/unbroken content in the system prompt

<el-scrollbar ...>
  {{ data.system || '-' }}
</el-scrollbar>

.el-scrollbar__wrap has overflow: auto, so a long URL/token or multi-line prompt will either produce an ugly horizontal scrollbar or be clipped. Add wrapping:

<div class="whitespace-pre-wrap break-words">{{ data.system || '-' }}</div>

(You also lose an explicit wrapper element elsewhere — text directly in the slot is fine, but a <div> gives you a styling hook and keeps parity with the original markup.)

e) Nested scroll containers / scroll chaining
Two independent 500px scroll regions inside what is likely an already-scrollable drawer/dialog creates bad UX on touch devices (scroll chaining) and double scrollbars. Consider:

  • a single scrollbar for the whole panel, or
  • overscroll-behavior: contain on the scroll views, and max-height in relative units (50vh, %, or flex min-height: 0) instead of a fixed 500px.

f) Keyboard accessibility
The scroll region content is not focusable by default, so keyboard-only users may be unable to scroll it. Verify el-scrollbar's wrap node has tabindex="0" (or add it), and give the region an aria-label/role="region".


2. Minor Issues

  • v-if="data?.image_list?.length > 0" — works (undefined > 0 === false), but data?.image_list?.length alone is clearer; if you want an explicit comparison use (data?.image_list?.length ?? 0) > 0.
  • :key="qIndex" — index keys are acceptable for a static, non-reordering list, but qIndex is a misleading name for both the image and video loops; rename to imgIndex / videoIndex, and prefer a stable id if items have one.
  • :preview-src-list="[imageItem.url || imageItem]" — only the clicked image is in the preview list, so users can't page through the gallery. Consider passing the full normalized list.
  • :size="58" magic number — extract to a named constant or component prop.
  • The diff also drops a blank line before <MdPreview>; harmless, but keep whitespace changes out of a behavioural diff to ease review.

3. Performance

  • MdPreview renders the entire markdown inside the scroll container; large content with many images will still fully render. If long histories are expected, consider lazy rendering or virtualization.
  • The two el-scrollbars are cheap, but if this panel is re-rendered frequently, hoisting the media normalization into a computed avoids re-evaluating item.url || item in the template on every render.

4. Refactor Suggestions

Normalize media items once (types are clearly string | { url: string }):

type MediaItem = string | { url: string }
const toSrc = (item: MediaItem) => (typeof item === 'string' ? item : item.url)

const images = computed(() => (data.image_list ?? []).map(toSrc))
const videos = computed(() => (data.video_list ?? []).map(toSrc))

Then the template becomes v-for="(src, i) in images" :key="src + i" and there are no repeated url || item expressions to drift out of sync.

Extract the repeated scroll shell:
Both blocks use the identical max-height / -mr-3 / view-class="pr-3" combination. Wrap it in a small local component (e.g. <ScrollCard>) so the magic numbers live in one place.

Or use a single scroll region for the whole "details" card and drop the per-section fixed heights — simpler layout, no nesting, and it adapts to the drawer height.


Suggested corrected snippet (system prompt block)

<div class="mk-gray-card-sm overflow-hidden">
  <h6 class="mb-2">{{ t('workflow.systemPrompt.label') }}</h6>
  <el-scrollbar max-height="500px" class="overscroll-contain" view-class="pr-3">
    <div class="whitespace-pre-wrap break-words">{{ data.system || '-' }}</div>
  </el-scrollbar>
</div>

...and in the video loop:

<MkVideo :src="toSrc(videoItem)" :name="toSrc(videoItem)" class="w-60 max-w-full">
  ...
  <span class="min-w-0 truncate">{{ toSrc(videoItem) }}</span>
</MkVideo>

Expand Down
30 changes: 18 additions & 12 deletions ui/src/workflow-canvas/nodes/llm-node/details/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,32 @@ function formatJson(value: unknown) {
<!-- 系统提示词 -->
<div class="mk-gray-card-sm">
<h6 class="mb-2">{{ t('workflow.systemPrompt.label') }}</h6>
<div>{{ data.system || '-' }}</div>
<el-scrollbar max-height="500" class="-mr-3" view-class="pr-3">
{{ data.system || '-' }}
</el-scrollbar>
</div>
<!-- 用户提示词 -->
<div class="mk-gray-card-sm">
<h6 class="mb-2">{{ t('workflow.userPrompt.label') }}</h6>
<div>{{ data.prompt || '-' }}</div>
<el-scrollbar max-height="500" class="-mr-3" view-class="pr-3">
{{ data.prompt || '-' }}
</el-scrollbar>
</div>

<!-- 消息列表 -->
<!-- 上下文 -->
<div class="mk-gray-card-sm">
<h6 class="mb-2">{{ t('workflow.llm.context.label') }}</h6>
<div class="space-y-2">
<template v-if="data.message_list?.length > 0">
<p v-for="(message, messageIndex) in data.message_list" :key="messageIndex" class="whitespace-pre-wrap">
<span class="text-N600">{{ message.role }}:</span>
<span>{{ message.content }}</span>
</p>
</template>
<template v-else>-</template>
</div>
<el-scrollbar max-height="500" class="-mr-3" view-class="pr-3">
<div class="space-y-2">
<template v-if="data.message_list?.length > 0">
<p v-for="(message, messageIndex) in data.message_list" :key="messageIndex" class="whitespace-pre-wrap">
<span class="text-N600">{{ message.role }}:</span>
<span>{{ message.content }}</span>
</p>
</template>
<template v-else>-</template>
</div>
</el-scrollbar>
</div>
<!-- 结束原因 -->
<div class="mk-gray-card-sm">

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

1. Type-safety issue with data.message_list?.length > 0

<template v-if="data.message_list?.length > 0">

With strictNullChecks, data.message_list?.length is typed number | undefined, which TypeScript rejects when compared with >. Safer:

<template v-if="(data.message_list?.length ?? 0) > 0">
<!-- or -->
<template v-if="data.message_list?.length">

2. :key="messageIndex" — index used as key

Index keys break identity when the list is prepended/reordered (and cause avoidable re-renders). Use a stable id if the API provides one (message.id), or at minimum combine role+index.

3. Message content is not guaranteed to be a string

Newer LLM APIs return content as an array of parts ([{type:'text'}, {type:'image_url'}]). {{ message.content }} would render [object Object]. Normalize it:

const textOf = (c: unknown) => typeof c === 'string' ? c : JSON.stringify(c, null, 2)

4. Long unbroken strings overflow horizontally

whitespace-pre-wrap preserves newlines but does not break long tokens (URLs, JSON, base64). Add:

<p class="whitespace-pre-wrap break-words [overflow-wrap:anywhere] ...">

5. data.system || '-' treats falsy values too broadly

|| also swallows 0, false, whitespace-only strings. Prefer data.system?.trim() || '-' if you want "blank means empty", or ?? '-' if only null/undefined should fall back.

Also note the system/user prompt blocks lost the whitespace-pre-wrap behavior the context block has (plain <div>/text in scrollbar collapses multi-line prompts). Add it for consistency:

<el-scrollbar max-height="500" ...>
  <div class="whitespace-pre-wrap">{{ data.system || '-' }}</div>
</el-scrollbar>

6. Repeated markup — DRY

Three identical el-scrollbar max-height="500" class="-mr-3" view-class="pr-3" wrappers. Extract one component or drive it from a config:

<ScrollBox>…</ScrollBox>
<!-- or -->
<el-scrollbar v-for="s in sections" :key="s.key" max-height="500" ...>

7. Magic number 500 duplicated

Move to a single constant / CSS var / prop so the three panels can't drift:

const SCROLL_MAX_H = 500 // or 'var(--mk-scroll-max-h)'

Fixed 500px × 3 cards = up to 1500px of content; consider a smaller default and/or a "show more" collapse toggle.

8. Negative-margin + view-padding hack is fragile

class="-mr-3" + view-class="pr-3" cancels the scrollbar gutter. This relies on the card's padding value (p-3 = 12px). If the card padding changes, the layout breaks. Prefer one of:

  • put padding on the inner view only, no negative margin;
  • style the scrollbar via CSS (--el-scrollbar-* / scoped class) instead of utility hacks. Note -mr-3 on the root also shifts the hover/hit area of the scrollbar track outward, which can look off.

9. Element Plus API/version check

view-class / view-style / wrap-class exist only in newer Element Plus builds. Confirm the installed version supports view-class; otherwise the padding silently does nothing (the class ends up unwrapped). Also max-height accepts string | number — "500" is fine because addUnit adds px, but passing 500 (number) or '500px' is clearer.

10. Scrollbar sizing inside hidden containers

el-scrollbar measures via ResizeObserver. If this detail view is mounted inside a hidden tab/drawer/dialog and shown later, the thumb may be missing until a resize. If so, keep a ref and call scrollbarRef.update() when the panel becomes visible, or use :native="true" for these simple read-only blocks (cheaper, no wrapper/resize observer — usually the better choice here).

11. No auto-scroll for streaming content

If data.message_list / prompts update while streaming, the scrollbar stays at the old offset. Consider watching length and calling setScrollTop(Infinity) (with nextTick), or only do so when the user was already at the bottom.

12. Print / export / copy

Content inside a max-height scroll container is clipped when printed or serialized by DOM-to-image. If this panel supports "copy raw" or "export screenshot/PDF", read from data rather than the DOM, and add @media print { .el-scrollbar__wrap { max-height:none !important; overflow: visible !important } }.

13. Minor / nitpicks

  • comment changed from 消息列表 → 上下文; make sure workflow.llm.context.label wording matches (it does — good), and update the corresponding i18n keys if the original ones only said "messages".
  • el-scrollbar on a single short string ('-') still renders a wrapper + resize observer for nothing. Acceptable, but combined with the DRY refactor worth noting.
  • p elements inside space-y-2 with leading/trailing whitespace from the pre-wrap text node may render odd gap; consider wrapping text in a <div> and trimming.
  • If the surrounding file has a formatJson helper (visible at the top of the hunk), the messages' content could be piped through it when it's object-like — currently that helper appears unused by this block.
  • Role label {{ message.role }} is user-controlled by the backend; fine for escaping, but capitalize/normalize display (e.g., role.toUpperCase()) for consistency with the rest of the UI.

Suggested minimal fix

<el-scrollbar
  v-for="section in promptSections"
  :key="section.key"
  max-height="500"
  :native="true"
  class="mk-scroll"
>
  <div class="whitespace-pre-wrap break-words">{{ section.text || '-' }}</div>
</el-scrollbar>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,26 @@ const strategyLabel = (strategy?: string) => {

<div v-for="(group, groupI) in data.group_list" :key="groupI" class="mk-gray-card-sm">
<h6 class="mb-2">{{ group.label }} {{ t('execution.details.inputParams') }}</h6>
<div class="space-y-2">
<p v-for="(f, i) in group.variable_list" :key="i">
<span class="text-N600">{{ `${f.node_name}.${f.field}` }}:</span>
{{ f.value }}
</p>
</div>
<el-scrollbar max-height="500" class="-mr-3" view-class="pr-3">
<div class="space-y-2">
<p v-for="(f, i) in group.variable_list" :key="i">
<span class="text-N600">{{ `${f.node_name}.${f.field}` }}:</span>
{{ f.value }}
</p>
</div>
</el-scrollbar>
</div>

<div class="mk-gray-card-sm">
<h6 class="mb-2">{{ t('execution.details.outputParams') }}</h6>
<div class="space-y-2">
<p v-for="(f, i) in data.result" :key="i">
<span class="text-N600">{{ i }}:</span>
{{ f }}
</p>
</div>
<el-scrollbar max-height="500" class="-mr-3" view-class="pr-3">
<div class="space-y-2">
<p v-for="(f, i) in data.result" :key="i">
<span class="text-N600">{{ i }}:</span>
{{ f }}
</p>
</div>
</el-scrollbar>
</div>
</DetailContainer>
</template>
28 changes: 16 additions & 12 deletions ui/src/workflow-canvas/nodes/variable-assign-node/details/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,27 @@ defineProps<{
<!-- 输入参数 -->
<div class="mk-gray-card-sm">
<h6 class="mb-2">{{ t('execution.details.inputParams') }}</h6>
<div class="space-y-2">
<p v-for="(assignment, assignmentIndex) in data.result_list" :key="assignmentIndex">
<span class="text-N600">{{ assignment.name }} ({{ assignment.input_type }}):</span>
{{ assignment.input_value }}
</p>
</div>
<el-scrollbar max-height="500" class="-mr-3" view-class="pr-3">
<div class="space-y-2">
<p v-for="(assignment, assignmentIndex) in data.result_list" :key="assignmentIndex">
<span class="text-N600">{{ assignment.name }} ({{ assignment.input_type }}):</span>
{{ assignment.input_value }}
</p>
</div>
</el-scrollbar>
</div>

<!-- 输出参数 -->
<div class="mk-gray-card-sm">
<h6 class="mb-2">{{ t('execution.details.outputParams') }}</h6>
<div class="space-y-2">
<p v-for="(assignment, assignmentIndex) in data.result_list" :key="assignmentIndex">
<span class="text-N600">{{ assignment.name }} ({{ assignment.output_type }}):</span>
{{ assignment.output_value }}
</p>
</div>
<el-scrollbar max-height="500" class="-mr-3" view-class="pr-3">
<div class="space-y-2">
<p v-for="(assignment, assignmentIndex) in data.result_list" :key="assignmentIndex">
<span class="text-N600">{{ assignment.name }} ({{ assignment.output_type }}):</span>
{{ assignment.output_value }}
</p>
</div>
</el-scrollbar>
</div>
</DetailContainer>
</template>
Loading