feat: multi-language support for agent search and admin pipeline config
- search_agents now accepts output_language parameter (en/zh-TW/ja) - Admin Settings: added Pipeline Configuration section (enabled, max_concurrent_stages, default_timeout_secs) - Admin Settings: search config now includes vlm_output_language dropdown - Added translations for pipeline config in en/zh-TW/ja locales - Agent search uses searchConfig.vlm_output_language for output language
This commit is contained in:
@@ -408,6 +408,44 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Pipeline Config Section -->
|
||||
<div class="config-section">
|
||||
<h3 class="config-section-title" @click="toggleSection('pipeline')">
|
||||
<span class="config-section-arrow">{{ expandedSections.pipeline ? '▼' : '▶' }}</span>
|
||||
{{ t('admin.section.pipelineConfig') }}
|
||||
</h3>
|
||||
<div v-if="expandedSections.pipeline" class="config-section-content">
|
||||
<div class="config-field config-field-inline">
|
||||
<label>{{ t('admin.pipeline.enabled') }}</label>
|
||||
<input type="checkbox" v-model="pipelineConfig.enabled" />
|
||||
<span class="config-hint">{{ t('admin.pipeline.hint.enabled') }}</span>
|
||||
</div>
|
||||
<div class="config-field config-field-inline">
|
||||
<label>{{ t('admin.pipeline.maxConcurrentStages') }}</label>
|
||||
<input
|
||||
class="config-input"
|
||||
type="number"
|
||||
step="1"
|
||||
min="1"
|
||||
max="10"
|
||||
v-model.number="pipelineConfig.max_concurrent_stages"
|
||||
/>
|
||||
<span class="config-hint">{{ t('admin.pipeline.hint.maxConcurrentStages') }}</span>
|
||||
</div>
|
||||
<div class="config-field config-field-inline">
|
||||
<label>{{ t('admin.pipeline.defaultTimeoutSecs') }}</label>
|
||||
<input
|
||||
class="config-input"
|
||||
type="number"
|
||||
step="60"
|
||||
min="60"
|
||||
v-model.number="pipelineConfig.default_timeout_secs"
|
||||
/>
|
||||
<span class="config-hint">{{ t('admin.pipeline.hint.defaultTimeoutSecs') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- System Config Section -->
|
||||
<div class="config-section">
|
||||
<h3 class="config-section-title" @click="toggleSection('sys')">
|
||||
@@ -1130,7 +1168,7 @@ const configSaving = ref(false)
|
||||
const configError = ref('')
|
||||
const configSaveMsg = ref('')
|
||||
const configSaveOk = ref(false)
|
||||
const expandedSections = ref({ vlm: true, llm: true, proc: true, filter: true, search: true, sys: false, lang: false })
|
||||
const expandedSections = ref({ vlm: true, llm: true, proc: true, filter: true, search: true, pipeline: false, sys: false, lang: false })
|
||||
|
||||
const vlmPrompts = ref<Record<string, any>>({})
|
||||
const llmConfig = ref<Record<string, any>>({})
|
||||
@@ -1142,6 +1180,11 @@ const searchConfig = ref<Record<string, any>>({
|
||||
vlm_max_results: 5,
|
||||
vlm_output_language: 'en'
|
||||
})
|
||||
const pipelineConfig = ref<Record<string, any>>({
|
||||
enabled: false,
|
||||
max_concurrent_stages: 3,
|
||||
default_timeout_secs: 3600
|
||||
})
|
||||
|
||||
function toggleSection(section: string) {
|
||||
expandedSections.value[section] = !expandedSections.value[section]
|
||||
@@ -1188,6 +1231,7 @@ async function loadConfig() {
|
||||
filterConfig.value = data.filter_config || {}
|
||||
systemConfig.value = data.system_config || {}
|
||||
searchConfig.value = data.search || { vlm_min_score: 0.0, vlm_max_results: 5, vlm_output_language: 'en' }
|
||||
pipelineConfig.value = data.pipeline || { enabled: false, max_concurrent_stages: 3, default_timeout_secs: 3600 }
|
||||
} catch (e: any) {
|
||||
configError.value = 'Failed to load config: ' + (e.message || e)
|
||||
} finally {
|
||||
@@ -1215,6 +1259,11 @@ async function saveConfig() {
|
||||
vlm_max_results: searchConfig.value.vlm_max_results || 5,
|
||||
vlm_output_language: searchConfig.value.vlm_output_language || 'en'
|
||||
},
|
||||
pipeline: {
|
||||
enabled: pipelineConfig.value.enabled ?? false,
|
||||
max_concurrent_stages: pipelineConfig.value.max_concurrent_stages || 3,
|
||||
default_timeout_secs: pipelineConfig.value.default_timeout_secs || 3600
|
||||
},
|
||||
}
|
||||
const saveRes = await fetch('/api/v1/admin/config', {
|
||||
method: 'POST',
|
||||
|
||||
Reference in New Issue
Block a user