diff --git a/ui/src/components/ai-chat/ExecutionDetailDialog.vue b/ui/src/components/ai-chat/ExecutionDetailDialog.vue index 715996d81..8330fed30 100644 --- a/ui/src/components/ai-chat/ExecutionDetailDialog.vue +++ b/ui/src/components/ai-chat/ExecutionDetailDialog.vue @@ -185,7 +185,6 @@ import { cloneDeep } from 'lodash' import { arraySort } from '@/utils/utils' import { iconComponent } from '@/workflow/icons/utils' import { WorkflowType } from '@/enums/workflow' -import { MdPreview } from 'md-editor-v3' const dialogVisible = ref(false) const detail = ref([]) diff --git a/ui/src/components/ai-chat/ParagraphSourceDialog.vue b/ui/src/components/ai-chat/ParagraphSourceDialog.vue index b8de0077b..4543e92c3 100644 --- a/ui/src/components/ai-chat/ParagraphSourceDialog.vue +++ b/ui/src/components/ai-chat/ParagraphSourceDialog.vue @@ -71,7 +71,6 @@ import { ref, watch, onBeforeUnmount } from 'vue' import { cloneDeep } from 'lodash' import { arraySort } from '@/utils/utils' -import { MdPreview } from 'md-editor-v3' const emit = defineEmits(['refresh']) const ParagraphDialogRef = ref() diff --git a/ui/src/components/ai-chat/index.vue b/ui/src/components/ai-chat/index.vue index 51c5e387f..d18cd4253 100644 --- a/ui/src/components/ai-chat/index.vue +++ b/ui/src/components/ai-chat/index.vue @@ -154,9 +154,8 @@ import logApi from '@/api/log' import { ChatManagement, type chatType } from '@/api/type/application' import { randomId } from '@/utils/utils' import useStore from '@/stores' -import MdRenderer from '@/components/markdown-renderer/MdRenderer.vue' +import MdRenderer from '@/components/markdown/MdRenderer.vue' import { isWorkFlow } from '@/utils/application' -import { MdPreview } from 'md-editor-v3' import { debounce } from 'lodash' defineOptions({ name: 'AiChat' }) const route = useRoute() diff --git a/ui/src/components/index.ts b/ui/src/components/index.ts index 79287c84e..ddd152fa0 100644 --- a/ui/src/components/index.ts +++ b/ui/src/components/index.ts @@ -17,6 +17,8 @@ import CardCheckbox from './card-checkbox/index.vue' import AiChat from './ai-chat/index.vue' import InfiniteScroll from './infinite-scroll/index.vue' import AutoTooltip from './auto-tooltip/index.vue' +import MdEditor from './markdown/MdEditor.vue' +import MdPreview from './markdown/MdPreview.vue' export default { install(app: App) { @@ -38,5 +40,7 @@ export default { app.component(AiChat.name, AiChat) app.component(InfiniteScroll.name, InfiniteScroll) app.component(AutoTooltip.name, AutoTooltip) + app.component(MdPreview.name, MdPreview) + app.component(MdEditor.name, MdEditor) } } diff --git a/ui/src/components/markdown-editor/index.vue b/ui/src/components/markdown-editor/index.vue deleted file mode 100644 index 681d631a0..000000000 --- a/ui/src/components/markdown-editor/index.vue +++ /dev/null @@ -1,21 +0,0 @@ - - - diff --git a/ui/src/components/markdown/MdEditor.vue b/ui/src/components/markdown/MdEditor.vue new file mode 100644 index 000000000..ec1c3ae67 --- /dev/null +++ b/ui/src/components/markdown/MdEditor.vue @@ -0,0 +1,14 @@ + + + diff --git a/ui/src/components/markdown/MdPreview.vue b/ui/src/components/markdown/MdPreview.vue new file mode 100644 index 000000000..7efcf95cf --- /dev/null +++ b/ui/src/components/markdown/MdPreview.vue @@ -0,0 +1,8 @@ + + + diff --git a/ui/src/components/markdown-renderer/MdRenderer.vue b/ui/src/components/markdown/MdRenderer.vue similarity index 96% rename from ui/src/components/markdown-renderer/MdRenderer.vue rename to ui/src/components/markdown/MdRenderer.vue index 1f9adba19..0053e3f87 100644 --- a/ui/src/components/markdown-renderer/MdRenderer.vue +++ b/ui/src/components/markdown/MdRenderer.vue @@ -11,7 +11,7 @@