) => {
})
}
-
diff --git a/ui/src/layout/components/breadcrumb/index.vue b/ui/src/layout/components/breadcrumb/index.vue
index 57408cd07..73698ce34 100644
--- a/ui/src/layout/components/breadcrumb/index.vue
+++ b/ui/src/layout/components/breadcrumb/index.vue
@@ -1,6 +1,6 @@
-
+
{
if (isKnowledge.value) {
getKnowledgeDetail()
diff --git a/ui/src/views/application/index.vue b/ui/src/views/application/index.vue
index 9e960b206..11773dac8 100644
--- a/ui/src/views/application/index.vue
+++ b/ui/src/views/application/index.vue
@@ -3,8 +3,13 @@
{{ $t('views.application.title') }}
-
+
@@ -14,22 +19,44 @@
-
+
-
-
+
+
-
+
@@ -46,11 +73,16 @@
-
+
{{ $t('views.application.simple') }}
-
{{ $t('views.application.simplePlaceholder') }}
+ {{ $t('views.application.simplePlaceholder') }}
@@ -58,18 +90,31 @@
-
+
{{ $t('views.application.workflow') }}
-
{{ $t('views.application.workflowPlaceholder') }}
+ {{ $t('views.application.workflowPlaceholder') }}
-
+
@@ -96,16 +141,35 @@
-
-
+
+
-
-
+
+
@@ -119,7 +183,12 @@
-
+
@@ -173,33 +242,51 @@
{{ $t('views.application.operation.toChat') }}
-
+
{{ $t('common.setting') }}
-
-
+
+
{{ $t('views.system.resourceAuthorization.title') }}
-
+
{{ $t('common.moveTo') }}
-
+
{{ $t('common.copy') }}
-
+
{{ $t('common.export') }}
-
+
{{ $t('common.delete') }}
@@ -219,9 +306,16 @@
-
-
+
+
@@ -248,7 +342,6 @@ import { ComplexPermission } from '@/utils/permission/type'
import { EditionConst, PermissionConst, RoleConst } from '@/utils/permission/data'
const router = useRouter()
-const route = useRoute()
const apiType = computed<'workspace'>(() => {
return 'workspace'
@@ -257,7 +350,7 @@ const permissionPrecise = computed(() => {
return permissionMap['application'][apiType.value]
})
-const { folder, application, user, common } = useStore()
+const { folder, application, user } = useStore()
const loading = ref(false)
@@ -444,20 +537,20 @@ function toChat(row: any) {
.map((v: any) => {
apiInputParams.value = v.properties.api_input_field_list
? v.properties.api_input_field_list.map((v: any) => {
- return {
- name: v.variable,
- value: v.default_value,
- }
- })
+ return {
+ name: v.variable,
+ value: v.default_value,
+ }
+ })
: v.properties.input_field_list
? v.properties.input_field_list
- .filter((v: any) => v.assignment_method === 'api_input')
- .map((v: any) => {
- return {
- name: v.variable,
- value: v.default_value,
- }
- })
+ .filter((v: any) => v.assignment_method === 'api_input')
+ .map((v: any) => {
+ return {
+ name: v.variable,
+ value: v.default_value,
+ }
+ })
: []
})
const apiParams = mapToUrlParams(apiInputParams.value)
@@ -499,7 +592,6 @@ function settingApplication(row: any) {
function deleteApplication(row: any) {
MsgConfirm(
- // @ts-ignore
`${t('views.application.delete.confirmTitle')}${row.name} ?`,
t('views.application.delete.confirmMessage'),
{
@@ -515,7 +607,7 @@ function deleteApplication(row: any) {
MsgSuccess(t('common.deleteSuccess'))
})
})
- .catch(() => { })
+ .catch(() => {})
}
const exportApplication = (application: any) => {
@@ -617,7 +709,7 @@ function getList() {
}
onMounted(() => {
- getFolder(true)
+ getFolder(folder.currentFolder?.id ? false : true)
WorkspaceApi.getAllMemberList(user.getWorkspaceId(), loading).then((res) => {
user_options.value = res.data
})
diff --git a/ui/src/views/chat/embed/index.vue b/ui/src/views/chat/embed/index.vue
index 4ccf5264b..c68c43e7c 100644
--- a/ui/src/views/chat/embed/index.vue
+++ b/ui/src/views/chat/embed/index.vue
@@ -176,7 +176,7 @@ function newChat() {
show.value = false
}
-function getChatLog(id: string) {
+function getChatLog(refresh?: boolean) {
const page = {
current_page: 1,
page_size: 20,
@@ -184,12 +184,11 @@ function getChatLog(id: string) {
chatAPI.pageChat(page.current_page, page.page_size, left_loading).then((res: any) => {
chatLogData.value = res.data.records
- paginationConfig.current_page = 1
- paginationConfig.total = 0
- currentRecordList.value = []
- currentChatId.value = chatLogData.value?.[0]?.id || 'new'
- if (currentChatId.value !== 'new') {
- getChatRecord()
+ if (!refresh) {
+ paginationConfig.current_page = 1
+ paginationConfig.total = 0
+ currentRecordList.value = []
+ currentChatId.value = 'new'
}
})
}
@@ -241,14 +240,14 @@ function refreshFieldTitle(chatId: string, abstract: string) {
}
function refresh(id: string) {
- getChatLog(applicationDetail.value.id)
currentChatId.value = id
+ getChatLog(true)
}
/**
*初始化历史对话记录
*/
const init = () => {
- getChatLog(applicationDetail.value.id)
+ getChatLog()
}
onMounted(() => {
diff --git a/ui/src/views/chat/mobile/index.vue b/ui/src/views/chat/mobile/index.vue
index 09a681e50..39646ff15 100644
--- a/ui/src/views/chat/mobile/index.vue
+++ b/ui/src/views/chat/mobile/index.vue
@@ -182,7 +182,7 @@ function newChat() {
show.value = false
}
-function getChatLog(id: string) {
+function getChatLog(refresh?: boolean) {
const page = {
current_page: 1,
page_size: 20,
@@ -190,12 +190,11 @@ function getChatLog(id: string) {
chatAPI.pageChat(page.current_page, page.page_size, left_loading).then((res: any) => {
chatLogData.value = res.data.records
- paginationConfig.current_page = 1
- paginationConfig.total = 0
- currentRecordList.value = []
- currentChatId.value = chatLogData.value?.[0]?.id || 'new'
- if (currentChatId.value !== 'new') {
- getChatRecord()
+ if (!refresh) {
+ paginationConfig.current_page = 1
+ paginationConfig.total = 0
+ currentRecordList.value = []
+ currentChatId.value = 'new'
}
})
}
@@ -247,14 +246,14 @@ function refreshFieldTitle(chatId: string, abstract: string) {
}
function refresh(id: string) {
- getChatLog(applicationDetail.value.id)
currentChatId.value = id
+ getChatLog(true)
}
/**
*初始化历史对话记录
*/
const init = () => {
- getChatLog(applicationDetail.value.id)
+ getChatLog()
}
onMounted(() => {
diff --git a/ui/src/views/chat/pc/index.vue b/ui/src/views/chat/pc/index.vue
index d7eb9857c..dc0856ac1 100644
--- a/ui/src/views/chat/pc/index.vue
+++ b/ui/src/views/chat/pc/index.vue
@@ -324,7 +324,7 @@ function deleteLog(row: any) {
paginationConfig.value.total = 0
currentRecordList.value = []
}
- getChatLog(applicationDetail.value.id)
+ getChatLog()
})
}
@@ -335,7 +335,7 @@ function clearChat() {
paginationConfig.value.current_page = 1
paginationConfig.value.total = 0
currentRecordList.value = []
- getChatLog(applicationDetail.value.id)
+ getChatLog()
})
}
@@ -372,7 +372,7 @@ function newChat() {
}
}
-function getChatLog(id: string, refresh?: boolean) {
+function getChatLog(refresh?: boolean) {
const page = {
current_page: 1,
page_size: 20,
@@ -386,11 +386,8 @@ function getChatLog(id: string, refresh?: boolean) {
paginationConfig.value.current_page = 1
paginationConfig.value.total = 0
currentRecordList.value = []
- currentChatId.value = chatLogData.value?.[0]?.id || 'new'
- currentChatName.value = chatLogData.value?.[0]?.abstract || t('chat.createChat')
- if (currentChatId.value !== 'new') {
- getChatRecord()
- }
+ currentChatId.value = 'new'
+ currentChatName.value = t('chat.createChat')
}
})
}
@@ -449,7 +446,7 @@ const clickListHandle = (item: any) => {
function refresh(id: string) {
currentChatId.value = id
- getChatLog(applicationDetail.value.id, true)
+ getChatLog(true)
}
async function exportMarkdown(): Promise {
@@ -477,7 +474,7 @@ async function exportHTML(): Promise {
*初始化历史对话记录
*/
const init = () => {
- getChatLog(applicationDetail.value?.id)
+ getChatLog()
}
onMounted(() => {
init()
diff --git a/ui/src/views/knowledge/index.vue b/ui/src/views/knowledge/index.vue
index 2c2ae826e..971ca5270 100644
--- a/ui/src/views/knowledge/index.vue
+++ b/ui/src/views/knowledge/index.vue
@@ -74,7 +74,7 @@ function refreshFolder() {
}
onMounted(() => {
- getFolder(true)
+ getFolder(folder.currentFolder?.id ? false : true)
})
diff --git a/ui/src/views/system/resource-authorization/component/PermissionTable.vue b/ui/src/views/system/resource-authorization/component/PermissionTable.vue
index 2d514016f..573c7c1d7 100644
--- a/ui/src/views/system/resource-authorization/component/PermissionTable.vue
+++ b/ui/src/views/system/resource-authorization/component/PermissionTable.vue
@@ -81,9 +81,7 @@
-
-
-
+
{
- getFolder(true)
+ getFolder(folder.currentFolder?.id ? false : true)
})
diff --git a/ui/src/workflow/nodes/ai-chat-node/index.vue b/ui/src/workflow/nodes/ai-chat-node/index.vue
index b92a5d154..14c7fd168 100644
--- a/ui/src/workflow/nodes/ai-chat-node/index.vue
+++ b/ui/src/workflow/nodes/ai-chat-node/index.vue
@@ -130,16 +130,24 @@
-
-
- {{ relatedObject(mcpToolSelectOptions, chat_data.mcp_tool_id, 'id')?.name || $t('common.custom') + ' MCP' }}
+
+ {{
+ relatedObject(mcpToolSelectOptions, chat_data.mcp_tool_id, 'id')?.name ||
+ $t('common.custom') + ' MCP'
+ }}
@@ -163,7 +171,7 @@
-
+
@@ -186,17 +194,23 @@
{{ $t('views.application.form.reasoningContent.label') }}
-
-
-
+
-
@@ -241,7 +255,7 @@ import McpServersDialog from '@/views/application/component/McpServersDialog.vue
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
import { useRoute } from 'vue-router'
import ToolDialog from '@/views/application/component/ToolDialog.vue'
-import {relatedObject} from "@/utils/array.ts";
+import { relatedObject } from '@/utils/array.ts'
const getApplicationDetail = inject('getApplicationDetail') as any
const route = useRoute()