+
{{ item && item?.document_name }}
@@ -81,6 +81,7 @@
import { computed, ref, shallowRef } from 'vue'
import { cloneDeep } from 'lodash'
import ExecutionDetailContent from './ExecutionDetailContent.vue'
+import ParagraphDocumentContent from './ParagraphDocumentContent.vue'
import ParagraphSourceContent from './ParagraphSourceContent.vue'
import { arraySort } from '@/utils/array'
import { getImgUrl, getNormalizedUrl } from '@/utils/common'
@@ -100,7 +101,7 @@ const props = defineProps({
},
})
-const emit = defineEmits(['openExecutionDetail', 'openParagraph'])
+const emit = defineEmits(['openExecutionDetail', 'openParagraph','openParagraphDocument'])
const dialogVisible = ref(false)
const dialogTitle = ref('')
@@ -131,6 +132,17 @@ function openExecutionDetail(row: any) {
currentChatDetail.value = row
dialogVisible.value = true
}
+function openParagraphDocument(row: any) {
+ if (props.executionIsRightPanel) {
+ emit('openParagraphDocument',row)
+ return
+ }
+ currentComponent.value = ParagraphDocumentContent
+ dialogTitle.value = row.document_name
+ currentChatDetail.value = row
+ dialogVisible.value = true
+}
+
const uniqueParagraphList = computed(() => {
const seen = new Set()
return (
diff --git a/ui/src/components/ai-chat/index.vue b/ui/src/components/ai-chat/index.vue
index fed51ac83..f52f95b91 100644
--- a/ui/src/components/ai-chat/index.vue
+++ b/ui/src/components/ai-chat/index.vue
@@ -51,6 +51,7 @@
:executionIsRightPanel="props.executionIsRightPanel"
@open-execution-detail="emit('openExecutionDetail', chatList[index])"
@openParagraph="emit('openParagraph', chatList[index])"
+ @openParagraphDocument="(val: any)=>emit('openParagraphDocument', chatList[index], val)"
>
{
return common.isMobile() || mode === 'embed' || mode === 'mobile'
diff --git a/ui/src/views/chat/pc/index.vue b/ui/src/views/chat/pc/index.vue
index 42d2dee02..c138febc1 100644
--- a/ui/src/views/chat/pc/index.vue
+++ b/ui/src/views/chat/pc/index.vue
@@ -275,6 +275,7 @@
@scroll="handleScroll"
@open-execution-detail="openExecutionDetail"
@openParagraph="openKnowledgeSource"
+ @openParagraphDocument="openParagraphDocument"
>
@@ -299,6 +300,7 @@
:detail="executionDetail"
:type="applicationDetail?.type"
/>
+
@@ -330,6 +332,7 @@ import { t } from '@/locales'
import type { ResetCurrentUserPasswordRequest } from '@/api/type/user'
import ExecutionDetailContent from '@/components/ai-chat/component/knowledge-source-component/ExecutionDetailContent.vue'
import ParagraphSourceContent from '@/components/ai-chat/component/knowledge-source-component/ParagraphSourceContent.vue'
+import ParagraphDocumentContent from '@/components/ai-chat/component/knowledge-source-component/ParagraphDocumentContent.vue'
import { cloneDeep } from 'lodash'
useResize()
@@ -601,6 +604,12 @@ async function openKnowledgeSource(row: any) {
rightPanelSize.value = 400
}
+function openParagraphDocument(detail: any, row: any) {
+ rightPanelTitle.value = row.document_name
+ rightPanelType.value = 'paragraphDocument'
+ rightPanelSize.value = 400
+}
+
function closeExecutionDetail() {
rightPanelSize.value = 0
}