Skip to content

Commit a28a6a0

Browse files
fix: trigger execution
1 parent 3a5ed39 commit a28a6a0

File tree

7 files changed

+76
-16
lines changed

7 files changed

+76
-16
lines changed

ui/src/locales/lang/en-US/views/tool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export default {
7474
disabled: {
7575
confirmTitle: 'Confirm disable tool:',
7676
confirmMessage:
77-
'Disabling this tool will cause errors in agent that reference it when they are queried. Please proceed with caution.',
77+
'Disabling this tool will cause errors in resources that reference it when they are executed. Please proceed with caution.',
7878
},
7979

8080
form: {

ui/src/locales/lang/en-US/views/user-manage.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ export default {
1717
confirmMessage:
1818
'Deleting this user will also not delete all resources (agent, knowledge, models) created by this user. Please proceed with caution.',
1919
},
20-
disabled: {
21-
confirmTitle: 'Confirm disable tool:',
22-
confirmMessage:
23-
'Disabling this tool will cause errors when agent that reference it are queried. Please proceed with caution.',
24-
},
2520
userForm: {
2621
nick_name: {
2722
label: 'Name',

ui/src/locales/lang/zh-CN/views/tool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export default {
6868
},
6969
disabled: {
7070
confirmTitle: '是否禁用工具:',
71-
confirmMessage: '禁用后,引用了该工具的智能体提问时会报错 ,请谨慎操作。',
71+
confirmMessage: '禁用后,引用了该工具的资源执行会报错 ,请谨慎操作。',
7272
},
7373
tip: {
7474
saveMessage: '当前的更改尚未保存,确认退出吗?',

ui/src/locales/lang/zh-CN/views/user-manage.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ export default {
1515
confirmTitle: '是否删除用户:',
1616
confirmMessage: '删除用户,该用户创建的资源(智能体、知识库、模型)不会删除,请谨慎操作。',
1717
},
18-
disabled: {
19-
confirmTitle: '是否禁用工具:',
20-
confirmMessage: '禁用后,引用了该工具的智能体提问时会报错 ,请谨慎操作。',
21-
},
2218
userForm: {
2319
nick_name: {
2420
label: '姓名',

ui/src/locales/lang/zh-Hant/views/tool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export default {
7070
},
7171
disabled: {
7272
confirmTitle: '是否停用工具:',
73-
confirmMessage: '停用後,引用該工具的智能體在查詢時會報錯,請謹慎操作。',
73+
confirmMessage: '停用後,引用該工具的資源執行會報錯,請謹慎操作。',
7474
},
7575
form: {
7676
toolName: {

ui/src/locales/lang/zh-Hant/views/user-manage.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ export default {
1616
confirmMessage:
1717
'刪除該用戶後,該使用者建立的所有資源(智能體、知識庫、模型)都不會被刪除,請謹慎操作。',
1818
},
19-
disabled: {
20-
confirmTitle: '是否停用工具?',
21-
confirmMessage: '停用後,引用該工具的智能體在查詢時會報錯,請謹慎操作。',
22-
},
2319
userForm: {
2420
nick_name: {
2521
label: '姓名',

ui/src/views/trigger/execution-record/ExecutionDetailDrawer.vue

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,78 @@
122122
:detail="detail"
123123
:appType="props.currentContent.type"
124124
></ExecutionDetailContent>
125+
<el-card
126+
v-else-if="props.currentContent?.type === 'WORKFLOW'"
127+
class="mb-8"
128+
shadow="never"
129+
style="--el-card-padding: 12px 16px"
130+
>
131+
<div class="flex-between cursor" @click="showDetail = !showDetail">
132+
<div class="flex align-center">
133+
<el-icon class="mr-8 arrow-icon" :class="showDetail ? 'rotate-90' : ''">
134+
<CaretRight />
135+
</el-icon>
136+
<el-avatar
137+
v-if="taskRecordDetails?.tool_icon"
138+
shape="square"
139+
:size="24"
140+
style="background: none"
141+
>
142+
<img :src="resetUrl(taskRecordDetails?.tool_icon)" alt="" />
143+
</el-avatar>
144+
<ToolIcon v-else :size="24" type="WORKFLOW" />
145+
<h4 class="ml-8">{{ taskRecordDetails?.tool_name }}</h4>
146+
</div>
147+
<div class="flex align-center">
148+
<span class="mr-16 color-secondary" v-if="taskRecordDetails?.state !== 'STARTED'"
149+
>{{ taskRecordDetails?.run_time?.toFixed(2) || 0.0 }} s</span
150+
>
151+
<el-icon class="color-success" :size="16" v-if="taskRecordDetails?.state === 'SUCCESS'">
152+
<CircleCheck />
153+
</el-icon>
154+
<el-icon class="is-loading" :size="16" v-else-if="taskRecordDetails?.state === 'STARTED'">
155+
<Loading />
156+
</el-icon>
157+
<el-icon class="color-danger" :size="16" v-else>
158+
<CircleClose />
159+
</el-icon>
160+
</div>
161+
</div>
162+
<el-collapse-transition>
163+
<div class="mt-12" v-if="showDetail">
164+
<div class="card-never border-r-6">
165+
<h5 class="p-8-12">
166+
{{ $t('common.param.inputParam') }}
167+
</h5>
168+
<div class="p-8-12 border-t-dashed lighter pre-wrap">
169+
<div v-for="(f, i) in taskRecordDetails?.meta?.input" :key="i" class="mb-8">
170+
<span class="color-secondary">{{ i }}:</span> {{ f }}
171+
</div>
172+
</div>
173+
</div>
174+
<div class="card-never border-r-6 mt-8">
175+
<h5 class="p-8-12">
176+
{{ $t('common.param.outputParam') }}
177+
</h5>
178+
<div class="p-8-12 border-t-dashed lighter">
179+
<div v-for="(f, i) in taskRecordDetails?.meta?.output" :key="i" class="mb-8">
180+
<span class="color-secondary">{{ i }}:</span> {{ f }}
181+
</div>
182+
</div>
183+
</div>
184+
<div class="card-never border-r-6 mt-8">
185+
<h5 class="p-8-12">
186+
{{ $t('chat.executionDetails.title') }}
187+
</h5>
188+
<div class="p-8-12 border-t-dashed lighter">
189+
<template v-for="(cLoop, cIndex) in taskRecordDetails?.meta?.details" :key="cIndex">
190+
<ExecutionDetailCard :data="cLoop"></ExecutionDetailCard>
191+
</template>
192+
</div>
193+
</div>
194+
</div>
195+
</el-collapse-transition>
196+
</el-card>
125197
<template v-else v-for="(item, index) in arraySort(detail ?? [], 'index')" :key="index">
126198
<ExecutionDetailCard :data="item"> </ExecutionDetailCard>
127199
</template>
@@ -187,6 +259,7 @@ const apiType = computed(() => {
187259
})
188260
const taskRecordDetails = ref<any>()
189261
const detail = ref<any>(null)
262+
const showDetail = ref<boolean>(true)
190263
191264
const loading = ref(false)
192265
const visible = ref(false)

0 commit comments

Comments
 (0)