feat: Enhance document viewer with original file support and code block copying functionality
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
|
// @ts-nocheck
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { marked } from "marked";
|
import { marked } from "marked";
|
||||||
|
import hljs from "highlight.js";
|
||||||
|
import "highlight.js/styles/github.css";
|
||||||
import { onMounted, ref, nextTick, onUnmounted, onUpdated, watch } from "vue";
|
import { onMounted, ref, nextTick, onUnmounted, onUpdated, watch } from "vue";
|
||||||
import { downKnowledgeDetails, deleteGeneratedQuestion } from "@/api/knowledge-base/index";
|
import { downKnowledgeDetails, deleteGeneratedQuestion } from "@/api/knowledge-base/index";
|
||||||
import { MessagePlugin, DialogPlugin } from "tdesign-vue-next";
|
import { MessagePlugin, DialogPlugin } from "tdesign-vue-next";
|
||||||
@@ -18,17 +21,37 @@ let doc = null;
|
|||||||
let down = ref()
|
let down = ref()
|
||||||
let mdContentWrap = ref()
|
let mdContentWrap = ref()
|
||||||
let url = ref('')
|
let url = ref('')
|
||||||
|
// 视图模式:chunks / original
|
||||||
|
const viewMode = ref<'chunks' | 'original'>('chunks');
|
||||||
|
const originalContent = ref<string>('');
|
||||||
|
const loadingOriginal = ref(false);
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
doc = document.getElementsByClassName('t-drawer__body')[0]
|
doc = document.getElementsByClassName('t-drawer__body')[0]
|
||||||
doc.addEventListener('scroll', handleDetailsScroll);
|
doc.addEventListener('scroll', handleDetailsScroll);
|
||||||
})
|
})
|
||||||
|
// 提供全局复制方法,供代码块按钮使用
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
|
window.copyCodeBlock = (codeId: string) => {
|
||||||
|
const el = document.getElementById(codeId);
|
||||||
|
if (!el) return;
|
||||||
|
const text = el.innerText || '';
|
||||||
|
navigator.clipboard?.writeText(text).then(() => {
|
||||||
|
MessagePlugin.success(t('common.copySuccess') || '复制成功');
|
||||||
|
}).catch(() => {
|
||||||
|
MessagePlugin.error(t('common.copyFailed') || '复制失败');
|
||||||
|
});
|
||||||
|
};
|
||||||
})
|
})
|
||||||
onUpdated(() => {
|
onUpdated(() => {
|
||||||
page = 1
|
page = 1
|
||||||
})
|
})
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
doc.removeEventListener('scroll', handleDetailsScroll);
|
doc.removeEventListener('scroll', handleDetailsScroll);
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
|
delete window.copyCodeBlock;
|
||||||
})
|
})
|
||||||
const checkImage = (url) => {
|
const checkImage = (url) => {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
@@ -51,8 +74,79 @@ renderer.image = function (href, title, text) {
|
|||||||
<figcaption style="text-align: left;">${text || ''}</figcaption>
|
<figcaption style="text-align: left;">${text || ''}</figcaption>
|
||||||
</figure>`;
|
</figure>`;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 自定义代码块渲染器,添加语言标签与复制按钮
|
||||||
|
renderer.code = function (code, infostring) {
|
||||||
|
const lang = (infostring || '').trim();
|
||||||
|
let detectedLang = lang;
|
||||||
|
let highlighted = '';
|
||||||
|
if (lang && hljs.getLanguage(lang)) {
|
||||||
|
try {
|
||||||
|
highlighted = hljs.highlight(code, { language: lang }).value;
|
||||||
|
} catch (e) {
|
||||||
|
highlighted = hljs.highlightAuto(code).value;
|
||||||
|
detectedLang = hljs.highlightAuto(code).language || lang;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const auto = hljs.highlightAuto(code);
|
||||||
|
highlighted = auto.value;
|
||||||
|
detectedLang = auto.language || lang;
|
||||||
|
}
|
||||||
|
const displayLang = detectedLang || 'Code';
|
||||||
|
const codeId = `code-block-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
|
||||||
|
return `
|
||||||
|
<div class="code-block-wrapper" data-code-id="${codeId}">
|
||||||
|
<div class="code-block-header">
|
||||||
|
<span class="code-block-lang">${displayLang}</span>
|
||||||
|
<button class="code-block-copy-btn" onclick="window.copyCodeBlock && window.copyCodeBlock('${codeId}')" title="${t('common.copy') || '复制'}">
|
||||||
|
${t('common.copy') || '复制'}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<pre class="code-block-pre"><code class="hljs language-${detectedLang || ''}" id="${codeId}">${highlighted}</code></pre>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
};
|
||||||
const props = defineProps(["visible", "details", "knowledgeType", "sourceInfo"]);
|
const props = defineProps(["visible", "details", "knowledgeType", "sourceInfo"]);
|
||||||
const emit = defineEmits(["closeDoc", "getDoc", "questionDeleted"]);
|
const emit = defineEmits(["closeDoc", "getDoc", "questionDeleted"]);
|
||||||
|
const isTextFile = (fileType?: string): boolean => {
|
||||||
|
if (!fileType) return false;
|
||||||
|
const textTypes = ['txt', 'md', 'markdown', 'json', 'xml', 'html', 'css', 'js', 'ts', 'py', 'java', 'go', 'cpp', 'c', 'h', 'sh', 'yaml', 'yml', 'ini', 'conf', 'log'];
|
||||||
|
return textTypes.includes(fileType.toLowerCase());
|
||||||
|
};
|
||||||
|
const isMarkdownFile = (fileType?: string): boolean => {
|
||||||
|
if (!fileType) return false;
|
||||||
|
const markdownTypes = ['md', 'markdown'];
|
||||||
|
return markdownTypes.includes(fileType.toLowerCase());
|
||||||
|
};
|
||||||
|
const loadOriginalContent = async () => {
|
||||||
|
if (!props.details.id || !props.details.type || props.details.type !== 'file') return;
|
||||||
|
const fileType = props.details.file_type?.toLowerCase();
|
||||||
|
if (!isTextFile(fileType)) {
|
||||||
|
MessagePlugin.warning(t('knowledgeBase.originalFileNotSupported') || '该文件类型不支持原文件展示,请下载查看');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
loadingOriginal.value = true;
|
||||||
|
try {
|
||||||
|
const blob = await downKnowledgeDetails(props.details.id);
|
||||||
|
const text = await blob.text();
|
||||||
|
originalContent.value = text;
|
||||||
|
} catch (error: any) {
|
||||||
|
console.error('Failed to load original content:', error);
|
||||||
|
MessagePlugin.error(error?.message || t('knowledgeBase.loadOriginalFailed') || '加载原文件内容失败');
|
||||||
|
} finally {
|
||||||
|
loadingOriginal.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const toggleViewMode = () => {
|
||||||
|
if (viewMode.value === 'chunks') {
|
||||||
|
viewMode.value = 'original';
|
||||||
|
if (!originalContent.value && props.details.type === 'file') {
|
||||||
|
loadOriginalContent();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
viewMode.value = 'chunks';
|
||||||
|
}
|
||||||
|
};
|
||||||
watch(() => props.details.md, (newVal) => {
|
watch(() => props.details.md, (newVal) => {
|
||||||
nextTick(async () => {
|
nextTick(async () => {
|
||||||
const images = mdContentWrap.value.querySelectorAll('img.markdown-image');
|
const images = mdContentWrap.value.querySelectorAll('img.markdown-image');
|
||||||
@@ -65,40 +159,35 @@ watch(() => props.details.md, (newVal) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, {
|
}, { immediate: true, deep: true })
|
||||||
immediate: true,
|
|
||||||
deep: true
|
|
||||||
})
|
|
||||||
|
|
||||||
// 安全地处理 Markdown 内容
|
// 安全地处理 Markdown 内容(使用 marked)
|
||||||
const processMarkdown = (markdownText) => {
|
const processMarkdown = (markdownText) => {
|
||||||
if (!markdownText || typeof markdownText !== 'string') {
|
if (!markdownText || typeof markdownText !== 'string') return '';
|
||||||
return '';
|
|
||||||
}
|
// 处理被 <p> 包裹的表格行,转换为正常的表格行,并在前后补空行
|
||||||
|
let processedText = markdownText.replace(/<p>\s*(\|[\s\S]*?\|)\s*<\/p>/gi, '\n$1\n');
|
||||||
// 先将文本中的 <br> 标签(作为纯文本)转换为换行符
|
|
||||||
// 这样 marked.parse 会将其正确解析为段落分隔或换行
|
// 保留表格单元格中的 <br>,不转成换行,避免打散表格;其他区域原样交给 marked 处理
|
||||||
let processedText = markdownText.replace(/<br\s*\/?>/gi, '\n');
|
|
||||||
|
// 安全预处理
|
||||||
// 首先对 Markdown 内容进行安全处理
|
|
||||||
const safeMarkdown = safeMarkdownToHTML(processedText);
|
const safeMarkdown = safeMarkdownToHTML(processedText);
|
||||||
|
|
||||||
// 使用安全的渲染器
|
// 使用标记渲染
|
||||||
marked.use({ renderer });
|
marked.use({ renderer });
|
||||||
let html = marked.parse(safeMarkdown);
|
let html = marked.parse(safeMarkdown);
|
||||||
|
|
||||||
// 如果 marked.parse 转义了 <br> 标签,将其还原为实际的 <br> 标签
|
// 还原被转义的 <br>
|
||||||
// 这样可以确保原本的 <br> 标签被正确渲染为换行
|
|
||||||
html = html.replace(/<br\s*\/?>/gi, '<br>');
|
html = html.replace(/<br\s*\/?>/gi, '<br>');
|
||||||
|
|
||||||
// 使用 DOMPurify 进行最终的安全清理(br 标签在允许列表中)
|
// 最终安全清理
|
||||||
const sanitizedHTML = sanitizeHTML(html);
|
return sanitizeHTML(html);
|
||||||
|
|
||||||
return sanitizedHTML;
|
|
||||||
};
|
};
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
emit("closeDoc", false);
|
emit("closeDoc", false);
|
||||||
doc.scrollTop = 0;
|
doc.scrollTop = 0;
|
||||||
|
viewMode.value = 'chunks';
|
||||||
|
originalContent.value = '';
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取显示标题
|
// 获取显示标题
|
||||||
@@ -363,59 +452,90 @@ const handleDetailsScroll = () => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="content_header">
|
<div class="content_header">
|
||||||
<span class="label">{{ getContentLabel() }}</span>
|
<div class="header-left">
|
||||||
<span class="time"> {{ getTimeLabel() }}:{{ details.time }} </span>
|
<div class="title-row">
|
||||||
|
<span class="label">{{ getContentLabel() }}</span>
|
||||||
|
<span v-if="viewMode === 'chunks' && details.total > 0" class="chunk-count">
|
||||||
|
{{ $t('knowledgeBase.chunkCount', { count: details.total }) || `共 ${details.total} 个片段` }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="meta-row">
|
||||||
|
<span class="time"> {{ getTimeLabel() }}:{{ details.time }} </span>
|
||||||
|
<t-button
|
||||||
|
v-if="details.type === 'file'"
|
||||||
|
size="small"
|
||||||
|
variant="outline"
|
||||||
|
theme="primary"
|
||||||
|
@click="toggleViewMode"
|
||||||
|
:loading="loadingOriginal && viewMode === 'original'"
|
||||||
|
class="view-mode-toggle"
|
||||||
|
>
|
||||||
|
{{ viewMode === 'chunks'
|
||||||
|
? (t('knowledgeBase.viewOriginal') || '查看原文件')
|
||||||
|
: (t('knowledgeBase.viewChunks') || '查看分块') }}
|
||||||
|
</t-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="details.md.length == 0" class="no_content">{{ $t('common.noData') }}</div>
|
<!-- 原文件视图 -->
|
||||||
<div v-else class="chunk-list">
|
<div v-if="viewMode === 'original'">
|
||||||
<div class="chunk-item"
|
<div v-if="isMarkdownFile(details.file_type)" class="md-content original-md" v-html="processMarkdown(originalContent || '')"></div>
|
||||||
v-for="(item, index) in details.md"
|
<pre v-else class="original-text">{{ originalContent }}</pre>
|
||||||
:key="index"
|
</div>
|
||||||
:class="getChunkClass(index)"
|
|
||||||
>
|
<!-- 分块视图 -->
|
||||||
<div class="chunk-header">
|
<div v-else>
|
||||||
<span class="chunk-index">{{ $t('knowledgeBase.segment') || '片段' }} {{ index + 1 }}</span>
|
<div v-if="details.md.length == 0" class="no_content">{{ $t('common.noData') }}</div>
|
||||||
<div class="chunk-header-right">
|
<div v-else class="chunk-list">
|
||||||
<t-tag
|
<div class="chunk-item"
|
||||||
v-if="getGeneratedQuestions(item).length > 0"
|
v-for="(item, index) in details.md"
|
||||||
size="small"
|
:key="index"
|
||||||
theme="success"
|
:class="getChunkClass(index)"
|
||||||
variant="light"
|
>
|
||||||
>
|
<div class="chunk-header">
|
||||||
{{ $t('knowledgeBase.questions') || '问题' }} {{ getGeneratedQuestions(item).length }}
|
<span class="chunk-index">{{ $t('knowledgeBase.segment') || '片段' }} {{ index + 1 }}</span>
|
||||||
</t-tag>
|
<div class="chunk-header-right">
|
||||||
<span class="chunk-meta">{{ getChunkMeta(item) }}</span>
|
<t-tag
|
||||||
</div>
|
v-if="getGeneratedQuestions(item).length > 0"
|
||||||
</div>
|
size="small"
|
||||||
<div class="md-content" v-html="processMarkdown(item.content)"></div>
|
theme="success"
|
||||||
|
variant="light"
|
||||||
<!-- 生成的问题展示 -->
|
|
||||||
<div v-if="getGeneratedQuestions(item).length > 0" class="questions-section">
|
|
||||||
<div class="questions-toggle" @click="toggleQuestions(index)">
|
|
||||||
<t-icon :name="isExpanded(index) ? 'chevron-down' : 'chevron-right'" size="14px" />
|
|
||||||
<span>{{ $t('knowledgeBase.generatedQuestions') || '生成的问题' }} ({{ getGeneratedQuestions(item).length }})</span>
|
|
||||||
</div>
|
|
||||||
<div v-show="isExpanded(index)" class="questions-list">
|
|
||||||
<div
|
|
||||||
v-for="question in getGeneratedQuestions(item)"
|
|
||||||
:key="question.id"
|
|
||||||
class="question-item"
|
|
||||||
>
|
|
||||||
<t-icon name="help-circle" size="14px" class="question-icon" />
|
|
||||||
<span class="question-text">{{ question.question }}</span>
|
|
||||||
<t-button
|
|
||||||
theme="default"
|
|
||||||
variant="text"
|
|
||||||
size="small"
|
|
||||||
class="delete-question-btn"
|
|
||||||
:loading="isDeleting(index, question.id)"
|
|
||||||
@click.stop="handleDeleteQuestion(item, index, question)"
|
|
||||||
>
|
>
|
||||||
<template #icon>
|
{{ $t('knowledgeBase.questions') || '问题' }} {{ getGeneratedQuestions(item).length }}
|
||||||
<t-icon name="delete" size="14px" />
|
</t-tag>
|
||||||
</template>
|
<span class="chunk-meta">{{ getChunkMeta(item) }}</span>
|
||||||
</t-button>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="md-content" v-html="processMarkdown(item.content)"></div>
|
||||||
|
|
||||||
|
<!-- 生成的问题展示 -->
|
||||||
|
<div v-if="getGeneratedQuestions(item).length > 0" class="questions-section">
|
||||||
|
<div class="questions-toggle" @click="toggleQuestions(index)">
|
||||||
|
<t-icon :name="isExpanded(index) ? 'chevron-down' : 'chevron-right'" size="14px" />
|
||||||
|
<span>{{ $t('knowledgeBase.generatedQuestions') || '生成的问题' }} ({{ getGeneratedQuestions(item).length }})</span>
|
||||||
|
</div>
|
||||||
|
<div v-show="isExpanded(index)" class="questions-list">
|
||||||
|
<div
|
||||||
|
v-for="question in getGeneratedQuestions(item)"
|
||||||
|
:key="question.id"
|
||||||
|
class="question-item"
|
||||||
|
>
|
||||||
|
<t-icon name="help-circle" size="14px" class="question-icon" />
|
||||||
|
<span class="question-text">{{ question.question }}</span>
|
||||||
|
<t-button
|
||||||
|
theme="default"
|
||||||
|
variant="text"
|
||||||
|
size="small"
|
||||||
|
class="delete-question-btn"
|
||||||
|
:loading="isDeleting(index, question.id)"
|
||||||
|
@click.stop="handleDeleteQuestion(item, index, question)"
|
||||||
|
>
|
||||||
|
<template #icon>
|
||||||
|
<t-icon name="delete" size="14px" />
|
||||||
|
</template>
|
||||||
|
</t-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -436,6 +556,58 @@ const handleDetailsScroll = () => {
|
|||||||
width: 654px !important;
|
width: 654px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 代码块样式(带语言头与复制)
|
||||||
|
:deep(.code-block-wrapper) {
|
||||||
|
margin: 12px 0;
|
||||||
|
border: 1px solid #d1d5db;
|
||||||
|
border-radius: 6px;
|
||||||
|
background: #fff;
|
||||||
|
overflow: hidden;
|
||||||
|
box-shadow: 0 1px 2px rgba(0,0,0,0.05);
|
||||||
|
|
||||||
|
.code-block-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 8px 12px;
|
||||||
|
background: #f3f4f6;
|
||||||
|
border-bottom: 1px solid #e5e7eb;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #1f2937;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code-block-copy-btn {
|
||||||
|
padding: 4px 8px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
background: transparent;
|
||||||
|
color: #6b7280;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
font-size: 12px;
|
||||||
|
&:hover { background: #e5e7eb; color: #374151; }
|
||||||
|
&:active { background: #d1d5db; }
|
||||||
|
}
|
||||||
|
|
||||||
|
.code-block-pre {
|
||||||
|
margin: 0;
|
||||||
|
padding: 12px;
|
||||||
|
background: #f6f8fa;
|
||||||
|
overflow: auto;
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 1.5;
|
||||||
|
code {
|
||||||
|
background: transparent;
|
||||||
|
padding: 0;
|
||||||
|
border: none;
|
||||||
|
white-space: pre;
|
||||||
|
word-wrap: normal;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
:deep(.t-drawer__header) {
|
:deep(.t-drawer__header) {
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
}
|
}
|
||||||
@@ -566,8 +738,40 @@ const handleDetailsScroll = () => {
|
|||||||
margin-top: 22px;
|
margin-top: 22px;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: flex-start;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
gap: 12px;
|
||||||
|
|
||||||
|
.header-left {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.meta-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chunk-count {
|
||||||
|
color: #07c05f;
|
||||||
|
font-size: 12px;
|
||||||
|
background: #07c05f14;
|
||||||
|
padding: 4px 8px;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.view-mode-toggle {
|
||||||
|
height: 28px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.time {
|
.time {
|
||||||
|
|||||||
@@ -92,6 +92,11 @@ export default {
|
|||||||
createTime: 'Create Time',
|
createTime: 'Create Time',
|
||||||
characters: 'chars',
|
characters: 'chars',
|
||||||
segment: 'Segment',
|
segment: 'Segment',
|
||||||
|
chunkCount: 'Total {count} segments',
|
||||||
|
viewOriginal: 'View Original File',
|
||||||
|
viewChunks: 'View Chunks',
|
||||||
|
originalFileNotSupported: 'This file type does not support original file view. Please download to view.',
|
||||||
|
loadOriginalFailed: 'Failed to load original file content',
|
||||||
questions: 'Questions',
|
questions: 'Questions',
|
||||||
generatedQuestions: 'Generated Questions',
|
generatedQuestions: 'Generated Questions',
|
||||||
confirmDeleteQuestion: 'Are you sure you want to delete this question? The corresponding vector index will also be removed.',
|
confirmDeleteQuestion: 'Are you sure you want to delete this question? The corresponding vector index will also be removed.',
|
||||||
|
|||||||
@@ -92,6 +92,11 @@ export default {
|
|||||||
createTime: 'Время создания',
|
createTime: 'Время создания',
|
||||||
characters: 'символов',
|
characters: 'символов',
|
||||||
segment: 'Фрагмент',
|
segment: 'Фрагмент',
|
||||||
|
chunkCount: 'Всего {count} фрагментов',
|
||||||
|
viewOriginal: 'Просмотр исходного файла',
|
||||||
|
viewChunks: 'Просмотр фрагментов',
|
||||||
|
originalFileNotSupported: 'Этот тип файла не поддерживает просмотр исходного файла. Пожалуйста, загрузите для просмотра.',
|
||||||
|
loadOriginalFailed: 'Не удалось загрузить содержимое исходного файла',
|
||||||
questions: 'Вопросы',
|
questions: 'Вопросы',
|
||||||
generatedQuestions: 'Сгенерированные вопросы',
|
generatedQuestions: 'Сгенерированные вопросы',
|
||||||
confirmDeleteQuestion: 'Вы уверены, что хотите удалить этот вопрос? Соответствующий векторный индекс также будет удален.',
|
confirmDeleteQuestion: 'Вы уверены, что хотите удалить этот вопрос? Соответствующий векторный индекс также будет удален.',
|
||||||
|
|||||||
@@ -91,6 +91,11 @@ export default {
|
|||||||
createTime: "创建时间",
|
createTime: "创建时间",
|
||||||
characters: "字符",
|
characters: "字符",
|
||||||
segment: "片段",
|
segment: "片段",
|
||||||
|
chunkCount: "共 {count} 个片段",
|
||||||
|
viewOriginal: "查看原文件",
|
||||||
|
viewChunks: "查看分块",
|
||||||
|
originalFileNotSupported: "该文件类型不支持原文件展示,请下载查看",
|
||||||
|
loadOriginalFailed: "加载原文件内容失败",
|
||||||
questions: "问题",
|
questions: "问题",
|
||||||
generatedQuestions: "生成的问题",
|
generatedQuestions: "生成的问题",
|
||||||
confirmDeleteQuestion: "确定要删除这个问题吗?删除后将同时移除对应的向量索引。",
|
confirmDeleteQuestion: "确定要删除这个问题吗?删除后将同时移除对应的向量索引。",
|
||||||
|
|||||||
Reference in New Issue
Block a user