Skip to content

Commit 971d82d

Browse files
perf: Cancel automatic closure of debugging dialog
1 parent 7ab5314 commit 971d82d

File tree

3 files changed

+32
-19
lines changed

3 files changed

+32
-19
lines changed

ui/src/locales/lang/zh-CN/ai-chat.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
only20history: '仅显示最近 20 条对话',
66
question_count: '条提问',
77
exportRecords: '导出聊天记录',
8-
chatId: '对话id',
8+
chatId: '对话 ID',
99
userInput: '用户输入',
1010
quote: '引用',
1111
download: '点击下载文件',

ui/src/locales/lang/zh-Hant/ai-chat.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
only20history: '僅顯示最近 20 條對話',
66
question_count: '條提問',
77
exportRecords: '導出聊天記錄',
8-
chatId: '對話ID',
8+
chatId: '對話 ID',
99
userInput: '用戶輸入',
1010
quote: '引用',
1111
download: '點擊下載文件',

ui/src/views/application-workflow/index.vue

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
</el-button>
2828
</div>
2929
<div v-else>
30-
<el-button icon="Plus" @click="showPopover = !showPopover"> {{ $t('views.applicationWorkflow.setting.addComponent') }} </el-button>
30+
<el-button icon="Plus" @click="showPopover = !showPopover">
31+
{{ $t('views.applicationWorkflow.setting.addComponent') }}
32+
</el-button>
3133
<el-button @click="clickShowDebug" :disabled="showDebug">
3234
<AppIcon iconName="app-play-outlined" class="mr-4"></AppIcon>
3335
{{ $t('views.applicationWorkflow.setting.debug') }}</el-button
@@ -36,7 +38,9 @@
3638
<AppIcon iconName="app-save-outlined" class="mr-4"></AppIcon>
3739
{{ $t('common.save') }}
3840
</el-button>
39-
<el-button type="primary" @click="publicHandle"> {{ $t('views.applicationWorkflow.setting.public') }} </el-button>
41+
<el-button type="primary" @click="publicHandle">
42+
{{ $t('views.applicationWorkflow.setting.public') }}
43+
</el-button>
4044

4145
<el-dropdown trigger="click">
4246
<el-button text @click.stop class="ml-8 mt-4">
@@ -77,12 +81,7 @@
7781
</div>
7882
<!-- 调试 -->
7983
<el-collapse-transition>
80-
<div
81-
v-click-outside="clickoutsideDebug"
82-
class="workflow-debug-container"
83-
:class="enlarge ? 'enlarge' : ''"
84-
v-if="showDebug"
85-
>
84+
<div class="workflow-debug-container" :class="enlarge ? 'enlarge' : ''" v-if="showDebug">
8685
<div class="workflow-debug-header" :class="!isDefaultTheme ? 'custom-header' : ''">
8786
<div class="flex-between">
8887
<div class="flex align-center">
@@ -268,10 +267,18 @@ async function publicHandle() {
268267
const node = res.node
269268
const err_message = res.errMessage
270269
if (typeof err_message == 'string') {
271-
MsgError(res.node.properties?.stepName + ` ${t('views.applicationWorkflow.node').toLowerCase()} ` + err_message.toLowerCase())
270+
MsgError(
271+
res.node.properties?.stepName +
272+
` ${t('views.applicationWorkflow.node').toLowerCase()} ` +
273+
err_message.toLowerCase()
274+
)
272275
} else {
273276
const keys = Object.keys(err_message)
274-
MsgError(node.properties?.stepName + ` ${t('views.applicationWorkflow.node').toLowerCase()} ` + err_message[keys[0]]?.[0]?.message.toLowerCase())
277+
MsgError(
278+
node.properties?.stepName +
279+
` ${t('views.applicationWorkflow.node').toLowerCase()} ` +
280+
err_message[keys[0]]?.[0]?.message.toLowerCase()
281+
)
275282
}
276283
})
277284
}
@@ -300,18 +307,24 @@ const clickShowDebug = () => {
300307
const node = res.node
301308
const err_message = res.errMessage
302309
if (typeof err_message == 'string') {
303-
MsgError(res.node.properties?.stepName + ` ${t('views.applicationWorkflow.node')},` + err_message)
310+
MsgError(
311+
res.node.properties?.stepName + ` ${t('views.applicationWorkflow.node')},` + err_message
312+
)
304313
} else {
305314
const keys = Object.keys(err_message)
306-
MsgError(node.properties?.stepName + ` ${t('views.applicationWorkflow.node')},` + err_message[keys[0]]?.[0]?.message)
315+
MsgError(
316+
node.properties?.stepName +
317+
` ${t('views.applicationWorkflow.node')},` +
318+
err_message[keys[0]]?.[0]?.message
319+
)
307320
}
308321
})
309322
}
310-
function clickoutsideDebug(e: any) {
311-
if (workflowMainRef.value && e && e.target && workflowMainRef.value.contains(e?.target)) {
312-
showDebug.value = false
313-
}
314-
}
323+
// function clickoutsideDebug(e: any) {
324+
// if (workflowMainRef.value && e && e.target && workflowMainRef.value.contains(e?.target)) {
325+
// showDebug.value = false
326+
// }
327+
// }
315328
316329
function getGraphData() {
317330
return workflowRef.value?.getGraphData()

0 commit comments

Comments
 (0)