perf: Cancel automatic closure of debugging dialog
This commit is contained in:
parent
7ab5314665
commit
c4b8e74f74
@ -5,7 +5,7 @@ export default {
|
||||
only20history: '仅显示最近 20 条对话',
|
||||
question_count: '条提问',
|
||||
exportRecords: '导出聊天记录',
|
||||
chatId: '对话id',
|
||||
chatId: '对话 ID',
|
||||
userInput: '用户输入',
|
||||
quote: '引用',
|
||||
download: '点击下载文件',
|
||||
|
||||
@ -5,7 +5,7 @@ export default {
|
||||
only20history: '僅顯示最近 20 條對話',
|
||||
question_count: '條提問',
|
||||
exportRecords: '導出聊天記錄',
|
||||
chatId: '對話ID',
|
||||
chatId: '對話 ID',
|
||||
userInput: '用戶輸入',
|
||||
quote: '引用',
|
||||
download: '點擊下載文件',
|
||||
|
||||
@ -27,7 +27,9 @@
|
||||
</el-button>
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-button icon="Plus" @click="showPopover = !showPopover"> {{ $t('views.applicationWorkflow.setting.addComponent') }} </el-button>
|
||||
<el-button icon="Plus" @click="showPopover = !showPopover">
|
||||
{{ $t('views.applicationWorkflow.setting.addComponent') }}
|
||||
</el-button>
|
||||
<el-button @click="clickShowDebug" :disabled="showDebug">
|
||||
<AppIcon iconName="app-play-outlined" class="mr-4"></AppIcon>
|
||||
{{ $t('views.applicationWorkflow.setting.debug') }}</el-button
|
||||
@ -36,7 +38,9 @@
|
||||
<AppIcon iconName="app-save-outlined" class="mr-4"></AppIcon>
|
||||
{{ $t('common.save') }}
|
||||
</el-button>
|
||||
<el-button type="primary" @click="publicHandle"> {{ $t('views.applicationWorkflow.setting.public') }} </el-button>
|
||||
<el-button type="primary" @click="publicHandle">
|
||||
{{ $t('views.applicationWorkflow.setting.public') }}
|
||||
</el-button>
|
||||
|
||||
<el-dropdown trigger="click">
|
||||
<el-button text @click.stop class="ml-8 mt-4">
|
||||
@ -77,12 +81,7 @@
|
||||
</div>
|
||||
<!-- 调试 -->
|
||||
<el-collapse-transition>
|
||||
<div
|
||||
v-click-outside="clickoutsideDebug"
|
||||
class="workflow-debug-container"
|
||||
:class="enlarge ? 'enlarge' : ''"
|
||||
v-if="showDebug"
|
||||
>
|
||||
<div class="workflow-debug-container" :class="enlarge ? 'enlarge' : ''" v-if="showDebug">
|
||||
<div class="workflow-debug-header" :class="!isDefaultTheme ? 'custom-header' : ''">
|
||||
<div class="flex-between">
|
||||
<div class="flex align-center">
|
||||
@ -268,10 +267,18 @@ async function publicHandle() {
|
||||
const node = res.node
|
||||
const err_message = res.errMessage
|
||||
if (typeof err_message == 'string') {
|
||||
MsgError(res.node.properties?.stepName + ` ${t('views.applicationWorkflow.node').toLowerCase()} ` + err_message.toLowerCase())
|
||||
MsgError(
|
||||
res.node.properties?.stepName +
|
||||
` ${t('views.applicationWorkflow.node').toLowerCase()} ` +
|
||||
err_message.toLowerCase()
|
||||
)
|
||||
} else {
|
||||
const keys = Object.keys(err_message)
|
||||
MsgError(node.properties?.stepName + ` ${t('views.applicationWorkflow.node').toLowerCase()} ` + err_message[keys[0]]?.[0]?.message.toLowerCase())
|
||||
MsgError(
|
||||
node.properties?.stepName +
|
||||
` ${t('views.applicationWorkflow.node').toLowerCase()} ` +
|
||||
err_message[keys[0]]?.[0]?.message.toLowerCase()
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -300,18 +307,24 @@ const clickShowDebug = () => {
|
||||
const node = res.node
|
||||
const err_message = res.errMessage
|
||||
if (typeof err_message == 'string') {
|
||||
MsgError(res.node.properties?.stepName + ` ${t('views.applicationWorkflow.node')},` + err_message)
|
||||
MsgError(
|
||||
res.node.properties?.stepName + ` ${t('views.applicationWorkflow.node')},` + err_message
|
||||
)
|
||||
} else {
|
||||
const keys = Object.keys(err_message)
|
||||
MsgError(node.properties?.stepName + ` ${t('views.applicationWorkflow.node')},` + err_message[keys[0]]?.[0]?.message)
|
||||
MsgError(
|
||||
node.properties?.stepName +
|
||||
` ${t('views.applicationWorkflow.node')},` +
|
||||
err_message[keys[0]]?.[0]?.message
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
function clickoutsideDebug(e: any) {
|
||||
if (workflowMainRef.value && e && e.target && workflowMainRef.value.contains(e?.target)) {
|
||||
showDebug.value = false
|
||||
}
|
||||
}
|
||||
// function clickoutsideDebug(e: any) {
|
||||
// if (workflowMainRef.value && e && e.target && workflowMainRef.value.contains(e?.target)) {
|
||||
// showDebug.value = false
|
||||
// }
|
||||
// }
|
||||
|
||||
function getGraphData() {
|
||||
return workflowRef.value?.getGraphData()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user