Skip to content

Commit 5470fc7

Browse files
committed
feat: update ToolDialog to conditionally display folder tree and adjust API type handling
1 parent 6f73fd3 commit 5470fc7

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

ui/src/views/application/component/ToolDialog.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@
2121
</el-button>
2222
</div>
2323
</template>
24+
<!-- 共享的知识库工作流中,只能查共享的工具,这里不需要展示左边的树,只需展示右边的内容 -->
2425
<LayoutContainer class="application-manage">
25-
<template #left>
26+
<template #left v-if="apiType !== 'systemShare'">
2627
<folder-tree
2728
:data="folderList"
2829
:currentNodeKey="currentFolder?.id"
@@ -152,7 +153,11 @@ function clearCheck() {
152153
153154
const open = (checked: any) => {
154155
checkList.value = checked || []
155-
getFolder()
156+
if (apiType.value === 'systemShare') {
157+
getList()
158+
} else {
159+
getFolder()
160+
}
156161
dialogVisible.value = true
157162
}
158163
@@ -195,7 +200,7 @@ function getList() {
195200
loadSharedApi({
196201
type: 'tool',
197202
isShared: folder_id === 'share',
198-
systemType: 'workspace',
203+
systemType: apiType.value,
199204
})
200205
.getToolList({
201206
folder_id: folder_id,

ui/src/workflow/nodes/ai-chat-node/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,8 @@
280280
</div>
281281
</div>
282282

283-
<!-- 应用 -->
284-
<div>
283+
<!-- 应用 没有共享应用,在共享知识库工作流不显示这个 -->
284+
<div v-if="apiType !== 'systemShare'">
285285
<div class="flex-between" @click="collapseData.agent = !collapseData.agent">
286286
<div class="flex align-center lighter cursor">
287287
<el-icon class="mr-8 arrow-icon" :class="collapseData.agent ? 'rotate-90' : ''">

0 commit comments

Comments
 (0)