|
|
@@ -20,6 +20,16 @@
|
|
|
</DialogContent>
|
|
|
|
|
|
<BtnStopChat v-if="answer_status === 1" @stop="handleStopChat" />
|
|
|
+
|
|
|
+ <!-- 对话已经结束,并且有引用数据 -->
|
|
|
+ <template v-if="has_refference && answer_status === 2">
|
|
|
+ <RefferenceFileBlocks
|
|
|
+ class="refference-files-blocks-container"
|
|
|
+ :doc_aggs="full_refference.doc_aggs"
|
|
|
+ :chunks="full_refference.chunks"
|
|
|
+ :total="full_refference.total"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -49,6 +59,8 @@ import applyRefferencePopover4RefFlag from '../answer-refference/apply-refferenc
|
|
|
import applyRefferencePopover4FileName from '../answer-refference/apply-refference-popover-4-filename';
|
|
|
import { applyCodeHighLight } from '../conversation-dialog/format-code-string';
|
|
|
|
|
|
+import RefferenceFileBlocks from '../answer-refference/RefferenceFileBlocks.vue';
|
|
|
+
|
|
|
import copyText from '../../3rd-libs/clipboard';
|
|
|
|
|
|
const props = defineProps({
|
|
|
@@ -173,6 +185,34 @@ const anwser_klass = computed(() => {
|
|
|
return `klass-${answer.client_custom_unique_id}-answer-content`;
|
|
|
});
|
|
|
|
|
|
+/**
|
|
|
+ * 完整引用数据
|
|
|
+ */
|
|
|
+const full_refference = computed(() => {
|
|
|
+ if (!props.answer) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ const answer = props.answer;
|
|
|
+
|
|
|
+ if (!answer.client_custom_linked_refference_full_content) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ return answer.client_custom_linked_refference_full_content;
|
|
|
+});
|
|
|
+
|
|
|
+/**
|
|
|
+ * 是否显示引用效果
|
|
|
+ */
|
|
|
+const has_refference = computed(() => {
|
|
|
+ if (!full_refference.value) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ return true;
|
|
|
+});
|
|
|
+
|
|
|
const handleSelectChange = () => {
|
|
|
emit('select');
|
|
|
};
|
|
|
@@ -214,7 +254,7 @@ onMounted(() => {
|
|
|
* 文档引用效果
|
|
|
*/
|
|
|
applyRefferencePopover4RefFlag(container_klass, full_refference);
|
|
|
- applyRefferencePopover4FileName(container_klass, full_refference);
|
|
|
+ // applyRefferencePopover4FileName(container_klass, full_refference);
|
|
|
/**
|
|
|
* 处理代码样式: 美化代码的展示
|
|
|
*/
|
|
|
@@ -248,4 +288,8 @@ onMounted(() => {
|
|
|
.answer-actions-btns {
|
|
|
margin-top: 5px;
|
|
|
}
|
|
|
+
|
|
|
+.refference-files-blocks-container {
|
|
|
+ margin-top: 10px;
|
|
|
+}
|
|
|
</style>
|