diff --git a/ui/src/views/tool/toolStore/ToolStoreDialog.vue b/ui/src/views/tool/toolStore/ToolStoreDialog.vue
index af178f950..940d9a174 100644
--- a/ui/src/views/tool/toolStore/ToolStoreDialog.vue
+++ b/ui/src/views/tool/toolStore/ToolStoreDialog.vue
@@ -13,10 +13,6 @@
{{ $t('views.tool.toolStore.title') }}
-
- {{$t('views.tool.title')}}
- {{$t('views.tool.dataSource')}}
-
([
{
id: 'web_search',
@@ -142,12 +137,6 @@ const categories = ref([...defaultCategories.value])
const filterList = ref(null)
-watch(dialogVisible, (bool) => {
- if (!bool) {
- toolType.value = 'TOOL'
- }
-})
-
function getSubTitle(tool: any) {
return categories.value.find((i) => i.id === tool.label)?.title ?? ''
}
@@ -162,32 +151,22 @@ function open(id: string) {
async function getList() {
filterList.value = null
- if (toolType.value === 'DATA_SOURCE') {
- categories.value = [
- {
- id: 'data_source',
- title: t('views.tool.dataSource'),
- tools: [],
- },
- ]
- } else {
- const [v1, v2] = await Promise.all([
- getInternalToolList(),
- getStoreToolList()
- ])
+ const [v1, v2] = await Promise.all([
+ getInternalToolList(),
+ getStoreToolList()
+ ])
- const merged = [...v1, ...v2].reduce((acc, category) => {
- const existing = acc.find((item: any) => item.id === category.id)
- if (existing) {
- existing.tools = [...existing.tools, ...category.tools]
- } else {
- acc.push({...category})
- }
- return acc
- }, [] as ToolCategory[])
+ const merged = [...v1, ...v2].reduce((acc, category) => {
+ const existing = acc.find((item: any) => item.id === category.id)
+ if (existing) {
+ existing.tools = [...existing.tools, ...category.tools]
+ } else {
+ acc.push({...category})
+ }
+ return acc
+ }, [] as ToolCategory[])
- categories.value = merged
- }
+ categories.value = merged
}
async function getInternalToolList() {