diff --git a/apps/application/chat_pipeline/step/chat_step/impl/base_chat_step.py b/apps/application/chat_pipeline/step/chat_step/impl/base_chat_step.py index 52c0a81fc2b..01e3dbd97bb 100644 --- a/apps/application/chat_pipeline/step/chat_step/impl/base_chat_step.py +++ b/apps/application/chat_pipeline/step/chat_step/impl/base_chat_step.py @@ -185,7 +185,8 @@ def execute(self, message_list: List[BaseMessage], mcp_output_enable=True, **kwargs): chat_model = get_model_instance_by_model_workspace_id(model_id, workspace_id, - **(model_params_setting or {})) if model_id is not None else None + **( + model_params_setting or {})) if model_id is not None else None if stream: return self.execute_stream(message_list, chat_id, problem_text, post_response_handler, chat_model, paragraph_list, diff --git a/apps/models_provider/impl/minimax_model_provider/icon/minimax_icon_svg b/apps/models_provider/impl/minimax_model_provider/icon/minimax_icon_svg index 9402fbfd5cb..5846af5d8e0 100644 --- a/apps/models_provider/impl/minimax_model_provider/icon/minimax_icon_svg +++ b/apps/models_provider/impl/minimax_model_provider/icon/minimax_icon_svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/ui/package.json b/ui/package.json index 31da1f66da4..10b96ce2536 100644 --- a/ui/package.json +++ b/ui/package.json @@ -20,6 +20,7 @@ "@codemirror/lang-json": "^6.0.1", "@codemirror/lang-python": "^6.2.1", "@codemirror/theme-one-dark": "^6.1.2", + "@he-tree/vue": "^2.10.5", "@logicflow/core": "^1.2.27", "@logicflow/extension": "^1.2.27", "@vavt/cm-extension": "^1.9.1", diff --git a/ui/src/components/folder-tree/index.vue b/ui/src/components/folder-tree/index.vue index dac762224dd..bdadbe3fbb9 100644 --- a/ui/src/components/folder-tree/index.vue +++ b/ui/src/components/folder-tree/index.vue @@ -57,7 +57,7 @@ :class=" showShared && hasPermission(EditionConst.IS_EE, 'OR') ? 'tree-height-shared' - : 'tree-height ' + : 'tree-height' " :style="treeStyle" ref="treeRef" diff --git a/ui/src/components/folder-virtualized-tree/CreateFolderDialog.vue b/ui/src/components/folder-virtualized-tree/CreateFolderDialog.vue new file mode 100644 index 00000000000..771fb129f46 --- /dev/null +++ b/ui/src/components/folder-virtualized-tree/CreateFolderDialog.vue @@ -0,0 +1,154 @@ + + + diff --git a/ui/src/components/folder-virtualized-tree/MoveToDialog.vue b/ui/src/components/folder-virtualized-tree/MoveToDialog.vue new file mode 100644 index 00000000000..2be96edf37d --- /dev/null +++ b/ui/src/components/folder-virtualized-tree/MoveToDialog.vue @@ -0,0 +1,191 @@ + + + diff --git a/ui/src/components/folder-virtualized-tree/VirtualizedTree.vue b/ui/src/components/folder-virtualized-tree/VirtualizedTree.vue new file mode 100644 index 00000000000..d8657ba81c8 --- /dev/null +++ b/ui/src/components/folder-virtualized-tree/VirtualizedTree.vue @@ -0,0 +1,248 @@ + + + + + diff --git a/ui/src/components/folder-virtualized-tree/constant.ts b/ui/src/components/folder-virtualized-tree/constant.ts new file mode 100644 index 00000000000..fbd25a10f28 --- /dev/null +++ b/ui/src/components/folder-virtualized-tree/constant.ts @@ -0,0 +1,31 @@ +import { t } from '@/locales' + +export const SORT_TYPES = { + CREATE_TIME_ASC: 'createTime-asc', + CREATE_TIME_DESC: 'createTime-desc', + NAME_ASC: 'name-asc', + NAME_DESC: 'name-desc', + CUSTOM: 'custom', +} as const + +export type SortType = (typeof SORT_TYPES)[keyof typeof SORT_TYPES] + +export const SORT_MENU_CONFIG = [ + { + title: 'time', + items: [ + { label: t('components.folder.ascTime'), value: SORT_TYPES.CREATE_TIME_ASC }, + { label: t('components.folder.descTime'), value: SORT_TYPES.CREATE_TIME_DESC }, + ], + }, + { + title: 'name', + items: [ + { label: t('components.folder.ascName'), value: SORT_TYPES.NAME_ASC }, + { label: t('components.folder.descName'), value: SORT_TYPES.NAME_DESC }, + ], + }, + { + items: [{ label: t('components.folder.custom'), value: SORT_TYPES.CUSTOM }], + }, +] diff --git a/ui/src/components/folder-virtualized-tree/index.vue b/ui/src/components/folder-virtualized-tree/index.vue new file mode 100644 index 00000000000..fdac4a09c13 --- /dev/null +++ b/ui/src/components/folder-virtualized-tree/index.vue @@ -0,0 +1,708 @@ + + + + diff --git a/ui/src/components/index.ts b/ui/src/components/index.ts index 302371d1fb5..6ef00f9db5e 100644 --- a/ui/src/components/index.ts +++ b/ui/src/components/index.ts @@ -7,6 +7,7 @@ import AppIcon from './app-icon/AppIcon.vue' import LayoutContainer from './layout-container/index.vue' import ContentContainer from './layout-container/ContentContainer.vue' import CardBox from './card-box/index.vue' +import FolderVirtualizedTree from './folder-virtualized-tree/index.vue' import FolderTree from './folder-tree/index.vue' import CommonList from './common-list/index.vue' import BackButton from './back-button/index.vue' @@ -59,5 +60,6 @@ export default { app.component('TagGroup', TagGroup) app.component('WorkspaceDropdown', WorkspaceDropdown) app.component('FolderBreadcrumb', FolderBreadcrumb) + app.component('FolderVirtualizedTree', FolderVirtualizedTree) }, } diff --git a/ui/src/styles/app.scss b/ui/src/styles/app.scss index f203477fef0..4164fc5ad85 100644 --- a/ui/src/styles/app.scss +++ b/ui/src/styles/app.scss @@ -540,6 +540,9 @@ h5 { /* 图标旋转90度 */ +.arrow-icon { + transition: transform 0.2s ease-in-out; +} .rotate-90 { transform: rotateZ(90deg); } @@ -566,9 +569,6 @@ h5 { background-size: cover; } -.arrow-icon { - transition: 0.2s; -} .sup-popover { display: none; position: absolute; diff --git a/ui/src/styles/index.scss b/ui/src/styles/index.scss index e1476a3e7c3..c1fea2e4044 100644 --- a/ui/src/styles/index.scss +++ b/ui/src/styles/index.scss @@ -6,4 +6,3 @@ @use './md-editor.scss'; @import 'nprogress/nprogress.css'; @import 'md-editor-v3/lib/style.css'; - diff --git a/ui/src/views/application/index.vue b/ui/src/views/application/index.vue index 2328091a18d..f490bb775d1 100644 --- a/ui/src/views/application/index.vue +++ b/ui/src/views/application/index.vue @@ -3,7 +3,7 @@