Jelajahi Sumber

perf: 调整answer相关组件的目录结构,增强可维护性

zhupei 1 tahun lalu
induk
melakukan
ce7220e115

+ 2 - 4
src/components/DialogWrap.vue

@@ -255,10 +255,8 @@
 import DialogFeedback from "./DialogFeedback.vue";
 import { defineComponent, ref, onBeforeUnmount, onMounted, reactive, nextTick, inject } from "vue";
 
-import formatAnwserString from './refference-effect/format-anwser-string';
-// import applyRefferencePopover from './refference-effect/apply-refference-popover';
-// import applyImageDisplay from './refference-effect/apply-image-display';
-import initTempHistory, {getChatIdFromUrl} from './refference-effect/temp-history';
+import formatAnwserString from './answer-effect/format-anwser-string';
+import initTempHistory, {getChatIdFromUrl} from './answer-effect/temp-history';
 
 import { getDocumentUrl } from '../ajax/document';
 

+ 0 - 4
src/components/PictureCards.vue

@@ -132,7 +132,6 @@ import { defineComponent, ref, inject, reactive } from "vue";
 
 import { Message } from '@arco-design/web-vue';
 
-import AnwserPictureResult from './anwser-pictures/AnwserPictureResult.vue';
 import BtnIframeComfyui from './btn-iframe-comfyui/BtnIframeComfyui.vue';
 
 import ImgEditBtn from './image-editor/ImgEditBtn.vue';
@@ -140,11 +139,8 @@ import ImgEditBtn from './image-editor/ImgEditBtn.vue';
 export default defineComponent({
   props: ["data", "hasUpload", "hasSlider", "uploadFile", "isQuestion", "agentId", "agengtName"],
   components: {
-    AnwserPictureResult,
-    // AnwserPictureLoading,
     BtnIframeComfyui,
 
-    // TuiImageEditor,
     ImgEditBtn
   },
   setup(props) {

+ 0 - 0
src/components/refference-effect/AsideImage.vue → src/components/answer-effect/AsideImage.vue


+ 0 - 0
src/components/refference-effect/README.md → src/components/answer-effect/README.md


+ 0 - 0
src/components/refference-effect/RefferenceFlag.vue → src/components/answer-effect/RefferenceFlag.vue


+ 1 - 3
src/components/refference-effect/RootImage.vue → src/components/answer-effect/RootImage.vue

@@ -3,9 +3,7 @@
 </template>
 
 <script setup>
-// import RefferenceFlag from './RefferenceFlag.vue'
-
-import AnwserPictureResult from '../anwser-pictures/AnwserPictureResult.vue';
+import AnwserPictureResult from '../answer-pictures/AnwserPictureResult.vue';
 // import AnwserPictureLoading from './anwser-pictures/AnwserPictureLoading.vue';
 
 const props = defineProps({

+ 0 - 0
src/components/refference-effect/RootRefference.vue → src/components/answer-effect/RootRefference.vue


+ 0 - 0
src/components/refference-effect/apply-image-display.js → src/components/answer-effect/apply-image-display.js


+ 0 - 0
src/components/refference-effect/apply-refference-popover.js → src/components/answer-effect/apply-refference-popover.js


+ 0 - 0
src/components/refference-effect/effect-image-display.js → src/components/answer-effect/effect-image-display.js


+ 0 - 0
src/components/refference-effect/effect-refference-flag.js → src/components/answer-effect/effect-refference-flag.js


+ 2 - 2
src/components/refference-effect/format-anwser-string.js → src/components/answer-effect/format-anwser-string.js

@@ -22,8 +22,8 @@ export default function formatAnwserString(string) {
      */
     let temp_str = string;
     if (string.indexOf('![]') < 0) {
-        // 未发现 ![] 字符串,尝试将 [] 替换为 ![]
-        temp_str = string.replace(/\[\]\(/g, '![](');
+        // // 未发现 ![] 字符串,尝试将 [] 替换为 ![]
+        // temp_str = string.replace(/\[\]\(/g, '![](');
     } else {
         // 已发现 ![] 字符串
     }

+ 0 - 0
src/components/refference-effect/temp-history.js → src/components/answer-effect/temp-history.js


+ 0 - 0
src/components/anwser-pictures/AnwserInfo.vue → src/components/answer-pictures/AnwserInfo.vue


+ 0 - 0
src/components/anwser-pictures/AnwserPictureLoading.vue → src/components/answer-pictures/AnwserPictureLoading.vue


+ 0 - 0
src/components/anwser-pictures/AnwserPictureResult.vue → src/components/answer-pictures/AnwserPictureResult.vue


+ 3 - 3
src/components/dialog-wrap/Answer.vue

@@ -5,10 +5,10 @@
 <script setup>
 import { ref, onBeforeUnmount, onMounted, reactive, nextTick, inject, computed } from "vue";
 
-import formatAnwserString from '../refference-effect/format-anwser-string';
+import formatAnwserString from '../answer-effect/format-anwser-string';
 
-import applyRefferencePopover from '../refference-effect/apply-refference-popover';
-import applyImageDisplay from '../refference-effect/apply-image-display';
+import applyRefferencePopover from '../answer-effect/apply-refference-popover';
+import applyImageDisplay from '../answer-effect/apply-image-display';
 
 const props = defineProps({
     /**