Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.
Go agentagenticaichatbotdsh-pluginembeddingsevaluationgenerative-aigolangknowledge-basellmmulti-tenantollamaopenaiquestion-answeringragrerankingsemantic-searchvector-searchwiki
refactor(frontend): redesign upload confirmation dialog
wizardchenf0b76187217e
diff --git a/frontend/src/i18n/locales/en-US.ts b/frontend/src/i18n/locales/en-US.tsindex fc455170d..7e38807be 100755--- a/frontend/src/i18n/locales/en-US.ts+++ b/frontend/src/i18n/locales/en-US.ts@@ -769,7 +769,12 @@ export default {configNav: 'Parse settings navigation',tabOverview: 'Overview',overviewTitle: 'Parse settings for this batch',- overviewDesc: 'Click any row to edit',+ overviewDesc: 'Review the parsing settings below, then start the upload',+ basicSettings: 'Common settings',+ advancedSettings: 'Advanced capabilities',+ navParserDefault: 'Default',+ navParserCustomized: 'Customized',+ moreOptions: 'More processing options',backToOverview: 'Back to overview',summaryChunkOverlapShort: 'Overlap {overlap}',summaryParentChildShort: 'Parent-child',@@ -818,10 +823,11 @@ export default {urlAdded: 'URL added',urlDuplicate: 'This URL is already in the list',addUrl: 'Add',- vlmModelRequired: 'This batch includes images. Enable multimodal and select a VLM model.',- multimodalRequiredForImages: 'Off (batch includes images)',- asrModelRequired: 'This batch includes audio. Enable ASR and select a speech recognition model.',- asrRequiredForAudio: 'Off (batch includes audio)',+ statusNeedsSetup: 'Needs setup',+ multimodalSetupHint: 'Images detected. Enable multimodal and select a model.',+ asrSetupHint: 'Audio detected. Enable speech recognition and select a model.',+ vlmModelRequired: 'Configure a multimodal model',+ asrModelRequired: 'Configure a speech recognition model',vlmModelSelectRequired: 'Multimodal is enabled. Please select a VLM model.',asrModelSelectRequired: 'Speech recognition is enabled. Please select an ASR model.',pdfForceScanned: {diff --git a/frontend/src/i18n/locales/ko-KR.ts b/frontend/src/i18n/locales/ko-KR.tsindex 0ec7951d1..53cba3e30 100755--- a/frontend/src/i18n/locales/ko-KR.ts+++ b/frontend/src/i18n/locales/ko-KR.ts@@ -774,7 +774,12 @@ export default {configNav: "파싱 설정 탐색",tabOverview: "구성 개요",overviewTitle: "이번 배치 파싱 설정",- overviewDesc: "항목을 클릭하여 설정을 수정하세요",+ overviewDesc: "아래 파싱 설정을 확인한 뒤 업로드를 시작하세요",+ basicSettings: "기본 설정",+ advancedSettings: "고급 기능",+ navParserDefault: "기본",+ navParserCustomized: "사용자 지정",+ moreOptions: "추가 처리 옵션",backToOverview: "구성 개요로 돌아가기",summaryChunkOverlapShort: "겹침 {overlap}",summaryParentChildShort: "부모-자식 청킹",@@ -823,10 +828,11 @@ export default {urlAdded: "URL이 추가되었습니다",urlDuplicate: "이 URL은 이미 목록에 있습니다",addUrl: "추가",- vlmModelRequired: "이 배치에 이미지가 포함되어 있습니다. 멀티모달을 활성화하고 VLM 모델을 선택하세요",- multimodalRequiredForImages: "꺼짐(이 배치에 이미지 포함)",- asrModelRequired: "이 배치에 오디오가 포함되어 있습니다. ASR을 활성화하고 음성 인식 모델을 선택하세요",- asrRequiredForAudio: "꺼짐(이 배치에 오디오 포함)",+ statusNeedsSetup: "설정 필요",+ multimodalSetupHint: "이미지가 포함되어 있습니다. 멀티모달을 활성화하고 모델을 선택하세요",+ asrSetupHint: "오디오가 포함되어 있습니다. 음성 인식을 활성화하고 모델을 선택하세요",+ vlmModelRequired: "멀티모달 모델을 설정하세요",+ asrModelRequired: "음성 인식 모델을 설정하세요",vlmModelSelectRequired: "멀티모달이 활성화되었습니다. VLM 모델을 선택하세요",asrModelSelectRequired: "음성 인식이 활성화되었습니다. ASR 모델을 선택하세요",pdfForceScanned: {diff --git a/frontend/src/i18n/locales/ru-RU.ts b/frontend/src/i18n/locales/ru-RU.tsindex 492d13466..a94fbedfe 100755--- a/frontend/src/i18n/locales/ru-RU.ts+++ b/frontend/src/i18n/locales/ru-RU.ts@@ -738,7 +738,12 @@ export default {configNav: 'Навигация по настройкам разбора',tabOverview: 'Обзор',overviewTitle: 'Настройки разбора для этой партии',- overviewDesc: 'Нажмите на строку, чтобы изменить',+ overviewDesc: 'Проверьте настройки разбора ниже, затем начните загрузку',+ basicSettings: 'Основные настройки',+ advancedSettings: 'Дополнительные возможности',+ navParserDefault: 'По умолчанию',+ navParserCustomized: 'Настроено',+ moreOptions: 'Дополнительные параметры обработки',backToOverview: 'Вернуться к обзору',summaryChunkOverlapShort: 'Перекрытие {overlap}',summaryParentChildShort: 'Родительско-дочернее',@@ -787,10 +792,11 @@ export default {urlAdded: 'URL добавлен',urlDuplicate: 'Этот URL уже в списке',addUrl: 'Добавить',- vlmModelRequired: 'В партии есть изображения. Включите мультимодальность и выберите модель VLM.',- multimodalRequiredForImages: 'Выкл. (в партии есть изображения)',- asrModelRequired: 'В партии есть аудио. Включите ASR и выберите модель распознавания речи.',- asrRequiredForAudio: 'Выкл. (в партии есть аудио)',+ statusNeedsSetup: 'Нужна настройка',+ multimodalSetupHint: 'Обнаружены изображения. Включите мультимодальность и выберите модель.',+ asrSetupHint: 'Обнаружено аудио. Включите распознавание речи и выберите модель.',+ vlmModelRequired: 'Настройте мультимодальную модель',+ asrModelRequired: 'Настройте модель распознавания речи',vlmModelSelectRequired: 'Мультимодальность включена. Выберите модель VLM.',asrModelSelectRequired: 'Распознавание речи включено. Выберите модель ASR.',pdfForceScanned: {diff --git a/frontend/src/i18n/locales/zh-CN.ts b/frontend/src/i18n/locales/zh-CN.tsindex fdcd4c3e7..90bb7b9d2 100755--- a/frontend/src/i18n/locales/zh-CN.ts+++ b/frontend/src/i18n/locales/zh-CN.ts@@ -772,7 +772,12 @@ export default {configNav: "解析配置导航",tabOverview: "配置总览",overviewTitle: "本批次解析配置",- overviewDesc: "点击任一项可修改配置",+ overviewDesc: "确认解析配置后开始上传",+ basicSettings: "常用配置",+ advancedSettings: "高级能力",+ navParserDefault: "默认",+ navParserCustomized: "已自定义",+ moreOptions: "更多处理选项",backToOverview: "返回配置总览",summaryChunkOverlapShort: "重叠 {overlap}",summaryParentChildShort: "父子分块",@@ -821,10 +826,11 @@ export default {urlAdded: "已添加 URL",urlDuplicate: "该 URL 已在列表中",addUrl: "添加",- vlmModelRequired: "本批次包含图片,请启用多模态并选择 VLM 模型",- multimodalRequiredForImages: "未开启(本批次含图片)",- asrModelRequired: "本批次包含音频,请启用 ASR 并选择语音识别模型",- asrRequiredForAudio: "未开启(本批次含音频)",+ statusNeedsSetup: "待配置",+ multimodalSetupHint: "含图片内容,请启用多模态并选择模型",+ asrSetupHint: "含音频内容,请启用语音识别并选择模型",+ vlmModelRequired: "请配置多模态模型",+ asrModelRequired: "请配置语音识别模型",vlmModelSelectRequired: "已启用多模态,请选择 VLM 模型",asrModelSelectRequired: "已启用语音识别,请选择 ASR 模型",pdfForceScanned: {diff --git a/frontend/src/views/knowledge/components/UploadConfirmDialog.test.ts b/frontend/src/views/knowledge/components/UploadConfirmDialog.test.tsindex 2bda7c85e..5af8342ff 100644--- a/frontend/src/views/knowledge/components/UploadConfirmDialog.test.ts+++ b/frontend/src/views/knowledge/components/UploadConfirmDialog.test.ts@@ -30,3 +30,15 @@ test('routes global knowledge file drops through the upload confirmation flow',assert.match(knowledgeBase, /handleKnowledgeFileDrop/)assert.match(knowledgeBase, /handleUploadSourceFiles\(files\)/)})++test('uses section navigation with inline chunking controls and advanced options grouped', () => {+ assert.match(dialog, /v-model="uiState\.chunkingConfig\.strategy"/)+ assert.match(dialog, /v-model="uiState\.chunkingConfig\.chunkSize"/)+ assert.match(dialog, /v-model="uiState\.chunkingConfig\.chunkOverlap"/)+ assert.match(dialog, /chunkingMoreOpen/)+ assert.match(dialog, /activeSection === 'graph'/)+ assert.match(dialog, /class="files-panel"/)+ assert.match(dialog, /statusFull/)+ assert.match(dialog, /data-section="multimodal"/)+ assert.doesNotMatch(dialog, /<KBChunkingSettings/)+})diff --git a/frontend/src/views/knowledge/components/UploadConfirmDialog.vue b/frontend/src/views/knowledge/components/UploadConfirmDialog.vueindex 0befc47ab..ad22862b4 100644--- a/frontend/src/views/knowledge/components/UploadConfirmDialog.vue+++ b/frontend/src/views/knowledge/components/UploadConfirmDialog.vue@@ -2,7 +2,7 @@<Teleport to="body"><Transition name="modal"><div v-if="dialogVisible" class="upload-confirm-overlay">- <div class="upload-confirm-modal" role="dialog" :aria-label="t('uploadConfirm.title')">+ <div class="upload-confirm-modal" role="dialog" :aria-label="dialogTitle"><button class="close-btn" type="button" :aria-label="t('general.close')" @click="handleCancel"><svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path d="M15 5L5 15M5 5L15 15" stroke="currentColor" stroke-width="2" stroke-linecap="round" />@@ -11,294 +11,479 @@<div class="upload-confirm-container"><aside class="files-panel">- <div class="files-panel-header">- <h2 class="files-panel-title">{{ sourcePanelTitle }}</h2>- <div v-if="mode === 'file'" class="files-panel-actions">- <span class="files-count">{{ batchItemCount }}</span>- <KbUploadSourceDropdown- :accept-file-types="acceptFileTypes"- :supported-file-types="supportedFileTypes"- :tooltip="t('uploadConfirm.continueAdd')"- placement="bottom-left"- @files="appendFiles"- @url="appendUrl"- />+ <div class="sidebar-header">+ <div class="sidebar-header-row">+ <h2 class="sidebar-title">{{ dialogTitle }}</h2>+ <div v-if="mode === 'file'" class="sidebar-header-actions">+ <span class="files-count">{{ batchItemCount }}</span>+ <KbUploadSourceDropdown+ :accept-file-types="acceptFileTypes"+ :supported-file-types="supportedFileTypes"+ :tooltip="t('uploadConfirm.continueAdd')"+ placement="bottom-left"+ @files="appendFiles"+ @url="appendUrl"+ />+ </div></div></div>- <div v-if="mode === 'manual' && manualPreview" class="manual-source-panel">- <p class="manual-source-title" :title="manualPreview.title">{{ manualPreview.title }}</p>- <p class="manual-source-meta">- {{ t('uploadConfirm.manualCharCount', { count: manualCharCount }) }}- </p>- </div>- <div v-else-if="mode === 'reparse' && reparsePreview" class="manual-source-panel">- <p class="manual-source-title" :title="reparsePreview.fileName">- {{ reparsePreview.fileName || t('uploadConfirm.reparseSource') }}- </p>- <p class="manual-source-meta">{{ t('uploadConfirm.reparseHint') }}</p>- </div>- <ul v-else-if="mode === 'file' && batchItemCount > 0" class="files-list">- <li v-for="(url, index) in localUrls" :key="`url-${url}-${index}`" class="file-item">- <t-icon name="link" class="file-icon" />- <div class="file-meta">- <span class="file-name" :title="url">{{ url }}</span>- <span class="file-size">{{ t('uploadConfirm.urlItemLabel') }}</span>- </div>- <t-button- theme="default"- variant="text"- size="small"- shape="square"- :aria-label="t('common.remove')"- @click="removeUrl(index)"- >- <t-icon name="close" />- </t-button>- </li>- <li v-for="(file, index) in localFiles" :key="`${file.name}-${index}`" class="file-item">- <t-icon :name="getFileIcon(file.name)" class="file-icon" />- <div class="file-meta">- <span class="file-name" :title="file.name">{{ file.name }}</span>- <span class="file-size">{{ formatFileSize(file.size) }}</span>- </div>- <t-button- theme="default"- variant="text"- size="small"- shape="square"- :aria-label="t('common.remove')"- @click="removeFile(index)"- >- <t-icon name="close" />- </t-button>- </li>- </ul>- <div v-else-if="mode === 'file'" class="files-empty">{{ t('uploadConfirm.noItems') }}</div>- </aside>- <main class="main-panel">- <header class="main-header">- <template v-if="activeSection === 'overview'">- <h2 class="main-title">{{ dialogTitle }}</h2>- <p class="main-desc">{{ dialogDesc }}</p>- </template>- <template v-else>- <button- type="button"- class="back-link"- @click="activeSection = 'overview'"- >- <t-icon name="chevron-left" />- <span>{{ t('uploadConfirm.backToOverview') }}</span>- </button>- <h2 class="edit-title">{{ currentSectionTitle }}</h2>- <p v-if="currentSectionDesc" class="edit-desc">{{ currentSectionDesc }}</p>- </template>- </header>-- <div class="main-body">- <div v-if="activeSection === 'overview'" class="overview-list">+ <div class="files-list-wrap">+ <div v-if="mode === 'manual' && manualPreview" class="manual-source-panel">+ <p class="manual-source-title" :title="manualPreview.title">{{ manualPreview.title }}</p>+ <p class="manual-source-meta">+ {{ t('uploadConfirm.manualCharCount', { count: manualCharCount }) }}+ </p>+ </div>+ <div v-else-if="mode === 'reparse' && reparsePreview" class="manual-source-panel">+ <p class="manual-source-title" :title="reparsePreview.fileName">+ {{ reparsePreview.fileName || t('uploadConfirm.reparseSource') }}+ </p>+ <p class="manual-source-meta">{{ t('uploadConfirm.reparseHint') }}</p>+ </div>+ <ul v-else-if="mode === 'file' && batchItemCount > 0" class="files-list">+ <li v-for="(url, index) in localUrls" :key="`url-${url}-${index}`" class="file-item">+ <span class="file-icon-wrap">+ <t-icon name="link" class="file-icon" />+ </span>+ <div class="file-meta">+ <span class="file-name" :title="url">{{ url }}</span>+ <span class="file-size">{{ t('uploadConfirm.urlItemLabel') }}</span>+ </div><button- v-for="line in overviewLines"- :key="line.key"type="button"- class="overview-row"- :class="{ 'overview-row--issue': issueSectionKeys.has(line.key) }"- @click="goToSection(line.key)"+ class="file-remove"+ :aria-label="t('common.remove')"+ @click="removeUrl(index)">- <span class="overview-label">{{ line.title }}</span>- <span- class="overview-value"- :class="{ 'overview-value--issue': issueSectionKeys.has(line.key) }"- :title="line.value"- >{{ line.value }}</span>- <t-icon name="chevron-right" class="overview-chevron" />+ <t-icon name="close" /></button>- </div>+ </li>+ <li v-for="(file, index) in localFiles" :key="`${file.name}-${index}`" class="file-item">+ <span class="file-icon-wrap">+ <t-icon :name="getFileIcon(file.name)" class="file-icon" />+ </span>+ <div class="file-meta">+ <span class="file-name" :title="file.name">{{ file.name }}</span>+ <span class="file-size">{{ formatFileSize(file.size) }}</span>+ </div>+ <button+ type="button"+ class="file-remove"+ :aria-label="t('common.remove')"+ @click="removeFile(index)"+ >+ <t-icon name="close" />+ </button>+ </li>+ </ul>+ <div v-else-if="mode === 'file'" class="files-empty">{{ t('uploadConfirm.noItems') }}</div>+ </div>+ </aside>++ <aside class="settings-sidebar">+ <div class="settings-sidebar-header">+ <h2 class="settings-sidebar-title">{{ t('uploadConfirm.parseConfig') }}</h2>+ </div>+ <nav class="settings-nav" :aria-label="t('uploadConfirm.configNav')">+ <button+ v-for="item in navItems"+ :key="item.key"+ type="button"+ class="nav-item"+ :class="{+ active: activeSection === item.key,+ 'nav-item--issue': item.issue,+ }"+ @click="activeSection = item.key"+ >+ <t-icon :name="item.icon" class="nav-icon" />+ <span class="nav-label-wrap">+ <span class="nav-label">{{ item.label }}</span>+ <span+ class="nav-status"+ :class="{+ 'nav-status--warning': item.statusTone === 'warning',+ 'nav-status--error': item.statusTone === 'error',+ 'nav-status--muted': item.statusTone === 'muted',+ }"+ :title="item.statusFull"+ >{{ item.status }}</span>+ </span>+ <span v-if="item.issue" class="nav-dot" aria-hidden="true" />+ </button>+ </nav>+ </aside>++ <div class="config-panel">+ <div class="content-wrapper upload-confirm-content">+ <div v-show="activeSection === 'tags'" class="section">+ <div class="section-content">+ <div class="section-header">+ <h2 class="section-title">{{ t('uploadConfirm.tabTags') }}</h2>+ <p class="section-desc">{{ t('uploadConfirm.tagsDescription') }}</p>+ </div>+ <div class="settings-group">+ <div class="setting-row setting-row-vertical">+ <div class="setting-info">+ <label>{{ t('uploadConfirm.tagsPlaceholder') }}</label>+ </div>+ <div class="setting-control setting-control-full">+ <t-select+ v-model="selectedTagIds"+ :options="tagOptions"+ :loading="tagsLoading"+ multiple+ filterable+ clearable+ :placeholder="t('uploadConfirm.tagsPlaceholder')"+ />+ <p v-if="tagsLoadFailed" class="field-hint field-hint--error">+ {{ t('uploadConfirm.tagsLoadFailed') }}+ </p>+ <p v-else-if="!tagsLoading && tagOptions.length === 0" class="field-hint">+ {{ t('uploadConfirm.tagsEmpty') }}+ </p>+ </div>+ </div>+ </div>+ </div>+ </div>- <div v-else class="edit-section edit-section--embedded"><div v-show="activeSection === 'parser'" class="section"><KBParserSettings- embedded:relevant-extensions="batchFileExts":parser-engine-rules="uiState.chunkingConfig.parserEngineRules"@update:parser-engine-rules="handleParserEngineRulesUpdate"/>- <div v-if="hasPdf" class="kb-embedded-settings" style="margin-top: 16px;">- <div class="setting-row setting-row--toggle">- <div class="setting-info">- <label>{{ t('uploadConfirm.pdfForceScanned.label') }}</label>- <p class="desc">{{ t('uploadConfirm.pdfForceScanned.description') }}</p>- </div>- <div class="setting-control">- <t-switch v-model="uiState.pdfForceScanned" size="medium" />- </div>- </div>- </div>- </div>- <div v-show="activeSection === 'tags'" class="section">- <div class="kb-embedded-settings">- <div class="setting-row setting-row--field setting-row--tags">- <div class="setting-info">- <label>{{ t('uploadConfirm.tabTags') }}</label>- <p class="desc">{{ t('uploadConfirm.tagsDescription') }}</p>- </div>- <div class="setting-control setting-control--full">- <t-select- v-model="selectedTagIds"- :options="tagOptions"- :loading="tagsLoading"- multiple- filterable- clearable- :placeholder="t('uploadConfirm.tagsPlaceholder')"- />- <p v-if="tagsLoadFailed" class="field-error field-error--muted">- {{ t('uploadConfirm.tagsLoadFailed') }}- </p>- <p v-else-if="!tagsLoading && tagOptions.length === 0" class="field-hint">- {{ t('uploadConfirm.tagsEmpty') }}- </p>+ <div v-if="hasPdf" class="kb-settings-block">+ <div class="settings-group">+ <div class="setting-row">+ <div class="setting-info">+ <label>{{ t('uploadConfirm.pdfForceScanned.label') }}</label>+ <p class="desc">{{ t('uploadConfirm.pdfForceScanned.description') }}</p>+ </div>+ <div class="setting-control">+ <t-switch v-model="uiState.pdfForceScanned" size="medium" />+ </div></div></div></div></div>+<div v-show="activeSection === 'chunking'" class="section">- <KBChunkingSettings- embedded- :config="uiState.chunkingConfig"- @update:config="handleChunkingConfigUpdate"- />- </div>- <div v-show="activeSection === 'multimodal'" class="section">- <div class="kb-embedded-settings">- <div class="setting-row setting-row--toggle">- <div class="setting-info">- <label>{{ t('knowledgeEditor.advanced.multimodal.label') }}</label>- <p class="desc">{{ t('knowledgeEditor.advanced.multimodal.description') }}</p>+ <div class="section-content">+ <div class="section-header">+ <h2 class="section-title">{{ t('knowledgeEditor.chunking.title') }}</h2>+ <p class="section-desc">{{ t('knowledgeEditor.chunking.description') }}</p>+ </div>+ <div class="settings-group">+ <div class="setting-row">+ <div class="setting-info">+ <label>{{ t('knowledgeEditor.chunking.strategyLabel') }}</label>+ <p class="desc">{{ t('knowledgeEditor.chunking.strategyDescription') }}</p>+ </div>+ <div class="setting-control">+ <t-select+ v-model="uiState.chunkingConfig.strategy"+ :options="chunkingStrategyOptions"+ :clearable="false"+ :style="{ width: '280px' }"+ />+ </div>+ </div>+ <div class="setting-row">+ <div class="setting-info">+ <label>{{ t('knowledgeEditor.chunking.sizeLabel') }}</label>+ <p class="desc">{{ t('knowledgeEditor.chunking.sizeDescription') }}</p>+ </div>+ <div class="setting-control">+ <t-input-number+ v-model="uiState.chunkingConfig.chunkSize"+ :min="100"+ :max="4000"+ :step="50"+ theme="normal"+ :style="{ width: '200px' }"+ />+ </div></div>- <div class="setting-control">- <t-switch v-model="uiState.multimodalConfig.enabled" size="medium" />+ <div class="setting-row">+ <div class="setting-info">+ <label>{{ t('knowledgeEditor.chunking.overlapLabel') }}</label>+ <p class="desc">{{ t('knowledgeEditor.chunking.overlapDescription') }}</p>+ </div>+ <div class="setting-control">+ <t-input-number+ v-model="uiState.chunkingConfig.chunkOverlap"+ :min="0"+ :max="500"+ :step="20"+ theme="normal"+ :style="{ width: '200px' }"+ />+ </div></div></div>- <div v-if="uiState.multimodalConfig.enabled" class="setting-row setting-row--field">- <div class="setting-info">- <label>- {{ t('knowledgeEditor.advanced.multimodal.vllmLabel') }}- <span class="required">*</span>- </label>++ <button+ type="button"+ class="more-options-toggle"+ :aria-expanded="chunkingMoreOpen"+ @click="chunkingMoreOpen = !chunkingMoreOpen"+ >+ <t-icon name="chevron-down" :class="{ 'is-open': chunkingMoreOpen }" />+ <span>{{ t('uploadConfirm.moreOptions') }}</span>+ </button>++ <div v-if="chunkingMoreOpen" class="settings-group settings-group--more">+ <div class="setting-row setting-row--separators">+ <div class="setting-info">+ <label>{{ t('knowledgeEditor.chunking.separatorsLabel') }}</label>+ <p class="desc">{{ t('knowledgeEditor.chunking.separatorsDescription') }}</p>+ </div>+ <div class="setting-control">+ <t-select+ v-model="uiState.chunkingConfig.separators"+ :options="separatorOptions"+ multiple+ creatable+ filterable+ :style="{ width: '280px' }"+ />+ </div></div>- <div class="setting-control setting-control--full">- <ModelSelector- model-type="VLLM"- :selected-model-id="uiState.multimodalConfig.vllmModelId"- :all-models="allModels"- :status="showMultimodalModelError ? 'error' : 'default'"- :placeholder="t('knowledgeEditor.advanced.multimodal.vllmPlaceholder')"- @update:selected-model-id="handleMultimodalVLLMChange"- @add-model="handleAddVLLMModel"- />- <p v-if="showMultimodalModelError" class="field-error">- {{ t('uploadConfirm.vlmModelSelectRequired') }}- </p>+ <div class="setting-row">+ <div class="setting-info">+ <label>{{ t('knowledgeEditor.chunking.tokenLimitLabel') }}</label>+ </div>+ <div class="setting-control">+ <t-input-number+ v-model="uiState.chunkingConfig.tokenLimit"+ :min="0"+ :max="8192"+ :step="64"+ theme="normal"+ :style="{ width: '200px' }"+ />+ </div></div>- </div>- <div v-if="uiState.multimodalConfig.enabled" class="setting-row setting-row--field">- <div class="setting-info">- <label>{{ t('knowledgeEditor.advanced.multimodal.descriptionLanguageLabel') }}</label>- <p class="desc">{{ t('knowledgeEditor.advanced.multimodal.descriptionLanguageDescription') }}</p>+ <div class="setting-row">+ <div class="setting-info">+ <label>{{ t('knowledgeEditor.chunking.languagesLabel') }}</label>+ </div>+ <div class="setting-control">+ <t-select+ v-model="uiState.chunkingConfig.languages"+ :options="languageOptions"+ multiple+ :style="{ width: '280px' }"+ />+ </div></div>- <div class="setting-control setting-control--full">- <t-select- v-model="uiState.multimodalConfig.descriptionLanguage"- clearable- :placeholder="t('knowledgeEditor.advanced.multimodal.descriptionLanguageAuto')"- >- <t-option value="Chinese" :label="t('language.zhCN')" />- <t-option value="English" :label="t('language.enUS')" />- <t-option value="Korean" :label="t('language.koKR')" />- <t-option value="Russian" :label="t('language.ruRU')" />- </t-select>+ <div class="setting-row">+ <div class="setting-info">+ <label>{{ t('knowledgeEditor.chunking.parentChildLabel') }}</label>+ <p class="desc">{{ t('knowledgeEditor.chunking.parentChildDescription') }}</p>+ </div>+ <div class="setting-control">+ <t-switch v-model="uiState.chunkingConfig.enableParentChild" />+ </div></div>- </div>- <div v-if="uiState.multimodalConfig.enabled" class="setting-row setting-row--field">- <div class="setting-info">- <label>{{ t('knowledgeEditor.advanced.multimodal.customInstructionsLabel') }}</label>- <p class="desc">{{ t('knowledgeEditor.advanced.multimodal.customInstructionsDescription') }}</p>+ <div v-if="uiState.chunkingConfig.enableParentChild" class="setting-row">+ <div class="setting-info">+ <label>{{ t('knowledgeEditor.chunking.parentChunkSizeLabel') }}</label>+ </div>+ <div class="setting-control">+ <t-input-number v-model="uiState.chunkingConfig.parentChunkSize" :min="512" :max="8192" :step="64" theme="normal" :style="{ width: '200px' }" />+ </div></div>- <div class="setting-control setting-control--full">- <t-textarea- v-model="uiState.multimodalConfig.customInstructions"- :placeholder="t('knowledgeEditor.advanced.multimodal.customInstructionsPlaceholder')"- :maxlength="4000"- :autosize="{ minRows: 3, maxRows: 8 }"- />+ <div v-if="uiState.chunkingConfig.enableParentChild" class="setting-row">+ <div class="setting-info">+ <label>{{ t('knowledgeEditor.chunking.childChunkSizeLabel') }}</label>+ </div>+ <div class="setting-control">+ <t-input-number v-model="uiState.chunkingConfig.childChunkSize" :min="64" :max="2048" :step="32" theme="normal" :style="{ width: '200px' }" />+ </div></div></div></div></div>- <div v-show="activeSection === 'asr'" class="section">- <div class="kb-embedded-settings">- <div class="setting-row setting-row--toggle">- <div class="setting-info">- <label>{{ t('knowledgeEditor.asr.label') }}</label>- <p class="desc">{{ t('knowledgeEditor.asr.desc') }}</p>++ <div v-show="activeSection === 'multimodal'" class="section" data-section="multimodal">+ <div class="kb-settings-block">+ <div class="section-header">+ <h2 class="section-title">{{ t('knowledgeEditor.multimodal.title') }}</h2>+ <p class="section-desc">{{ t('knowledgeEditor.multimodal.description') }}</p>+ </div>+ <div v-if="issueSectionKeys.has('multimodal')" class="section-notice">+ <t-icon name="info-circle-filled" />+ <span>{{ t('uploadConfirm.multimodalSetupHint') }}</span>+ </div>+ <div class="settings-group">+ <div class="setting-row">+ <div class="setting-info">+ <label>{{ t('knowledgeEditor.advanced.multimodal.label') }}</label>+ <p class="desc">{{ t('knowledgeEditor.advanced.multimodal.description') }}</p>+ </div>+ <div class="setting-control">+ <t-switch v-model="uiState.multimodalConfig.enabled" size="medium" />+ </div></div>- <div class="setting-control">- <t-switch v-model="uiState.asrConfig.enabled" size="medium" />+ <div v-if="uiState.multimodalConfig.enabled" class="setting-row">+ <div class="setting-info">+ <label>{{ t('knowledgeEditor.advanced.multimodal.vllmLabel') }} <span class="required">*</span></label>+ <p class="desc">{{ t('knowledgeEditor.advanced.multimodal.vllmDescription') }}</p>+ </div>+ <div class="setting-control">+ <ModelSelector+ model-type="VLLM"+ :selected-model-id="uiState.multimodalConfig.vllmModelId"+ :all-models="allModels"+ :status="showMultimodalModelError ? 'error' : 'default'"+ :placeholder="t('knowledgeEditor.advanced.multimodal.vllmPlaceholder')"+ @update:selected-model-id="handleMultimodalVLLMChange"+ @add-model="handleAddVLLMModel"+ />+ </div></div>- </div>- <div v-if="uiState.asrConfig.enabled" class="setting-row setting-row--field">- <div class="setting-info">- <label>- {{ t('knowledgeEditor.asr.modelLabel') }}- <span class="required">*</span>- </label>+ <div v-if="uiState.multimodalConfig.enabled" class="setting-row">+ <div class="setting-info">+ <label>{{ t('knowledgeEditor.advanced.multimodal.descriptionLanguageLabel') }}</label>+ <p class="desc">{{ t('knowledgeEditor.advanced.multimodal.descriptionLanguageDescription') }}</p>+ </div>+ <div class="setting-control">+ <t-select+ v-model="uiState.multimodalConfig.descriptionLanguage"+ clearable+ :placeholder="t('knowledgeEditor.advanced.multimodal.descriptionLanguageAuto')"+ :style="{ width: '280px' }"+ >+ <t-option value="Chinese" :label="t('language.zhCN')" />+ <t-option value="English" :label="t('language.enUS')" />+ <t-option value="Korean" :label="t('language.koKR')" />+ <t-option value="Russian" :label="t('language.ruRU')" />+ </t-select>+ </div></div>- <div class="setting-control setting-control--full">- <ModelSelector- model-type="ASR"- :selected-model-id="uiState.asrConfig.modelId"- :all-models="allModels"- :status="showAsrModelError ? 'error' : 'default'"- :placeholder="t('knowledgeEditor.asr.modelPlaceholder')"- @update:selected-model-id="(val: string) => { uiState.asrConfig.modelId = val }"- @add-model="handleAddASRModel"- />- <p v-if="showAsrModelError" class="field-error">- {{ t('uploadConfirm.asrModelSelectRequired') }}- </p>+ <div v-if="uiState.multimodalConfig.enabled" class="setting-row setting-row-vertical">+ <div class="setting-info">+ <label>{{ t('knowledgeEditor.advanced.multimodal.customInstructionsLabel') }}</label>+ <p class="desc">{{ t('knowledgeEditor.advanced.multimodal.customInstructionsDescription') }}</p>+ </div>+ <div class="setting-control setting-control-full">+ <t-textarea+ v-model="uiState.multimodalConfig.customInstructions"+ :placeholder="t('knowledgeEditor.advanced.multimodal.customInstructionsPlaceholder')"+ :maxlength="4000"+ :autosize="{ minRows: 3, maxRows: 8 }"+ />+ </div></div></div>- <div v-if="uiState.asrConfig.enabled" class="setting-row setting-row--field">- <div class="setting-info">- <label>{{ t('knowledgeEditor.asr.languageLabel') }}</label>- <p class="desc">{{ t('knowledgeEditor.asr.languageDescription') }}</p>+ </div>+ </div>++ <div v-show="activeSection === 'asr'" class="section" data-section="asr">+ <div class="kb-settings-block">+ <div class="section-header">+ <h2 class="section-title">{{ t('knowledgeEditor.asr.title') }}</h2>+ <p class="section-desc">{{ t('knowledgeEditor.asr.description') }}</p>+ </div>+ <div v-if="issueSectionKeys.has('asr')" class="section-notice">+ <t-icon name="info-circle-filled" />+ <span>{{ t('uploadConfirm.asrSetupHint') }}</span>+ </div>+ <div class="settings-group">+ <div class="setting-row">+ <div class="setting-info">+ <label>{{ t('knowledgeEditor.asr.label') }}</label>+ <p class="desc">{{ t('knowledgeEditor.asr.desc') }}</p>+ </div>+ <div class="setting-control">+ <t-switch v-model="uiState.asrConfig.enabled" size="medium" />+ </div>+ </div>+ <div v-if="uiState.asrConfig.enabled" class="setting-row">+ <div class="setting-info">+ <label>{{ t('knowledgeEditor.asr.modelLabel') }} <span class="required">*</span></label>+ <p class="desc">{{ t('knowledgeEditor.asr.modelDescription') }}</p>+ </div>+ <div class="setting-control">+ <ModelSelector+ model-type="ASR"+ :selected-model-id="uiState.asrConfig.modelId"+ :all-models="allModels"+ :status="showAsrModelError ? 'error' : 'default'"+ :placeholder="t('knowledgeEditor.asr.modelPlaceholder')"+ @update:selected-model-id="(val: string) => { uiState.asrConfig.modelId = val }"+ @add-model="handleAddASRModel"+ />+ </div></div>- <div class="setting-control setting-control--full">- <t-input- v-model="uiState.asrConfig.language"- clearable- :placeholder="t('knowledgeEditor.asr.languagePlaceholder')"- />+ <div v-if="uiState.asrConfig.enabled" class="setting-row">+ <div class="setting-info">+ <label>{{ t('knowledgeEditor.asr.languageLabel') }}</label>+ <p class="desc">{{ t('knowledgeEditor.asr.languageDescription') }}</p>+ </div>+ <div class="setting-control">+ <t-input+ v-model="uiState.asrConfig.language"+ clearable+ :placeholder="t('knowledgeEditor.asr.languagePlaceholder')"+ :style="{ width: '280px' }"+ />+ </div></div></div></div></div>+<div v-show="activeSection === 'question'" class="section">- <KBAdvancedSettings- embedded- :question-generation="uiState.questionGenerationConfig"- :rag-enabled="ragEnabled"- :all-models="allModels"- :table-metadata-instructions="uiState.chunkingConfig.tableMetadataInstructions"- @update:question-generation="handleQuestionGenerationUpdate"- @update:table-metadata-instructions="handleTableMetadataInstructionsUpdate"- />+ <div class="kb-settings-block">+ <div class="section-header">+ <h2 class="section-title">{{ t('knowledgeEditor.advanced.questionGeneration.label') }}</h2>+ <p class="section-desc">{{ t('knowledgeEditor.advanced.questionGeneration.description') }}</p>+ </div>+ <div class="settings-group">+ <div class="setting-row">+ <div class="setting-info">+ <label>{{ t('knowledgeEditor.advanced.questionGeneration.label') }}</label>+ <p class="desc">{{ t('knowledgeEditor.advanced.questionGeneration.countDescription') }}</p>+ </div>+ <div class="setting-control setting-control-inline">+ <t-input-number+ v-if="uiState.questionGenerationConfig.enabled"+ v-model="uiState.questionGenerationConfig.questionCount"+ :min="1"+ :max="10"+ :step="1"+ theme="normal"+ :style="{ width: '88px' }"+ />+ <t-switch v-model="uiState.questionGenerationConfig.enabled" size="medium" />+ </div>+ </div>+ <div v-if="uiState.questionGenerationConfig.enabled" class="setting-row setting-row-vertical">+ <div class="setting-info">+ <label>{{ t('knowledgeEditor.advanced.questionGeneration.instructionsLabel') }}</label>+ <p class="desc">{{ t('knowledgeEditor.advanced.questionGeneration.instructionsDescription') }}</p>+ </div>+ <div class="setting-control setting-control-full">+ <t-textarea+ v-model="uiState.questionGenerationConfig.customInstructions"+ :placeholder="t('knowledgeEditor.advanced.questionGeneration.instructionsPlaceholder')"+ :maxlength="4000"+ :autosize="{ minRows: 3, maxRows: 8 }"+ />+ </div>+ </div>+ </div>+ </div></div>- <div v-show="activeSection === 'graph'" class="section">++ <div v-if="isGraphSectionAvailable" v-show="activeSection === 'graph'" class="section"><GraphSettings- embedded:graph-extract="uiState.nodeExtractConfig":model-id="llmModelId":all-models="allModels"@@ -306,18 +491,17 @@/></div></div>- </div>- </main>- </div>- <footer class="modal-footer">- <t-button theme="default" variant="outline" @click="handleCancel">- {{ t('uploadConfirm.cancel') }}- </t-button>- <t-button theme="primary" :disabled="!canConfirm" @click="handleConfirm">- {{ confirmButtonText }}- </t-button>- </footer>+ <footer class="modal-footer">+ <t-button theme="default" variant="outline" @click="handleCancel">+ {{ t('uploadConfirm.cancel') }}+ </t-button>+ <t-button theme="primary" :disabled="!canConfirm" @click="handleConfirm">+ {{ confirmButtonText }}+ </t-button>+ </footer>+ </div>+ </div></div></div></Transition>@@ -325,15 +509,14 @@</template><script setup lang="ts">-import { ref, computed, watch } from 'vue'+import { ref, computed, watch, nextTick } from 'vue'import { useI18n } from 'vue-i18n'import { MessagePlugin } from 'tdesign-vue-next'import ModelSelector from '@/components/ModelSelector.vue'import KBParserSettings from '../settings/KBParserSettings.vue'-import KBChunkingSettings from '../settings/KBChunkingSettings.vue'-import KBAdvancedSettings from '../settings/KBAdvancedSettings.vue'import GraphSettings from '../settings/GraphSettings.vue'import { useChatResourcesStore } from '@/stores/chatResources'+import { useEditorResourcesStore } from '@/stores/editorResources'import { useUIStore } from '@/stores/ui'import { formatFileSize, getFileIcon } from '@/utils/files'import { getUploadFileKey } from '../utils/uploadSources'@@ -350,6 +533,9 @@ import type {const IMAGE_EXTENSIONS = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']const AUDIO_EXTENSIONS = ['mp3', 'wav', 'm4a', 'flac', 'ogg']+type ConfigSectionKey = 'tags' | 'parser' | 'chunking' | 'multimodal' | 'asr' | 'question' | 'graph'+type IssueSectionKey = 'multimodal' | 'asr'+interface ChunkingUIConfig {chunkSize: numberchunkOverlap: number@@ -416,6 +602,7 @@ const emit = defineEmits<{const { t } = useI18n()const chatResources = useChatResourcesStore()+const editorResources = useEditorResourcesStore()const uiStore = useUIStore()const allModels = ref<any[]>([])@@ -425,7 +612,8 @@ const availableTags = ref<Array<{ id: string; name: string }>>([])const selectedTagIds = ref<string[]>([])const tagsLoading = ref(false)const tagsLoadFailed = ref(false)-const activeSection = ref('overview')+const chunkingMoreOpen = ref(false)+const activeSection = ref<ConfigSectionKey>('tags')const uiState = ref<UploadUIState>(createDefaultUIState())const dialogVisible = computed({@@ -433,25 +621,25 @@ const dialogVisible = computed({set: (value: boolean) => emit('update:visible', value),})-function getEngineDisplayName(engineName: string): string {- const key = `kbSettings.parser.engines.${engineName}.name`- const translated = t(key)- return translated !== key ? translated : engineName-}--function getStrategyLabel(strategy?: string): string {- if (!strategy) return t('uploadConfirm.summaryStrategyDefault')- const key = `knowledgeEditor.chunking.strategies.${strategy}.label`- const translated = t(key)- return translated !== key ? translated : strategy-}-function getModelName(modelId: string): string {if (!modelId) return t('uploadConfirm.notSet')const model = allModels.value.find((m: any) => m.id === modelId)return model?.name || modelId}+function truncateNavText(text: string, max = 18): string {+ if (!text) return text+ if (text.length <= max) return text+ return `${text.slice(0, max - 1)}…`+}++function hasParserCustomization(): boolean {+ const rules = uiState.value.chunkingConfig.parserEngineRules+ if (!rules?.length) return false+ return rules.some(rule => rule.engine && rule.engine !== 'builtin')+ || rules.some(rule => rule.xlsx_first_row_as_header)+}+function getFileExt(file: File): string {const dot = file.name.lastIndexOf('.')if (dot < 0) return ''@@ -487,27 +675,14 @@ function inferMediaExtsFromMarkdown(content: string): string[] {}const manualCharCount = computed(() => props.manualPreview?.content?.length ?? 0)-const batchItemCount = computed(() => localFiles.value.length + localUrls.value.length)-const sourcePanelTitle = computed(() => {- if (props.mode === 'manual') return t('uploadConfirm.manualSource')- if (props.mode === 'reparse') return t('uploadConfirm.reparseSource')- return t('uploadConfirm.fileList')-})-const dialogTitle = computed(() => {if (props.mode === 'manual') return t('uploadConfirm.titleManual')if (props.mode === 'reparse') return t('uploadConfirm.titleReparse')return t('uploadConfirm.title')})-const dialogDesc = computed(() => {- if (props.mode === 'manual') return t('uploadConfirm.overviewDescManual')- if (props.mode === 'reparse') return t('uploadConfirm.overviewDescReparse')- return t('uploadConfirm.overviewDesc')-})-const confirmButtonText = computed(() => {if (props.mode === 'manual') return t('uploadConfirm.confirmManual')if (props.mode === 'reparse') return t('uploadConfirm.confirmReparse')@@ -536,145 +711,38 @@ const batchFileExts = computed(() => {return [...set]})-const hasPdf = computed(() => {- return batchFileExts.value.includes('pdf')-})--function resolveEngineForExt(ext: string): string {- const rules = uiState.value.chunkingConfig.parserEngineRules- let engineKey = 'builtin'- let name = t('uploadConfirm.summaryParserBuiltin')- if (rules?.length) {- for (const rule of rules) {- if (rule.file_types.includes(ext)) {- engineKey = rule.engine- name = getEngineDisplayName(rule.engine)- break- }- }- }- if (ext === 'pdf' && uiState.value.pdfForceScanned && engineKey === 'builtin') {- return `${name} · ${t('uploadConfirm.summaryParserForceScanned')}`- }- return name-}--const parserOverviewValue = computed(() => {- const exts = batchFileExts.value- if (!exts.length) return t('uploadConfirm.summaryParserBuiltin')- return exts.map(ext => `.${ext} → ${resolveEngineForExt(ext)}`).join(' · ')-})--const chunkingOverviewValue = computed(() => {- const c = uiState.value.chunkingConfig- const parts = [- t('uploadConfirm.navChunkingSummary', { size: c.chunkSize }),- t('uploadConfirm.summaryChunkOverlapShort', { overlap: c.chunkOverlap }),- getStrategyLabel(c.strategy),- ]- parts.push(- c.enableParentChild- ? t('uploadConfirm.summaryParentChildShort')- : t('uploadConfirm.summaryParentChildOff'),- )- return parts.join(' · ')-})+const hasPdf = computed(() => batchFileExts.value.includes('pdf'))++const chunkingStrategyOptions = computed(() => [+ { label: t('knowledgeEditor.chunking.strategies.auto.label'), value: 'auto' },+ { label: t('knowledgeEditor.chunking.strategies.heading.label'), value: 'heading' },+ { label: t('knowledgeEditor.chunking.strategies.heuristic.label'), value: 'heuristic' },+ { label: t('knowledgeEditor.chunking.strategies.legacy.label'), value: 'legacy' },+])++const separatorOptions = computed(() => [+ { label: t('knowledgeEditor.chunking.separators.doubleNewline'), value: '\n\n' },+ { label: t('knowledgeEditor.chunking.separators.singleNewline'), value: '\n' },+ { label: t('knowledgeEditor.chunking.separators.periodCn'), value: '。' },+ { label: t('knowledgeEditor.chunking.separators.exclamationCn'), value: '!' },+ { label: t('knowledgeEditor.chunking.separators.questionCn'), value: '?' },+ { label: t('knowledgeEditor.chunking.separators.semicolonCn'), value: ';' },+ { label: t('knowledgeEditor.chunking.separators.semicolonEn'), value: ';' },+ { label: t('knowledgeEditor.chunking.separators.space'), value: ' ' },+])++const languageOptions = computed(() => [+ { label: t('knowledgeEditor.chunking.languageOptions.de'), value: 'de' },+ { label: t('knowledgeEditor.chunking.languageOptions.en'), value: 'en' },+ { label: t('knowledgeEditor.chunking.languageOptions.zh'), value: 'zh' },+])const tagOptions = computed(() => availableTags.value.map(tag => ({label: tag.name,value: tag.id,})))-const tagsOverviewValue = computed(() => {- if (selectedTagIds.value.length === 0) return t('uploadConfirm.summaryNoTags')- const nameById = new Map(availableTags.value.map(tag => [tag.id, tag.name]))- const names = selectedTagIds.value.map(id => nameById.get(id)).filter(Boolean) as string[]- if (names.length > 0 && names.length <= 3) return names.join('、')- return t('uploadConfirm.summaryTagsCount', { count: selectedTagIds.value.length })-})--const enhancementOverviewValue = computed(() => {- const question = uiState.value.questionGenerationConfig- const questionValue = question.enabled- ? t('uploadConfirm.summaryQuestionCountValue', { count: question.questionCount })- : t('uploadConfirm.statusOff')- const tableValue = uiState.value.chunkingConfig.tableMetadataInstructions?.trim()- ? t('uploadConfirm.summaryTableInstructionsSet')- : t('uploadConfirm.summaryTableInstructionsDefault')- return `${questionValue} · ${tableValue}`-})--const overviewLines = computed(() => {- const mm = uiState.value.multimodalConfig- const asr = uiState.value.asrConfig- const graph = uiState.value.nodeExtractConfig-- return [- ...(props.mode === 'reparse'- ? []- : [{ key: 'tags', title: t('uploadConfirm.tabTags'), value: tagsOverviewValue.value }]),- { key: 'parser', title: t('uploadConfirm.tabParser'), value: parserOverviewValue.value },- { key: 'chunking', title: t('uploadConfirm.tabChunking'), value: chunkingOverviewValue.value },- {- key: 'multimodal',- title: t('uploadConfirm.tabMultimodal'),- value: mm.enabled- ? `${t('uploadConfirm.statusOn')} · ${mm.vllmModelId ? getModelName(mm.vllmModelId) : t('uploadConfirm.notSet')}`- : (hasImages.value ? t('uploadConfirm.multimodalRequiredForImages') : t('uploadConfirm.statusOff')),- },- {- key: 'asr',- title: t('uploadConfirm.tabAsr'),- value: asr.enabled- ? `${t('uploadConfirm.statusOn')} · ${asr.modelId ? getModelName(asr.modelId) : t('uploadConfirm.notSet')}`- : (hasAudio.value ? t('uploadConfirm.asrRequiredForAudio') : t('uploadConfirm.statusOff')),- },- {- key: 'question',- title: t('uploadConfirm.tabEnhancement'),- value: enhancementOverviewValue.value,- },- {- key: 'graph',- title: t('uploadConfirm.tabGraph'),- value: graph.enabled- ? (graph.tags.length- ? t('uploadConfirm.summaryGraphTagsValue', { count: graph.tags.length })- : t('uploadConfirm.statusOn'))- : t('uploadConfirm.statusOff'),- },- ]-})--const sectionMeta: Record<string, { titleKey: string; descKey?: string }> = {- tags: { titleKey: 'uploadConfirm.tabTags', descKey: 'uploadConfirm.tagsDescription' },- parser: { titleKey: 'uploadConfirm.tabParser', descKey: 'kbSettings.parser.description' },- chunking: { titleKey: 'uploadConfirm.tabChunking', descKey: 'knowledgeEditor.chunking.description' },- multimodal: { titleKey: 'uploadConfirm.tabMultimodal', descKey: 'knowledgeEditor.multimodal.description' },- asr: { titleKey: 'uploadConfirm.tabAsr', descKey: 'knowledgeEditor.asr.description' },- question: { titleKey: 'uploadConfirm.tabEnhancement', descKey: 'knowledgeEditor.advanced.description' },- graph: { titleKey: 'uploadConfirm.tabGraph', descKey: 'graphSettings.description' },-}--const currentSectionTitle = computed(() => {- const meta = sectionMeta[activeSection.value]- return meta ? t(meta.titleKey) : ''-})--const currentSectionDesc = computed(() => {- const meta = sectionMeta[activeSection.value]- return meta?.descKey ? t(meta.descKey) : ''-})--const goToSection = (key: string) => {- activeSection.value = key-}-const llmModelId = computed(() => props.kbInfo?.summary_model_id || '')-const ragEnabled = computed(() => {- const strategy = props.kbInfo?.indexing_strategy- return (strategy?.vector_enabled ?? true) || (strategy?.keyword_enabled ?? true)-})const hasImages = computed(() => {if (props.mode === 'manual' && props.manualPreview?.content) {@@ -688,6 +756,15 @@ const hasAudio = computed(() => {return batchFileExts.value.some(ext => AUDIO_EXTENSIONS.includes(ext))})+const isGraphDatabaseEnabled = computed(() => {+ const engine = editorResources.systemInfo?.graph_database_engine+ return !!engine && engine !== 'Not Enabled'+})++const isGraphSectionAvailable = computed(() => {+ return isGraphDatabaseEnabled.value && uiState.value.graphEnabled+})+const showMultimodalModelError = computed(() => {return uiState.value.multimodalConfig.enabled && !uiState.value.multimodalConfig.vllmModelId})@@ -697,7 +774,7 @@ const showAsrModelError = computed(() => {})const issueSectionKeys = computed(() => {- const keys = new Set<string>()+ const keys = new Set<IssueSectionKey>()if (hasImages.value) {if (!uiState.value.multimodalConfig.enabled || !uiState.value.multimodalConfig.vllmModelId) {keys.add('multimodal')@@ -715,6 +792,133 @@ const issueSectionKeys = computed(() => {return keys})+const navItems = computed(() => {+ const items: Array<{+ key: ConfigSectionKey+ icon: string+ label: string+ status: string+ statusFull: string+ statusTone?: 'warning' | 'error' | 'muted'+ issue?: boolean+ }> = []++ const push = (key: ConfigSectionKey, icon: string, label: string, issue?: boolean) => {+ const statusMeta = getSectionNavStatus(key, issue)+ const full = statusMeta.status+ items.push({+ key,+ icon,+ label,+ status: truncateNavText(full),+ statusFull: full,+ statusTone: statusMeta.statusTone,+ issue,+ })+ }++ if (props.mode !== 'reparse') {+ push('tags', 'tag', t('uploadConfirm.tabTags'))+ }+ push('parser', 'file-search', t('settings.parserEngine'))+ push('chunking', 'file-copy', t('knowledgeEditor.sidebar.chunking'))+ push(+ 'multimodal',+ 'image',+ t('knowledgeEditor.sidebar.multimodal'),+ issueSectionKeys.value.has('multimodal'),+ )+ push(+ 'asr',+ 'sound',+ t('knowledgeEditor.sidebar.asr'),+ issueSectionKeys.value.has('asr'),+ )+ push('question', 'chat', t('knowledgeEditor.advanced.questionGeneration.label'))+ if (isGraphSectionAvailable.value) {+ push('graph', 'chart-bubble', t('knowledgeEditor.sidebar.graph'))+ }+ return items+})++function getSectionNavStatus(+ key: ConfigSectionKey,+ issue?: boolean,+): { status: string; statusTone?: 'warning' | 'error' | 'muted' } {+ switch (key) {+ case 'tags':+ if (selectedTagIds.value.length === 0) {+ return { status: t('uploadConfirm.summaryNoTags'), statusTone: 'muted' }+ }+ return {+ status: t('uploadConfirm.summaryTagsCount', { count: selectedTagIds.value.length }),+ }+ case 'parser':+ if (uiState.value.pdfForceScanned && hasPdf.value) {+ return { status: t('uploadConfirm.summaryParserForceScanned') }+ }+ if (hasParserCustomization()) {+ return { status: t('uploadConfirm.navParserCustomized') }+ }+ return { status: t('uploadConfirm.navParserDefault'), statusTone: 'muted' }+ case 'chunking': {+ const chunking = uiState.value.chunkingConfig+ const parts = [t('uploadConfirm.navChunkingSummary', { size: chunking.chunkSize })]+ if (chunking.enableParentChild) {+ parts.push(t('uploadConfirm.summaryParentChildShort'))+ }+ return { status: parts.join(' · ') }+ }+ case 'multimodal': {+ if (issue) {+ return { status: t('uploadConfirm.statusNeedsSetup'), statusTone: 'error' }+ }+ const mm = uiState.value.multimodalConfig+ if (!mm.enabled) {+ return { status: t('uploadConfirm.statusOff'), statusTone: 'muted' }+ }+ return {+ status: mm.vllmModelId ? getModelName(mm.vllmModelId) : t('uploadConfirm.notSet'),+ statusTone: mm.vllmModelId ? undefined : 'warning',+ }+ }+ case 'asr': {+ if (issue) {+ return { status: t('uploadConfirm.statusNeedsSetup'), statusTone: 'error' }+ }+ const asr = uiState.value.asrConfig+ if (!asr.enabled) {+ return { status: t('uploadConfirm.statusOff'), statusTone: 'muted' }+ }+ return {+ status: asr.modelId ? getModelName(asr.modelId) : t('uploadConfirm.notSet'),+ statusTone: asr.modelId ? undefined : 'warning',+ }+ }+ case 'question': {+ const question = uiState.value.questionGenerationConfig+ if (!question.enabled) {+ return { status: t('uploadConfirm.statusOff'), statusTone: 'muted' }+ }+ return {+ status: t('uploadConfirm.summaryQuestionCountValue', { count: question.questionCount }),+ }+ }+ case 'graph': {+ if (!uiState.value.graphEnabled || !uiState.value.nodeExtractConfig.enabled) {+ return { status: t('uploadConfirm.statusOff'), statusTone: 'muted' }+ }+ const tagCount = uiState.value.nodeExtractConfig.tags?.length ?? 0+ if (tagCount > 0) {+ return { status: t('uploadConfirm.summaryGraphTagsValue', { count: tagCount }) }+ }+ return { status: t('uploadConfirm.statusOn') }+ }+ default:+ return { status: '' }+ }+}+const canConfirm = computed(() => {if (props.mode === 'file' && batchItemCount.value === 0) return falseif (props.mode === 'manual' && !props.manualPreview?.content?.trim()) return false@@ -734,6 +938,20 @@ const canConfirm = computed(() => {return true})+function getDefaultSection(): ConfigSectionKey {+ if (props.mode === 'reparse') return 'parser'+ if (issueSectionKeys.value.has('multimodal')) return 'multimodal'+ if (issueSectionKeys.value.has('asr')) return 'asr'+ return 'tags'+}++function goToSection(key: ConfigSectionKey) {+ activeSection.value = key+ nextTick(() => {+ document.querySelector(`[data-section="${key}"]`)?.scrollIntoView({ behavior: 'smooth', block: 'start' })+ })+}+function createDefaultUIState(): UploadUIState {return {chunkingConfig: {@@ -802,8 +1020,6 @@ function initFromKbInfo(kb: any) {customInstructions: kb.question_generation_config?.custom_instructions || '',},nodeExtractConfig: {- // This dialog exposes one graph switch, so show the effective state.- // The backend only runs graph extraction when both flags are enabled.enabled: !!kb.extract_config?.enabled && !!kb.indexing_strategy?.graph_enabled,text: kb.extract_config?.text || '',tags: kb.extract_config?.tags || [],@@ -920,8 +1136,6 @@ function applyOverridesToState(o?: KnowledgeProcessOverrides | null) {if (ec.custom_instructions != null) s.nodeExtractConfig.customInstructions = ec.custom_instructions}if (o.graph_enabled != null) s.graphEnabled = o.graph_enabled- // Older saved overrides may contain mismatched graph/extract flags. Keep- // the single visible switch aligned with the backend's effective state.s.nodeExtractConfig.enabled = s.nodeExtractConfig.enabled && s.graphEnabledif (o.parser_engine_overrides && o.parser_engine_overrides.pdf_force_scanned === 'true') {s.pdfForceScanned = true@@ -939,6 +1153,14 @@ async function loadModels() {}}+async function loadSystemInfo() {+ try {+ await editorResources.ensureSystemInfo()+ } catch {+ // Graph section falls back to hidden when system info is unavailable.+ }+}+async function loadTags() {const kbId = props.kbInfo?.idavailableTags.value = []@@ -971,12 +1193,20 @@ watch(if (props.mode === 'reparse') {applyOverridesToState(props.reparsePreview?.processOverrides)}- activeSection.value = 'overview'+ activeSection.value = getDefaultSection()+ chunkingMoreOpen.value = falseloadModels()+ loadSystemInfo()loadTags()},)+watch(isGraphSectionAvailable, (available) => {+ if (!available && activeSection.value === 'graph') {+ activeSection.value = getDefaultSection()+ }+})+const appendFiles = (incoming: File[]) => {const existingKeys = new Set(localFiles.value.map(getUploadFileKey))const toAdd: File[] = []@@ -1025,10 +1255,6 @@ const handleParserEngineRulesUpdate = (rules: Array<{uiState.value.chunkingConfig.parserEngineRules = rules}-const handleChunkingConfigUpdate = (config: ChunkingUIConfig) => {- uiState.value.chunkingConfig = { ...config }-}-const handleMultimodalVLLMChange = (modelId: string) => {uiState.value.multimodalConfig.vllmModelId = modelId}@@ -1041,19 +1267,8 @@ const handleAddASRModel = () => {uiStore.openSettings('models', 'asr')}-const handleQuestionGenerationUpdate = (config: { enabled: boolean; questionCount: number; customInstructions?: string }) => {- uiState.value.questionGenerationConfig = { ...config }-}--const handleTableMetadataInstructionsUpdate = (value: string) => {- uiState.value.chunkingConfig.tableMetadataInstructions = value-}-const handleNodeExtractUpdate = (config: UploadUIState['nodeExtractConfig']) => {uiState.value.nodeExtractConfig = { ...config }- // GraphSettings is the only graph switch in the upload dialog. Update both- // backend flags; otherwise the hidden KB default can silently override the- // user's checked switch and prevent graph tasks from being created.uiState.value.graphEnabled = config.enabled}@@ -1061,24 +1276,26 @@ const validateBeforeConfirm = (): boolean => {if (hasImages.value) {if (!uiState.value.multimodalConfig.enabled || !uiState.value.multimodalConfig.vllmModelId) {MessagePlugin.warning(t('uploadConfirm.vlmModelRequired'))- activeSection.value = 'multimodal'+ uiState.value.multimodalConfig.enabled = true+ goToSection('multimodal')return false}} else if (showMultimodalModelError.value) {MessagePlugin.warning(t('uploadConfirm.vlmModelSelectRequired'))- activeSection.value = 'multimodal'+ goToSection('multimodal')return false}if (hasAudio.value) {if (!uiState.value.asrConfig.enabled || !uiState.value.asrConfig.modelId) {MessagePlugin.warning(t('uploadConfirm.asrModelRequired'))- activeSection.value = 'asr'+ uiState.value.asrConfig.enabled = true+ goToSection('asr')return false}} else if (showAsrModelError.value) {MessagePlugin.warning(t('uploadConfirm.asrModelSelectRequired'))- activeSection.value = 'asr'+ goToSection('asr')return false}return true@@ -1135,8 +1352,10 @@ const handleConfirm = () => {position: relative;display: flex;flex-direction: column;- width: min(880px, 92vw);- height: min(640px, 86vh);+ width: 92vw;+ max-width: 1160px;+ height: 85vh;+ max-height: 750px;overflow: hidden;border-radius: 12px;background: var(--td-bg-color-container);@@ -1145,8 +1364,8 @@ const handleConfirm = () => {.close-btn {position: absolute;- top: 16px;- right: 16px;+ top: 20px;+ right: 20px;z-index: 10;display: flex;align-items: center;@@ -1176,33 +1395,50 @@ const handleConfirm = () => {flex-direction: column;flex-shrink: 0;width: 220px;- border-right: 1px solid var(--td-component-stroke);background: var(--td-bg-color-settings-modal, var(--td-bg-color-secondarycontainer));+ border-right: 1px solid var(--td-component-stroke);}-.files-panel-header {+.sidebar-header,+.settings-sidebar-header {display: flex;+ flex-shrink: 0;align-items: center;- justify-content: space-between;- gap: 8px;- padding: 20px 16px 12px;+ box-sizing: border-box;+ height: 56px;+ padding: 0 12px;+ border-bottom: 1px solid var(--td-component-stroke);}-.files-panel-actions {+.sidebar-header-row {display: flex;align-items: center;- gap: 6px;- flex-shrink: 0;+ justify-content: space-between;+ gap: 8px;+ width: 100%;+ min-width: 0;}-.files-panel-title {+.sidebar-title {margin: 0;- font-size: 13px;+ flex: 1;+ min-width: 0;+ padding-right: 0;+ font-size: 16px;font-weight: 600;+ line-height: 1.35;color: var(--td-text-color-primary);}+.sidebar-header-actions {+ display: flex;+ flex-shrink: 0;+ align-items: center;+ gap: 6px;+}+.files-count {+ flex-shrink: 0;min-width: 20px;height: 20px;padding: 0 6px;@@ -1215,10 +1451,19 @@ const handleConfirm = () => {color: var(--td-text-color-secondary);}+.files-list-wrap {+ display: flex;+ flex: 1;+ flex-direction: column;+ min-height: 0;+ padding: 6px 8px 12px;+ overflow: hidden;+}+.files-list {flex: 1;margin: 0;- padding: 4px 8px 12px;+ padding: 0;overflow-y: auto;list-style: none;}@@ -1227,17 +1472,35 @@ const handleConfirm = () => {display: flex;align-items: center;gap: 8px;- padding: 8px;+ margin-bottom: 2px;+ padding: 6px 6px 6px 8px;border-radius: 6px;+ transition: background-color 0.15s ease;++ &:last-child {+ margin-bottom: 0;+ }&:hover {background: var(--td-bg-color-container-hover);}}-.file-icon {+.file-icon-wrap {+ display: flex;flex-shrink: 0;- font-size: 18px;+ align-items: center;+ justify-content: center;+ width: 24px;+ height: 24px;+}++.file-icon {+ font-size: 16px;+ color: var(--td-text-color-secondary);+}++.file-item:hover .file-icon {color: var(--td-brand-color);}@@ -1249,7 +1512,9 @@ const handleConfirm = () => {.file-name {display: block;overflow: hidden;- font-size: 13px;+ font-size: 12px;+ font-weight: 500;+ line-height: 1.35;color: var(--td-text-color-primary);text-overflow: ellipsis;white-space: nowrap;@@ -1257,41 +1522,73 @@ const handleConfirm = () => {.file-size {display: block;- margin-top: 2px;- font-size: 12px;+ margin-top: 1px;+ font-size: 11px;+ line-height: 1.3;color: var(--td-text-color-placeholder);}+.file-remove {+ display: flex;+ flex-shrink: 0;+ align-items: center;+ justify-content: center;+ width: 22px;+ height: 22px;+ padding: 0;+ border: none;+ border-radius: 4px;+ background: transparent;+ color: var(--td-text-color-placeholder);+ cursor: pointer;+ transition: opacity 0.15s ease, color 0.15s ease, background-color 0.15s ease;+ opacity: 0.45;++ .file-item:hover &,+ &:focus-visible {+ opacity: 1;+ }++ &:hover {+ color: var(--td-text-color-primary);+ background: var(--td-bg-color-component);+ }+}+.files-empty {flex: 1;- padding: 24px 16px;- font-size: 13px;- color: var(--td-text-color-secondary);+ padding: 16px 8px;+ font-size: 12px;+ color: var(--td-text-color-placeholder);text-align: center;}.manual-source-panel {flex: 1;min-height: 0;- padding: 8px 16px 12px;+ padding: 0;overflow-y: auto;}.manual-source-title {- margin: 0 0 6px;- font-size: 14px;+ margin: 0;+ padding: 8px 10px;+ border-radius: 6px;+ background: var(--td-bg-color-container-hover);+ font-size: 13px;font-weight: 500;+ line-height: 1.4;color: var(--td-text-color-primary);word-break: break-word;}.manual-source-meta {- margin: 0;- font-size: 12px;+ margin: 6px 2px 0;+ font-size: 11px;color: var(--td-text-color-placeholder);}-.main-panel {+.config-panel {display: flex;flex: 1;flex-direction: column;@@ -1299,214 +1596,371 @@ const handleConfirm = () => {overflow: hidden;}-.main-header {+.settings-sidebar {+ display: flex;+ flex-direction: column;flex-shrink: 0;- padding: 20px 48px 0 24px;+ width: 216px;+ min-height: 0;+ background-color: var(--td-bg-color-settings-modal, var(--td-bg-color-secondarycontainer));+ border-right: 1px solid var(--td-component-stroke);+}++.settings-sidebar-header {+ width: 100%;}-.main-title {+.settings-sidebar-title {margin: 0;- font-size: 18px;+ font-size: 16px;font-weight: 600;+ line-height: 1.35;color: var(--td-text-color-primary);}-.main-desc {- margin: 6px 0 0;- font-size: 13px;- line-height: 1.5;+.settings-nav {+ flex: 1;+ padding: 10px 6px 12px;+ overflow-y: auto;+ min-height: 0;+}++.nav-group-title {+ padding: 6px 14px 2px;color: var(--td-text-color-placeholder);+ font-size: 12px;+ font-weight: 600;+ letter-spacing: 0.02em;++ .settings-nav > &:first-child {+ padding-top: 2px;+ }++ .settings-nav > &:not(:first-child) {+ padding-top: 8px;+ }}-.back-link {- display: inline-flex;- align-items: center;- gap: 4px;- margin: 0 0 10px;- padding: 0;+.nav-item {+ display: flex;+ align-items: flex-start;+ width: 100%;+ margin-bottom: 2px;+ padding: 9px 10px;border: none;- background: none;- font-size: 13px;- color: var(--td-brand-color);+ border-radius: 6px;+ background: transparent;+ font-size: 14px;+ color: var(--td-text-color-primary);+ text-align: left;cursor: pointer;+ transition: all 0.2s ease;+ user-select: none;&:hover {- opacity: 0.85;+ background-color: var(--td-bg-color-container-hover);+ color: var(--td-text-color-primary);+ }++ &.active {+ background-color: var(--td-bg-color-secondarycontainer);+ color: var(--td-brand-color);+ font-weight: 500;++ .nav-label {+ color: var(--td-brand-color);+ }++ .nav-status {+ color: var(--td-text-color-secondary);+ }+ }++ &--issue .nav-label {+ color: var(--td-error-color);}}-.edit-title {- margin: 0;+.nav-icon {+ display: flex;+ flex-shrink: 0;+ align-items: center;+ justify-content: center;+ margin-right: 8px;+ margin-top: 2px;font-size: 16px;- font-weight: 600;- color: var(--td-text-color-primary);+ color: inherit;}-.edit-desc {- margin: 6px 0 0;+.nav-label-wrap {+ display: flex;+ flex: 1;+ flex-direction: column;+ gap: 3px;+ min-width: 0;+}++.nav-label {+ overflow: hidden;font-size: 13px;- line-height: 1.5;+ font-weight: 500;+ line-height: 1.35;+ text-overflow: ellipsis;+ white-space: nowrap;+}++.nav-status {+ overflow: hidden;+ font-size: 12px;+ line-height: 1.35;color: var(--td-text-color-placeholder);+ text-overflow: ellipsis;+ white-space: nowrap;++ &--muted {+ color: var(--td-text-color-placeholder);+ }++ &--warning {+ color: var(--td-warning-color);+ }++ &--error {+ color: var(--td-error-color);+ }+}++.nav-dot {+ flex-shrink: 0;+ width: 6px;+ height: 6px;+ margin-left: 6px;+ border-radius: 50%;+ background: var(--td-error-color);}-.main-body {+.content-wrapper {flex: 1;+ min-width: 0;min-height: 0;- padding: 16px 24px 20px;+ padding: 22px 32px 28px;overflow-y: auto;+ background: var(--td-bg-color-container);+}++.upload-confirm-content {+ .setting-info {+ flex: 0 0 40%;+ max-width: 40%;+ }++ .setting-control {+ flex: 1 1 56%;+ max-width: 56%;+ min-width: 280px;+ }}-.overview-list {+.section-notice {+ display: flex;+ align-items: flex-start;+ gap: 8px;+ margin-bottom: 16px;+ padding: 10px 12px;border: 1px solid var(--td-component-stroke);border-radius: 8px;- overflow: hidden;+ background: var(--td-bg-color-secondarycontainer);+ font-size: 13px;+ line-height: 1.5;+ color: var(--td-text-color-secondary);++ .t-icon {+ flex-shrink: 0;+ margin-top: 1px;+ font-size: 16px;+ color: var(--td-brand-color);+ }}-.overview-row {- display: grid;- grid-template-columns: 108px 1fr 20px;- gap: 12px;- align-items: center;- width: 100%;- margin: 0;- padding: 14px 16px;- border: none;- border-bottom: 1px solid var(--td-component-stroke);- background: var(--td-bg-color-container);- text-align: left;- cursor: pointer;- transition: background 0.15s ease;+.section {+ margin-bottom: 32px;&:last-child {- border-bottom: none;+ margin-bottom: 0;}+}- &:hover {- background: var(--td-bg-color-container-hover);+.section-content {+ .section-header {+ margin-bottom: 16px;}- &--issue {- background: var(--td-error-color-1);+ .section-title {+ margin: 0 0 6px;+ font-size: 20px;+ font-weight: 600;+ color: var(--td-text-color-primary);+ }- &:hover {- background: var(--td-error-color-2);- }+ .section-desc {+ margin: 0;+ font-size: 14px;+ line-height: 22px;+ color: var(--td-text-color-placeholder);}}-.overview-label {- font-size: 13px;- font-weight: 500;- color: var(--td-text-color-secondary);-}+.kb-settings-block {+ width: 100%;-.overview-value {- overflow: hidden;- font-size: 13px;- color: var(--td-text-color-primary);- text-overflow: ellipsis;- white-space: nowrap;+ .section-header {+ margin-bottom: 20px;+ }- &--issue {- color: var(--td-error-color);+ .section-title {+ margin: 0 0 6px;+ font-size: 20px;+ font-weight: 600;+ color: var(--td-text-color-primary);}-}-.overview-chevron {- font-size: 16px;- color: var(--td-text-color-placeholder);+ .section-desc {+ margin: 0;+ font-size: 14px;+ line-height: 1.5;+ color: var(--td-text-color-secondary);+ }}-.edit-section {- width: 100%;-}+.settings-group {+ display: flex;+ flex-direction: column;+ gap: 0;-.section {- width: 100%;+ &--more {+ margin-top: 4px;+ }}-.kb-embedded-settings {- .setting-row {- padding: 12px 0;- border-bottom: 1px solid var(--td-component-stroke);+.setting-row {+ display: flex;+ align-items: flex-start;+ justify-content: space-between;+ padding: 16px 0;+ border-bottom: 1px solid var(--td-component-stroke);- &:last-child {- border-bottom: none;- }+ &:last-child {+ border-bottom: none;}+}- .setting-row--toggle {- display: flex;- flex-direction: row;- align-items: center;- justify-content: space-between;- gap: 16px;-- .setting-info {- flex: 1;- min-width: 0;- }+.setting-info {+ flex: 0 0 40%;+ max-width: 40%;+ padding-right: 24px;- .setting-control {- flex: none;- flex-shrink: 0;- }+ label {+ display: block;+ margin-bottom: 4px;+ font-size: 15px;+ font-weight: 500;+ color: var(--td-text-color-primary);}- .setting-row--field {- display: flex;- flex-direction: column;- align-items: stretch;- gap: 8px;+ .desc {+ margin: 0;+ font-size: 13px;+ line-height: 1.5;+ color: var(--td-text-color-secondary);}- .setting-info {- label {- font-size: 14px;- font-weight: 500;- color: var(--td-text-color-primary);- }-- .desc {- margin: 4px 0 0;- font-size: 12px;- line-height: 1.5;- color: var(--td-text-color-secondary);- }+ .warn {+ margin: 4px 0 0;+ font-size: 12px;+ line-height: 1.4;+ color: var(--td-warning-color);}+}- .setting-control--full {+.setting-control {+ display: flex;+ flex: 0 0 55%;+ max-width: 55%;+ align-items: center;+ justify-content: flex-end;++ &-full {+ flex: none;width: 100%;+ max-width: none;+ justify-content: flex-start;}- .required {- color: var(--td-error-color);+ &-inline {+ gap: 12px;+ justify-content: flex-end;}+}- .field-error {- margin: 6px 0 0;- font-size: 12px;- line-height: 1.4;- color: var(--td-error-color);+.setting-row-vertical {+ flex-direction: column;+ gap: 12px;++ .setting-info,+ .setting-control {+ flex: none;+ width: 100%;+ max-width: none;+ padding-right: 0;}- .field-error--muted,- .field-hint {- margin: 6px 0 0;- font-size: 12px;- line-height: 1.4;- color: var(--td-text-color-secondary);+ .setting-control {+ display: block;+ }+}++.required {+ margin-left: 2px;+ font-weight: 500;+ color: var(--td-error-color);+}++.field-hint {+ margin: 6px 0 0;+ font-size: 12px;+ line-height: 1.5;+ color: var(--td-text-color-placeholder);++ &--error {+ color: var(--td-error-color);}}-.edit-section--embedded {- :deep(.setting-row) {- &:last-child {- border-bottom: none;+.more-options-toggle {+ display: inline-flex;+ align-items: center;+ gap: 6px;+ margin-top: 4px;+ padding: 6px 0;+ border: none;+ background: transparent;+ color: var(--td-brand-color);+ font-size: 13px;+ cursor: pointer;++ .t-icon {+ transition: transform 0.18s ease;++ &.is-open {+ transform: rotate(180deg);}}}+:deep(.t-input-number) {+ width: 100%;+}+.modal-footer {display: flex;flex-shrink: 0;@@ -1514,6 +1968,61 @@ const handleConfirm = () => {gap: 12px;padding: 14px 20px;border-top: 1px solid var(--td-component-stroke);+ background: var(--td-bg-color-container);+}++@media (max-width: 800px) {+ .upload-confirm-container {+ flex-direction: column;+ }++ .files-panel {+ width: auto;+ max-height: 140px;+ border-right: none;+ border-bottom: 1px solid var(--td-component-stroke);+ }++ .settings-sidebar {+ width: auto;+ border-right: none;+ border-bottom: 1px solid var(--td-component-stroke);+ }++ .settings-nav {+ display: flex;+ flex-wrap: nowrap;+ gap: 4px;+ flex: none;+ padding: 8px;+ overflow-x: auto;+ }++ .nav-group-title {+ display: none;+ }++ .nav-item {+ flex: 0 0 auto;+ width: auto;+ margin-bottom: 0;+ white-space: nowrap;+ }++ .content-wrapper {+ padding: 16px;+ }++ .setting-info,+ .setting-control {+ flex: 1 1 100%;+ max-width: none;+ }++ .setting-row {+ flex-direction: column;+ gap: 12px;+ }}.modal-enter-active,diff --git a/frontend/src/views/knowledge/settings/KBParserSettings.vue b/frontend/src/views/knowledge/settings/KBParserSettings.vueindex aba93fdff..62033d32c 100644--- a/frontend/src/views/knowledge/settings/KBParserSettings.vue+++ b/frontend/src/views/knowledge/settings/KBParserSettings.vue@@ -30,32 +30,34 @@</div></div><div class="setting-control">- <t-select- :value="getEngineForGroup(group.extensions) || undefined"- @change="(val: string) => handleEngineChange(group.extensions, val)"- :style="embedded ? undefined : { width: '280px' }"- :class="{ 'parser-engine-select--embedded': embedded }"- :status="hasAvailableEngine(group.extensions) ? 'default' : 'warning'"- :placeholder="$t('kbSettings.parser.noEngine')"- :popup-props="{ overlayInnerStyle: { maxHeight: '240px' } }"- >- <t-option- v-for="opt in getEngineOptions(group.extensions)"- :key="opt.value"- :value="opt.value"- :label="opt.selectLabel"- />- </t-select>- <t-checkbox- v-if="group.extensions.includes('xlsx') && getEngineForGroup(group.extensions) === 'builtin'"- class="xlsx-header-option"- :checked="getXLSXFirstRowAsHeader(group.extensions)"- @change="(checked: boolean) => handleXLSXFirstRowAsHeaderChange(group.extensions, checked)"- >- {{ $t('kbSettings.parser.xlsxFirstRowAsHeader') }}- </t-checkbox>- <div v-if="!hasAvailableEngine(group.extensions)" class="no-engine-warning">- <a class="go-settings" @click.prevent="goToParserSettings">{{ $t('kbSettings.parser.goConfig') }}</a>+ <div class="parser-control-stack">+ <t-select+ :value="getEngineForGroup(group.extensions) || undefined"+ @change="(val: string) => handleEngineChange(group.extensions, val)"+ :style="embedded ? undefined : { width: '280px' }"+ :class="{ 'parser-engine-select--embedded': embedded }"+ :status="hasAvailableEngine(group.extensions) ? 'default' : 'warning'"+ :placeholder="$t('kbSettings.parser.noEngine')"+ :popup-props="{ overlayInnerStyle: { maxHeight: '240px' } }"+ >+ <t-option+ v-for="opt in getEngineOptions(group.extensions)"+ :key="opt.value"+ :value="opt.value"+ :label="opt.selectLabel"+ />+ </t-select>+ <t-checkbox+ v-if="group.extensions.includes('xlsx') && getEngineForGroup(group.extensions) === 'builtin'"+ class="xlsx-header-option"+ :checked="getXLSXFirstRowAsHeader(group.extensions)"+ @change="(checked: boolean) => handleXLSXFirstRowAsHeaderChange(group.extensions, checked)"+ >+ {{ $t('kbSettings.parser.xlsxFirstRowAsHeader') }}+ </t-checkbox>+ <div v-if="!hasAvailableEngine(group.extensions)" class="no-engine-warning">+ <a class="go-settings" @click.prevent="goToParserSettings">{{ $t('kbSettings.parser.goConfig') }}</a>+ </div></div></div></div>@@ -433,9 +435,27 @@ watch(() => props.parserEngineRules, (v) => {align-items: flex-end;}+.parser-control-stack {+ display: flex;+ flex-direction: column;+ align-items: stretch;+ gap: 10px;+ width: 280px;+}+.xlsx-header-option {- margin-top: 10px;- text-align: right;+ align-self: stretch;++ :deep(.t-checkbox) {+ align-items: flex-start;+ }++ :deep(.t-checkbox__label) {+ font-size: 12px;+ line-height: 1.5;+ text-align: left;+ white-space: normal;+ }}.no-engine-warning {@@ -495,6 +515,10 @@ watch(() => props.parserEngineRules, (v) => {align-items: stretch;}+ .parser-control-stack {+ width: 100%;+ }+.group-label {font-size: 13px;font-weight: 500;