diff --git a/ui/src/api/application/application-overview.ts b/ui/src/api/application/application-overview.ts new file mode 100644 index 000000000..0513a0d34 --- /dev/null +++ b/ui/src/api/application/application-overview.ts @@ -0,0 +1,90 @@ +import { Result } from '@/request/Result' +import { get, post, del, put } from '@/request/index' + +import { type Ref } from 'vue' + +const prefix = '/application' + +/** + * API_KEY列表 + * @param 参数 application_id + */ +const getAPIKey: (application_id: string, loading?: Ref) => Promise> = ( + application_id, + loading +) => { + return get(`${prefix}/${application_id}/api_key`, undefined, loading) +} + +/** + * 新增API_KEY + * @param 参数 application_id + */ +const postAPIKey: (application_id: string, loading?: Ref) => Promise> = ( + application_id, + loading +) => { + return post(`${prefix}/${application_id}/api_key`, {}, undefined, loading) +} + +/** + * 删除API_KEY + * @param 参数 application_id api_key_id + */ +const delAPIKey: ( + application_id: String, + api_key_id: String, + loading?: Ref +) => Promise> = (application_id, api_key_id, loading) => { + return del(`${prefix}/${application_id}/api_key/${api_key_id}`, undefined, undefined, loading) +} + +/** + * 修改API_KEY + * @param 参数 application_id,api_key_id + * data { + * is_active: boolean + * } + */ +const putAPIKey: ( + application_id: string, + api_key_id: String, + data: any, + loading?: Ref +) => Promise> = (application_id, api_key_id, data, loading) => { + return put(`${prefix}/${application_id}/api_key/${api_key_id}`, data, undefined, loading) +} + +/** + * 统计 + * @param 参数 application_id, data + */ +const getStatistics: ( + application_id: string, + data: any, + loading?: Ref +) => Promise> = (application_id, data, loading) => { + return get(`${prefix}/${application_id}/statistics/chat_record_aggregate_trend`, data, loading) +} + +/** + * 修改应用icon + * @param 参数 application_id + * data: file + */ +const putAppIcon: ( + application_id: string, + data: any, + loading?: Ref +) => Promise> = (application_id, data, loading) => { + return put(`${prefix}/${application_id}/edit_icon`, data, undefined, loading) +} + +export default { + getAPIKey, + postAPIKey, + delAPIKey, + putAPIKey, + getStatistics, + putAppIcon +} diff --git a/ui/src/api/application/application-xpack.ts b/ui/src/api/application/application-xpack.ts new file mode 100644 index 000000000..25e973f57 --- /dev/null +++ b/ui/src/api/application/application-xpack.ts @@ -0,0 +1,41 @@ +import { Result } from '@/request/Result' +import { get, put } from '@/request/index' +import { type Ref } from 'vue' + +const prefix = '/application' + +/** + * 替换社区版-获取AccessToken + * @param 参数 application_id + */ +const getAccessToken: (application_id: string, loading?: Ref) => Promise> = ( + application_id, + loading +) => { + return get(`${prefix}/${application_id}/setting`, undefined, loading) +} + +/** + * 替换社区版-修改AccessToken + * @param 参数 application_id + * data { + * "show_source": boolean, + * "show_history": boolean, + * "draggable": boolean, + * "show_guide": boolean, + * "avatar": file, + * "float_icon": file, + * } + */ +const putAccessToken: ( + application_id: string, + data: any, + loading?: Ref +) => Promise> = (application_id, data, loading) => { + return put(`${prefix}/${application_id}/setting`, data, undefined, loading) +} + +export default { + getAccessToken, + putAccessToken +} diff --git a/ui/src/api/application/application.ts b/ui/src/api/application/application.ts new file mode 100644 index 000000000..8eabb3a8b --- /dev/null +++ b/ui/src/api/application/application.ts @@ -0,0 +1,589 @@ +import { Result } from '@/request/Result' +import { get, post, postStream, del, put, request, download, exportFile } from '@/request/index' +import type { pageRequest } from '@/api/type/common' +import type { ApplicationFormType } from '@/api/type/application' +import { type Ref } from 'vue' +import type { FormField } from '@/components/dynamics-form/type' + +const prefix = '/workspace' + +/** + * 获取全部应用 + * @param 参数 + */ +const getAllAppilcation: () => Promise> = () => { + return get(`${prefix}`) +} + +/** + * 获取分页应用 + * param { + "name": "string", + } + */ +const getApplication: ( + wordspace_id: string, + page: pageRequest, + param: any, + loading?: Ref, +) => Promise> = (wordspace_id, page, param, loading) => { + return get( + `${prefix}/${wordspace_id}/application/${page.current_page}/${page.page_size}`, + param, + loading, + ) +} + +/** + * 创建应用 + * @param 参数 + */ +const postApplication: ( + data: ApplicationFormType, + loading?: Ref, +) => Promise> = (data, loading) => { + return post(`${prefix}`, data, undefined, loading) +} + +/** + * 修改应用 + * @param 参数 + */ +const putApplication: ( + application_id: String, + data: ApplicationFormType, + loading?: Ref, +) => Promise> = (application_id, data, loading) => { + return put(`${prefix}/${application_id}`, data, undefined, loading) +} + +/** + * 删除应用 + * @param 参数 application_id + */ +const delApplication: ( + application_id: String, + loading?: Ref, +) => Promise> = (application_id, loading) => { + return del(`${prefix}/${application_id}`, undefined, {}, loading) +} + +/** + * 应用详情 + * @param 参数 application_id + */ +const getApplicationDetail: ( + application_id: string, + loading?: Ref, +) => Promise> = (application_id, loading) => { + return get(`${prefix}/${application_id}`, undefined, loading) +} + +/** + * 获得当前应用可使用的知识库 + * @param 参数 application_id + */ +const getApplicationDataset: ( + application_id: string, + loading?: Ref, +) => Promise> = (application_id, loading) => { + return get(`${prefix}/${application_id}/list_dataset`, undefined, loading) +} + +/** + * 获取AccessToken + * @param 参数 application_id + */ +const getAccessToken: (application_id: string, loading?: Ref) => Promise> = ( + application_id, + loading, +) => { + return get(`${prefix}/${application_id}/access_token`, undefined, loading) +} + +/** + * 修改AccessToken + * @param 参数 application_id + * data { + * "is_active": true + * } + */ +const putAccessToken: ( + application_id: string, + data: any, + loading?: Ref, +) => Promise> = (application_id, data, loading) => { + return put(`${prefix}/${application_id}/access_token`, data, undefined, loading) +} + +/** + * 应用认证 + * @param 参数 + { + "access_token": "string" + } + */ +const postAppAuthentication: ( + access_token: string, + loading?: Ref, + authentication_value?: any, +) => Promise = (access_token, loading, authentication_value) => { + return post( + `${prefix}/authentication`, + { access_token: access_token, authentication_value }, + undefined, + loading, + ) +} + +/** + * 对话获取应用相关信息 + * @param 参数 + { + "access_token": "string" + } + */ +const getAppProfile: (loading?: Ref) => Promise = (loading) => { + return get(`${prefix}/profile`, undefined, loading) +} + +/** + * 获得临时回话Id + * @param 参数 + + } + */ +const postChatOpen: (data: ApplicationFormType) => Promise> = (data) => { + return post(`${prefix}/chat/open`, data) +} + +/** + * 获得工作流临时回话Id + * @param 参数 + + } + */ +const postWorkflowChatOpen: (data: ApplicationFormType) => Promise> = (data) => { + return post(`${prefix}/chat_workflow/open`, data) +} + +/** + * 正式回话Id + * @param 参数 + * { + "model_id": "string", + "multiple_rounds_dialogue": true, + "dataset_id_list": [ + "string" + ] + } + */ +const getChatOpen: (application_id: String) => Promise> = (application_id) => { + return get(`${prefix}/${application_id}/chat/open`) +} +/** + * 对话 + * @param 参数 + * chat_id: string + * data + */ +const postChatMessage: (chat_id: string, data: any) => Promise = (chat_id, data) => { + return postStream(`/api${prefix}/chat_message/${chat_id}`, data) +} + +/** + * 点赞、点踩 + * @param 参数 + * application_id : string; chat_id : string; chat_record_id : string + * { + "vote_status": "string", // -1 0 1 + } + */ +const putChatVote: ( + application_id: string, + chat_id: string, + chat_record_id: string, + vote_status: string, + loading?: Ref, +) => Promise = (application_id, chat_id, chat_record_id, vote_status, loading) => { + return put( + `${prefix}/${application_id}/chat/${chat_id}/chat_record/${chat_record_id}/vote`, + { + vote_status, + }, + undefined, + loading, + ) +} + +/** + * 命中测试列表 + * @param application_id + * @param loading + * @query { query_text: string, top_number: number, similarity: number } + * @returns + */ +const getApplicationHitTest: ( + application_id: string, + data: any, + loading?: Ref, +) => Promise>> = (application_id, data, loading) => { + return get(`${prefix}/${application_id}/hit_test`, data, loading) +} + +/** + * 获取当前用户可使用的模型列表 + * @param application_id + * @param loading + * @query { query_text: string, top_number: number, similarity: number } + * @returns + */ +const getApplicationModel: ( + application_id: string, + loading?: Ref, +) => Promise>> = (application_id, loading) => { + return get(`${prefix}/${application_id}/model`, loading) +} + +/** + * 获取当前用户可使用的模型列表 + * @param application_id + * @param loading + * @query { query_text: string, top_number: number, similarity: number } + * @returns + */ +const getApplicationRerankerModel: ( + application_id: string, + loading?: Ref, +) => Promise>> = (application_id, loading) => { + return get(`${prefix}/${application_id}/model`, { model_type: 'RERANKER' }, loading) +} + +/** + * 获取当前用户可使用的模型列表 + * @param application_id + * @param loading + * @query { query_text: string, top_number: number, similarity: number } + * @returns + */ +const getApplicationSTTModel: ( + application_id: string, + loading?: Ref, +) => Promise>> = (application_id, loading) => { + return get(`${prefix}/${application_id}/model`, { model_type: 'STT' }, loading) +} + +/** + * 获取当前用户可使用的模型列表 + * @param application_id + * @param loading + * @query { query_text: string, top_number: number, similarity: number } + * @returns + */ +const getApplicationTTSModel: ( + application_id: string, + loading?: Ref, +) => Promise>> = (application_id, loading) => { + return get(`${prefix}/${application_id}/model`, { model_type: 'TTS' }, loading) +} + +const getApplicationImageModel: ( + application_id: string, + loading?: Ref, +) => Promise>> = (application_id, loading) => { + return get(`${prefix}/${application_id}/model`, { model_type: 'IMAGE' }, loading) +} + +const getApplicationTTIModel: ( + application_id: string, + loading?: Ref, +) => Promise>> = (application_id, loading) => { + return get(`${prefix}/${application_id}/model`, { model_type: 'TTI' }, loading) +} + +/** + * 发布应用 + * @param 参数 + */ +const putPublishApplication: ( + application_id: String, + data: ApplicationFormType, + loading?: Ref, +) => Promise> = (application_id, data, loading) => { + return put(`${prefix}/${application_id}/publish`, data, undefined, loading) +} +/** + * 获取应用所属的函数库列表 + * @param application_id 应用id + * @param loading + * @returns + */ +const listFunctionLib: (application_id: String, loading?: Ref) => Promise> = ( + application_id, + loading, +) => { + return get(`${prefix}/${application_id}/function_lib`, undefined, loading) +} +/** + * 获取当前人的所有应用列表 + * @param application_id 应用id + * @param loading + * @returns + */ +export const getApplicationList: ( + application_id: string, + loading?: Ref, +) => Promise> = (application_id, loading) => { + return get(`${prefix}/${application_id}/application`, undefined, loading) +} +/** + * 获取应用所属的函数库 + * @param application_id + * @param function_lib_id + * @param loading + * @returns + */ +const getFunctionLib: ( + application_id: String, + function_lib_id: String, + loading?: Ref, +) => Promise> = (application_id, function_lib_id, loading) => { + return get(`${prefix}/${application_id}/function_lib/${function_lib_id}`, undefined, loading) +} + +const getMcpTools: (data: any, loading?: Ref) => Promise> = ( + data, + loading, +) => { + return get(`${prefix}/mcp_servers`, data, loading) +} + +const getApplicationById: ( + application_id: String, + app_id: String, + loading?: Ref, +) => Promise> = (application_id, app_id, loading) => { + return get(`${prefix}/${application_id}/application/${app_id}`, undefined, loading) +} +/** + * 获取模型参数表单 + * @param application_id 应用id + * @param model_id 模型id + * @param loading + * @returns + */ +const getModelParamsForm: ( + application_id: String, + model_id: String, + loading?: Ref, +) => Promise>> = (application_id, model_id, loading) => { + return get(`${prefix}/${application_id}/model_params_form/${model_id}`, undefined, loading) +} + +/** + * 上传文档图片附件 + */ +const uploadFile: ( + application_id: String, + chat_id: String, + data: any, + loading?: Ref, +) => Promise> = (application_id, chat_id, data, loading) => { + return post(`${prefix}/${application_id}/chat/${chat_id}/upload_file`, data, undefined, loading) +} + +/** + * 语音转文本 + */ +const postSpeechToText: ( + application_id: String, + data: any, + loading?: Ref, +) => Promise> = (application_id, data, loading) => { + return post(`${prefix}/${application_id}/speech_to_text`, data, undefined, loading) +} + +/** + * 文本转语音 + */ +const postTextToSpeech: ( + application_id: String, + data: any, + loading?: Ref, +) => Promise> = (application_id, data, loading) => { + return download(`${prefix}/${application_id}/text_to_speech`, 'post', data, undefined, loading) +} + +/** + * 播放测试文本 + */ +const playDemoText: ( + application_id: String, + data: any, + loading?: Ref, +) => Promise> = (application_id, data, loading) => { + return download(`${prefix}/${application_id}/play_demo_text`, 'post', data, undefined, loading) +} +/** + * 获取平台状态 + */ +const getPlatformStatus: (application_id: string) => Promise> = (application_id) => { + return get(`/platform/${application_id}/status`) +} +/** + * 获取平台配置 + */ +const getPlatformConfig: (application_id: string, type: string) => Promise> = ( + application_id, + type, +) => { + return get(`/platform/${application_id}/${type}`) +} +/** + * 更新平台配置 + */ +const updatePlatformConfig: ( + application_id: string, + type: string, + data: any, + loading?: Ref, +) => Promise> = (application_id, type, data, loading) => { + return post(`/platform/${application_id}/${type}`, data, undefined, loading) +} +/** + * 更新平台状态 + */ +const updatePlatformStatus: (application_id: string, data: any) => Promise> = ( + application_id, + data, +) => { + return post(`/platform/${application_id}/status`, data) +} +/** + * 验证密码 + */ +const validatePassword: ( + application_id: string, + password: string, + loading?: Ref, +) => Promise> = (application_id, password, loading) => { + return get(`/application/${application_id}/auth/${password}`, undefined, loading) +} + +/** + * workflow历史版本 + */ +const getWorkFlowVersion: ( + application_id: string, + loading?: Ref, +) => Promise> = (application_id, loading) => { + return get(`/application/${application_id}/work_flow_version`, undefined, loading) +} + +/** + * workflow历史版本详情 + */ +const getWorkFlowVersionDetail: ( + application_id: string, + application_version_id: string, + loading?: Ref, +) => Promise> = (application_id, application_version_id, loading) => { + return get( + `/application/${application_id}/work_flow_version/${application_version_id}`, + undefined, + loading, + ) +} +/** + * 修改workflow历史版本 + */ +const putWorkFlowVersion: ( + application_id: string, + application_version_id: string, + data: any, + loading?: Ref, +) => Promise> = (application_id, application_version_id, data, loading) => { + return put( + `/application/${application_id}/work_flow_version/${application_version_id}`, + data, + undefined, + loading, + ) +} + +const getUserList: (type: string, loading?: Ref) => Promise> = ( + type, + loading, +) => { + return get(`/user/list/${type}`, undefined, loading) +} + +const exportApplication = ( + application_id: string, + application_name: string, + loading?: Ref, +) => { + return exportFile( + application_name + '.mk', + `/application/${application_id}/export`, + undefined, + loading, + ) +} + +/** + * 导入应用 + */ +const importApplication: (data: any, loading?: Ref) => Promise> = ( + data, + loading, +) => { + return post(`${prefix}/import`, data, undefined, loading) +} +export default { + getAllAppilcation, + getApplication, + postApplication, + putApplication, + postChatOpen, + getChatOpen, + postChatMessage, + delApplication, + getApplicationDetail, + getApplicationDataset, + getAccessToken, + putAccessToken, + postAppAuthentication, + getAppProfile, + putChatVote, + getApplicationHitTest, + getApplicationModel, + putPublishApplication, + postWorkflowChatOpen, + listFunctionLib, + getFunctionLib, + getModelParamsForm, + getApplicationRerankerModel, + getApplicationSTTModel, + getApplicationTTSModel, + getApplicationImageModel, + getApplicationTTIModel, + postSpeechToText, + postTextToSpeech, + getPlatformStatus, + getPlatformConfig, + updatePlatformConfig, + updatePlatformStatus, + validatePassword, + getWorkFlowVersion, + getWorkFlowVersionDetail, + putWorkFlowVersion, + playDemoText, + getUserList, + getApplicationList, + uploadFile, + exportApplication, + importApplication, + getApplicationById, + getMcpTools, +} diff --git a/ui/src/enums/application.ts b/ui/src/enums/application.ts new file mode 100644 index 000000000..9d3b52e8b --- /dev/null +++ b/ui/src/enums/application.ts @@ -0,0 +1,27 @@ +export enum SearchMode { + embedding = 'views.application.applicationForm.dialog.vectorSearch', + keywords = 'views.application.applicationForm.dialog.fullTextSearch', + blend = 'views.application.applicationForm.dialog.hybridSearch' +} + +export enum WorkflowType { + Base = 'base-node', + Start = 'start-node', + AiChat = 'ai-chat-node', + SearchDataset = 'search-dataset-node', + Question = 'question-node', + Condition = 'condition-node', + Reply = 'reply-node', + FunctionLib = 'function-lib-node', + FunctionLibCustom = 'function-node', + RrerankerNode = 'reranker-node', + Application = 'application-node', + DocumentExtractNode = 'document-extract-node', + ImageUnderstandNode = 'image-understand-node', + VariableAssignNode = 'variable-assign-node', + FormNode = 'form-node', + TextToSpeechNode = 'text-to-speech-node', + SpeechToTextNode = 'speech-to-text-node', + ImageGenerateNode = 'image-generate-node', + McpNode = 'mcp-node', +} diff --git a/ui/src/router/modules/1application.ts b/ui/src/router/modules/1application.ts index f3527086b..71ce326e2 100644 --- a/ui/src/router/modules/1application.ts +++ b/ui/src/router/modules/1application.ts @@ -1,4 +1,3 @@ -// import Layout from '@/layout/layout-template/DetailLayout.vue' import { ComplexPermission } from '@/utils/permission/type' const applicationRouter = { @@ -12,83 +11,10 @@ const applicationRouter = { path: '/application', name: 'application-index', meta: { title: '应用主页', activeMenu: '/application' }, - component: () => import('@/views/application/index.vue') + component: () => import('@/views/application/index.vue'), + hidden: true, }, - // { - // path: '/application/:id/:type', - // name: 'ApplicationDetail', - // meta: { title: '应用详情', activeMenu: '/application' }, - // component: Layout, - // hidden: true, - // children: [ - // { - // path: 'overview', - // name: 'AppOverview', - // meta: { - // icon: 'app-all-menu', - // iconActive: 'app-all-menu-active', - // title: 'views.applicationOverview.title', - // active: 'overview', - // parentPath: '/application/:id/:type', - // parentName: 'ApplicationDetail' - // }, - // component: () => import('@/views/application-overview/index.vue') - // }, - // { - // path: 'setting', - // name: 'AppSetting', - // meta: { - // icon: 'app-setting', - // iconActive: 'app-setting-active', - // title: 'common.setting', - // active: 'setting', - // parentPath: '/application/:id/:type', - // parentName: 'ApplicationDetail' - // }, - // component: () => import('@/views/application/ApplicationSetting.vue') - // }, - // { - // path: 'access', - // name: 'AppAccess', - // meta: { - // icon: 'app-access', - // iconActive: 'app-access-active', - // title: 'views.application.applicationAccess.title', - // active: 'access', - // parentPath: '/application/:id/:type', - // parentName: 'ApplicationDetail', - // permission: new ComplexPermission([], ['x-pack'], 'OR') - // }, - // component: () => import('@/views/application/ApplicationAccess.vue') - // }, - // { - // path: 'hit-test', - // name: 'AppHitTest', - // meta: { - // icon: 'app-hit-test', - // title: 'views.application.hitTest.title', - // active: 'hit-test', - // parentPath: '/application/:id/:type', - // parentName: 'ApplicationDetail' - // }, - // component: () => import('@/views/hit-test/index.vue') - // }, - // // { - // // path: 'log', - // // name: 'Log', - // // meta: { - // // icon: 'app-document', - // // iconActive: 'app-document-active', - // // title: 'views.log.title', - // // active: 'log', - // // parentPath: '/application/:id/:type', - // // parentName: 'ApplicationDetail' - // // }, - // // component: () => import('@/views/log/index.vue') - // // } - // ] - // } - ] + ], } export default applicationRouter diff --git a/ui/src/router/modules/application-detail.ts b/ui/src/router/modules/application-detail.ts new file mode 100644 index 000000000..9780a6c07 --- /dev/null +++ b/ui/src/router/modules/application-detail.ts @@ -0,0 +1,76 @@ +const ApplicationDetailRouter = { + path: '/application/:id/:type', + name: 'ApplicationDetail', + meta: { title: '应用详情', activeMenu: '/application', breadcrumb: true }, + component: () => import('@/layout/layout-template/MainLayout.vue'), + hidden: true, + children: [ + { + path: 'overview', + name: 'AppOverview', + meta: { + icon: 'app-all-menu', + iconActive: 'app-all-menu-active', + title: 'views.applicationOverview.title', + active: 'overview', + parentPath: '/application/:id/:type', + parentName: 'ApplicationDetail', + }, + component: () => import('@/views/application-overview/index.vue'), + }, + { + path: 'setting', + name: 'AppSetting', + meta: { + icon: 'app-setting', + iconActive: 'app-setting-active', + title: 'common.setting', + active: 'setting', + parentPath: '/application/:id/:type', + parentName: 'ApplicationDetail', + }, + component: () => import('@/views/application/ApplicationSetting.vue'), + }, + { + path: 'access', + name: 'AppAccess', + meta: { + icon: 'app-access', + iconActive: 'app-access-active', + title: 'views.application.applicationAccess.title', + active: 'access', + parentPath: '/application/:id/:type', + parentName: 'ApplicationDetail', + // permission: new ComplexPermission([], ['x-pack'], 'OR'), + }, + component: () => import('@/views/application/ApplicationAccess.vue'), + }, + { + path: 'hit-test', + name: 'AppHitTest', + meta: { + icon: 'app-hit-test', + title: 'views.application.hitTest.title', + active: 'hit-test', + parentPath: '/application/:id/:type', + parentName: 'ApplicationDetail', + }, + component: () => import('@/views/hit-test/index.vue'), + }, + // { + // path: 'log', + // name: 'Log', + // meta: { + // icon: 'app-document', + // iconActive: 'app-document-active', + // title: 'views.log.title', + // active: 'log', + // parentPath: '/application/:id/:type', + // parentName: 'ApplicationDetail' + // }, + // component: () => import('@/views/log/index.vue') + // } + ], +} + +export default ApplicationDetailRouter diff --git a/ui/src/router/modules/document.ts b/ui/src/router/modules/document.ts index 7eeb59815..b542b46b5 100644 --- a/ui/src/router/modules/document.ts +++ b/ui/src/router/modules/document.ts @@ -1,4 +1,4 @@ -const ModelRouter = { +const DocumentRouter = { path: '/knowledge/:id', name: 'KnowledgeDetail', meta: { title: 'common.fileUpload.document', activeMenu: '/knowledge', breadcrumb: true }, @@ -59,4 +59,4 @@ const ModelRouter = { ], } -export default ModelRouter +export default DocumentRouter diff --git a/ui/src/router/routes.ts b/ui/src/router/routes.ts index 908a31bde..1b18a0d4a 100644 --- a/ui/src/router/routes.ts +++ b/ui/src/router/routes.ts @@ -6,7 +6,7 @@ export const routes: Array = [ { path: '/', name: 'home', - redirect: '/knowledge', + redirect: '/application', children: [...rolesRoutes], }, diff --git a/ui/src/views/application-overview/component/APIKeyDialog.vue b/ui/src/views/application-overview/component/APIKeyDialog.vue index dc8c9aa37..ae05231ba 100644 --- a/ui/src/views/application-overview/component/APIKeyDialog.vue +++ b/ui/src/views/application-overview/component/APIKeyDialog.vue @@ -61,7 +61,7 @@ import { ref, watch } from 'vue' import { useRoute } from 'vue-router' import { copyClick } from '@/utils/clipboard' -import overviewApi from '@/api/application-overview' +import overviewApi from '@/api/application/application-overview' import SettingAPIKeyDialog from './SettingAPIKeyDialog.vue' import { datetimeFormat } from '@/utils/time' import { MsgSuccess, MsgConfirm } from '@/utils/message' diff --git a/ui/src/views/application-overview/component/DisplaySettingDialog.vue b/ui/src/views/application-overview/component/DisplaySettingDialog.vue index 21878dda9..907c3f478 100644 --- a/ui/src/views/application-overview/component/DisplaySettingDialog.vue +++ b/ui/src/views/application-overview/component/DisplaySettingDialog.vue @@ -47,7 +47,7 @@ import { ref, watch } from 'vue' import { useRoute } from 'vue-router' import type { FormInstance, FormRules, UploadFiles } from 'element-plus' -import applicationApi from '@/api/application' +import applicationApi from '@/api/application/application' import { isWorkFlow } from '@/utils/application' import { MsgSuccess, MsgError } from '@/utils/message' import { getBrowserLang, langList, t } from '@/locales' diff --git a/ui/src/views/application-overview/component/EditAvatarDialog.vue b/ui/src/views/application-overview/component/EditAvatarDialog.vue index b9946d687..978a8ba2a 100644 --- a/ui/src/views/application-overview/component/EditAvatarDialog.vue +++ b/ui/src/views/application-overview/component/EditAvatarDialog.vue @@ -61,7 +61,7 @@ - + diff --git a/ui/src/views/hit-test/index.vue b/ui/src/views/hit-test/index.vue index a150101e8..72c202ae2 100644 --- a/ui/src/views/hit-test/index.vue +++ b/ui/src/views/hit-test/index.vue @@ -222,7 +222,7 @@ import { nextTick, ref, onMounted, computed } from 'vue' import { useRoute } from 'vue-router' import { cloneDeep } from 'lodash' import KnowledgeApi from '@/api/knowledge/knowledge' -// import applicationApi from '@/api/application' +// import applicationApi from '@/api/application/application' import ParagraphDialog from '@/views/paragraph/component/ParagraphDialog.vue' import { arraySort } from '@/utils/common' import emptyImg from '@/assets/hit-test-empty.png' diff --git a/ui/src/workflow/common/NodeContainer.vue b/ui/src/workflow/common/NodeContainer.vue index b61fe25b6..50ad024bc 100644 --- a/ui/src/workflow/common/NodeContainer.vue +++ b/ui/src/workflow/common/NodeContainer.vue @@ -171,7 +171,7 @@ import DropdownMenu from '@/views/application-workflow/component/DropdownMenu.vu import { set } from 'lodash' import { iconComponent } from '../icons/utils' import { copyClick } from '@/utils/clipboard' -import { WorkflowType } from '@/enums/workflow' +import { WorkflowType } from '@/enums/application' import { MsgError, MsgConfirm } from '@/utils/message' import type { FormInstance } from 'element-plus' import { t } from '@/locales' diff --git a/ui/src/workflow/common/app-node.ts b/ui/src/workflow/common/app-node.ts index 3665cb262..8eed6c15b 100644 --- a/ui/src/workflow/common/app-node.ts +++ b/ui/src/workflow/common/app-node.ts @@ -7,7 +7,7 @@ import { h as lh } from '@logicflow/core' import { createApp, h } from 'vue' import directives from '@/directives' import i18n from '@/locales' -import { WorkflowType } from '@/enums/workflow' +import { WorkflowType } from '@/enums/application' import { nodeDict } from '@/workflow/common/data' import { isActive, connect, disconnect } from './teleport' import { t } from '@/locales' diff --git a/ui/src/workflow/common/data.ts b/ui/src/workflow/common/data.ts index 6ce89c243..48e281fe3 100644 --- a/ui/src/workflow/common/data.ts +++ b/ui/src/workflow/common/data.ts @@ -1,4 +1,4 @@ -import { WorkflowType } from '@/enums/workflow' +import { WorkflowType } from '@/enums/application' import { t } from '@/locales' export const startNode = { diff --git a/ui/src/workflow/common/shortcut.ts b/ui/src/workflow/common/shortcut.ts index 2b3235b6b..49455c29c 100644 --- a/ui/src/workflow/common/shortcut.ts +++ b/ui/src/workflow/common/shortcut.ts @@ -1,7 +1,7 @@ import type LogicFlow from '@logicflow/core' import { type GraphModel } from '@logicflow/core' import { MsgSuccess, MsgError, MsgConfirm } from '@/utils/message' -import { WorkflowType } from '@/enums/workflow' +import { WorkflowType } from '@/enums/application' import { t } from '@/locales' let selected: any | null = null diff --git a/ui/src/workflow/common/validate.ts b/ui/src/workflow/common/validate.ts index cc9378bc3..27d80f9df 100644 --- a/ui/src/workflow/common/validate.ts +++ b/ui/src/workflow/common/validate.ts @@ -1,4 +1,4 @@ -import { WorkflowType } from '@/enums/workflow' +import { WorkflowType } from '@/enums/application' import { t } from '@/locales' const end_nodes: Array = [ diff --git a/ui/src/workflow/nodes/ai-chat-node/index.vue b/ui/src/workflow/nodes/ai-chat-node/index.vue index 8b4a6aeb9..94287c768 100644 --- a/ui/src/workflow/nodes/ai-chat-node/index.vue +++ b/ui/src/workflow/nodes/ai-chat-node/index.vue @@ -178,7 +178,7 @@ import { app } from '@/main' import NodeContainer from '@/workflow/common/NodeContainer.vue' import type { FormInstance } from 'element-plus' import { ref, computed, onMounted } from 'vue' -import applicationApi from '@/api/application' +import applicationApi from '@/api/application/application' import useStore from '@/stores' import { isLastNode } from '@/workflow/common/data' import AIModeParamSettingDialog from '@/views/application/component/AIModeParamSettingDialog.vue' diff --git a/ui/src/workflow/nodes/application-node/index.vue b/ui/src/workflow/nodes/application-node/index.vue index 4fc9fba54..f2a3eb7f1 100644 --- a/ui/src/workflow/nodes/application-node/index.vue +++ b/ui/src/workflow/nodes/application-node/index.vue @@ -172,7 +172,7 @@ import NodeContainer from '@/workflow/common/NodeContainer.vue' import { ref, computed, onMounted, onActivated } from 'vue' import NodeCascader from '@/workflow/common/NodeCascader.vue' import type { FormInstance } from 'element-plus' -import applicationApi from '@/api/application' +import applicationApi from '@/api/application/application' import { isWorkFlow } from '@/utils/application' const form = { diff --git a/ui/src/workflow/nodes/base-node/index.vue b/ui/src/workflow/nodes/base-node/index.vue index 5904745b2..63bfe6ddc 100644 --- a/ui/src/workflow/nodes/base-node/index.vue +++ b/ui/src/workflow/nodes/base-node/index.vue @@ -182,7 +182,7 @@ import { groupBy, set } from 'lodash' import NodeContainer from '@/workflow/common/NodeContainer.vue' import type { FormInstance } from 'element-plus' import { ref, computed, onMounted } from 'vue' -import applicationApi from '@/api/application' +import applicationApi from '@/api/application/application' import { MsgError, MsgSuccess, MsgWarning } from '@/utils/message' import { t } from '@/locales' import TTSModeParamSettingDialog from '@/views/application/component/TTSModeParamSettingDialog.vue' diff --git a/ui/src/workflow/nodes/function-lib-node/index.vue b/ui/src/workflow/nodes/function-lib-node/index.vue index 794cabd20..b797ec7f6 100644 --- a/ui/src/workflow/nodes/function-lib-node/index.vue +++ b/ui/src/workflow/nodes/function-lib-node/index.vue @@ -89,7 +89,7 @@ import NodeCascader from '@/workflow/common/NodeCascader.vue' import type { FormInstance } from 'element-plus' import { ref, computed, onMounted } from 'vue' import { isLastNode } from '@/workflow/common/data' -import applicationApi from '@/api/application' +import applicationApi from '@/api/application/application' import { app } from '@/main' const props = defineProps<{ nodeModel: any }>() diff --git a/ui/src/workflow/nodes/image-generate/index.vue b/ui/src/workflow/nodes/image-generate/index.vue index d71f3adf9..f69b8e3d5 100644 --- a/ui/src/workflow/nodes/image-generate/index.vue +++ b/ui/src/workflow/nodes/image-generate/index.vue @@ -156,7 +156,7 @@ import NodeContainer from '@/workflow/common/NodeContainer.vue' import { computed, onMounted, ref } from 'vue' import { groupBy, set } from 'lodash' -import applicationApi from '@/api/application' +import applicationApi from '@/api/application/application' import { app } from '@/main' import useStore from '@/stores' import type { FormInstance } from 'element-plus' diff --git a/ui/src/workflow/nodes/image-understand/index.vue b/ui/src/workflow/nodes/image-understand/index.vue index e2ac7c13b..3dd8ab768 100644 --- a/ui/src/workflow/nodes/image-understand/index.vue +++ b/ui/src/workflow/nodes/image-understand/index.vue @@ -174,7 +174,7 @@ import NodeContainer from '@/workflow/common/NodeContainer.vue' import { computed, onMounted, ref } from 'vue' import { groupBy, set } from 'lodash' -import applicationApi from '@/api/application' +import applicationApi from '@/api/application/application' import { app } from '@/main' import useStore from '@/stores' import NodeCascader from '@/workflow/common/NodeCascader.vue' diff --git a/ui/src/workflow/nodes/mcp-node/index.vue b/ui/src/workflow/nodes/mcp-node/index.vue index 7cba4d51e..ca001ca98 100644 --- a/ui/src/workflow/nodes/mcp-node/index.vue +++ b/ui/src/workflow/nodes/mcp-node/index.vue @@ -209,7 +209,7 @@ import { cloneDeep, set } from 'lodash' import NodeContainer from '@/workflow/common/NodeContainer.vue' import { computed, onMounted, ref } from 'vue' import { isLastNode } from '@/workflow/common/data' -import applicationApi from '@/api/application' +import applicationApi from '@/api/application/application' import { t } from '@/locales' import { MsgError, MsgSuccess } from '@/utils/message' import TooltipLabel from '@/components/dynamics-form/items/label/TooltipLabel.vue' diff --git a/ui/src/workflow/nodes/question-node/index.vue b/ui/src/workflow/nodes/question-node/index.vue index f9e9559a9..d6942eb28 100644 --- a/ui/src/workflow/nodes/question-node/index.vue +++ b/ui/src/workflow/nodes/question-node/index.vue @@ -141,7 +141,7 @@ import NodeContainer from '@/workflow/common/NodeContainer.vue' import AIModeParamSettingDialog from '@/views/application/component/AIModeParamSettingDialog.vue' import type { FormInstance } from 'element-plus' import { ref, computed, onMounted } from 'vue' -import applicationApi from '@/api/application' +import applicationApi from '@/api/application/application' import useStore from '@/stores' import { isLastNode } from '@/workflow/common/data' import { t } from '@/locales' diff --git a/ui/src/workflow/nodes/reranker-node/index.vue b/ui/src/workflow/nodes/reranker-node/index.vue index 355776883..d2a61851b 100644 --- a/ui/src/workflow/nodes/reranker-node/index.vue +++ b/ui/src/workflow/nodes/reranker-node/index.vue @@ -173,7 +173,7 @@ import NodeCascader from '@/workflow/common/NodeCascader.vue' import ParamSettingDialog from './ParamSettingDialog.vue' import { ref, computed, onMounted } from 'vue' -import applicationApi from '@/api/application' +import applicationApi from '@/api/application/application' import useStore from '@/stores' import { app } from '@/main' diff --git a/ui/src/workflow/nodes/speech-to-text-node/index.vue b/ui/src/workflow/nodes/speech-to-text-node/index.vue index 133acddce..f3625a69a 100644 --- a/ui/src/workflow/nodes/speech-to-text-node/index.vue +++ b/ui/src/workflow/nodes/speech-to-text-node/index.vue @@ -99,7 +99,7 @@ import NodeContainer from '@/workflow/common/NodeContainer.vue' import { computed, onMounted, ref } from 'vue' import { groupBy, set } from 'lodash' -import applicationApi from '@/api/application' +import applicationApi from '@/api/application/application' import { app } from '@/main' import useStore from '@/stores' import NodeCascader from '@/workflow/common/NodeCascader.vue' diff --git a/ui/src/workflow/nodes/text-to-speech-node/index.vue b/ui/src/workflow/nodes/text-to-speech-node/index.vue index d5b9fe609..f78017251 100644 --- a/ui/src/workflow/nodes/text-to-speech-node/index.vue +++ b/ui/src/workflow/nodes/text-to-speech-node/index.vue @@ -108,7 +108,7 @@ import NodeContainer from '@/workflow/common/NodeContainer.vue' import { computed, onMounted, ref } from 'vue' import { groupBy, set } from 'lodash' -import applicationApi from '@/api/application' +import applicationApi from '@/api/application/application' import { app } from '@/main' import useStore from '@/stores' import NodeCascader from '@/workflow/common/NodeCascader.vue'