mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-08 09:16:58 +08:00
feat: add Rust acceleration configuration option to system settings
This commit is contained in:
@@ -1645,6 +1645,9 @@ export default {
|
|||||||
encodingDetectionPerformanceMode: 'Encoding Detection Performance Mode',
|
encodingDetectionPerformanceMode: 'Encoding Detection Performance Mode',
|
||||||
encodingDetectionPerformanceModeHint:
|
encodingDetectionPerformanceModeHint:
|
||||||
'Prioritize detection efficiency, but may reduce encoding detection accuracy',
|
'Prioritize detection efficiency, but may reduce encoding detection accuracy',
|
||||||
|
rustAccel: 'Rust Acceleration',
|
||||||
|
rustAccelHint: 'Use the backend Rust extension to accelerate filtering, RSS, indexer parsing, and recognition hot paths',
|
||||||
|
rustAccelUnavailableHint: 'The backend Rust acceleration extension is not installed or loaded, so this cannot be enabled',
|
||||||
transferThreads: 'File Transfer Threads',
|
transferThreads: 'File Transfer Threads',
|
||||||
transferThreadsHint: 'Multi-threaded file transfer can improve speed but may increase system resource usage',
|
transferThreadsHint: 'Multi-threaded file transfer can improve speed but may increase system resource usage',
|
||||||
tokenizedSearch: 'Tokenized Search',
|
tokenizedSearch: 'Tokenized Search',
|
||||||
|
|||||||
@@ -1620,6 +1620,9 @@ export default {
|
|||||||
pluginLocalRepoPathsHint: '本地插件仓库目录,多个目录用英文逗号分隔,支持相对路径和绝对路径',
|
pluginLocalRepoPathsHint: '本地插件仓库目录,多个目录用英文逗号分隔,支持相对路径和绝对路径',
|
||||||
encodingDetectionPerformanceMode: '编码探测性能模式',
|
encodingDetectionPerformanceMode: '编码探测性能模式',
|
||||||
encodingDetectionPerformanceModeHint: '优先提升探测效率,但可能降低编码探测的准确性',
|
encodingDetectionPerformanceModeHint: '优先提升探测效率,但可能降低编码探测的准确性',
|
||||||
|
rustAccel: 'Rust 加速',
|
||||||
|
rustAccelHint: '启用后使用后端 Rust 扩展加速过滤、RSS、索引器和媒体识别等热路径',
|
||||||
|
rustAccelUnavailableHint: '当前后端未安装或未加载 Rust 加速扩展,无法启用',
|
||||||
transferThreads: '文件整理线程数',
|
transferThreads: '文件整理线程数',
|
||||||
transferThreadsHint: '多线程整理文件可以提高速度,但可能增加系统资源占用',
|
transferThreadsHint: '多线程整理文件可以提高速度,但可能增加系统资源占用',
|
||||||
tokenizedSearch: '分词搜索',
|
tokenizedSearch: '分词搜索',
|
||||||
|
|||||||
@@ -1621,6 +1621,9 @@ export default {
|
|||||||
pluginLocalRepoPathsHint: '本地插件倉庫目錄,多個目錄用英文逗號分隔,支持相對路徑和絕對路徑',
|
pluginLocalRepoPathsHint: '本地插件倉庫目錄,多個目錄用英文逗號分隔,支持相對路徑和絕對路徑',
|
||||||
encodingDetectionPerformanceMode: '編碼探測性能模式',
|
encodingDetectionPerformanceMode: '編碼探測性能模式',
|
||||||
encodingDetectionPerformanceModeHint: '優先提升探測效率,但可能降低編碼探測的準確性',
|
encodingDetectionPerformanceModeHint: '優先提升探測效率,但可能降低編碼探測的準確性',
|
||||||
|
rustAccel: 'Rust 加速',
|
||||||
|
rustAccelHint: '啟用後使用後端 Rust 擴展加速過濾、RSS、索引器和媒體識別等熱路徑',
|
||||||
|
rustAccelUnavailableHint: '當前後端未安裝或未加載 Rust 加速擴展,無法啟用',
|
||||||
transferThreads: '文件整理線程數',
|
transferThreads: '文件整理線程數',
|
||||||
transferThreadsHint: '多線程整理文件可以提高速度,但可能增加系統資源佔用',
|
transferThreadsHint: '多線程整理文件可以提高速度,但可能增加系統資源佔用',
|
||||||
tokenizedSearch: '分詞搜索',
|
tokenizedSearch: '分詞搜索',
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ const SystemSettings = ref<any>({
|
|||||||
// 实验室
|
// 实验室
|
||||||
PLUGIN_AUTO_RELOAD: false,
|
PLUGIN_AUTO_RELOAD: false,
|
||||||
PLUGIN_LOCAL_REPO_PATHS: '',
|
PLUGIN_LOCAL_REPO_PATHS: '',
|
||||||
|
RUST_ACCEL: true,
|
||||||
ENCODING_DETECTION_PERFORMANCE_MODE: true,
|
ENCODING_DETECTION_PERFORMANCE_MODE: true,
|
||||||
TRANSFER_THREADS: 1,
|
TRANSFER_THREADS: 1,
|
||||||
},
|
},
|
||||||
@@ -197,6 +198,7 @@ const advancedDialog = ref(false)
|
|||||||
|
|
||||||
const savingBasic = ref(false)
|
const savingBasic = ref(false)
|
||||||
const testingLlm = ref(false)
|
const testingLlm = ref(false)
|
||||||
|
const rustAccelAvailable = ref(false)
|
||||||
|
|
||||||
// 智能助手配置项较多,默认收起以降低基础设置页的视觉占用。
|
// 智能助手配置项较多,默认收起以降低基础设置页的视觉占用。
|
||||||
const aiAgentSettingsCollapsed = ref(true)
|
const aiAgentSettingsCollapsed = ref(true)
|
||||||
@@ -438,6 +440,10 @@ const canTestLlm = computed(() => {
|
|||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const rustAccelHint = computed(() =>
|
||||||
|
rustAccelAvailable.value ? t('setting.system.rustAccelHint') : t('setting.system.rustAccelUnavailableHint'),
|
||||||
|
)
|
||||||
|
|
||||||
const thinkingLevelItems = computed(() => [
|
const thinkingLevelItems = computed(() => [
|
||||||
{ title: t('setting.system.llmThinkingLevelOff'), value: 'off' },
|
{ title: t('setting.system.llmThinkingLevelOff'), value: 'off' },
|
||||||
{ title: t('setting.system.llmThinkingLevelAuto'), value: 'auto' },
|
{ title: t('setting.system.llmThinkingLevelAuto'), value: 'auto' },
|
||||||
@@ -618,6 +624,8 @@ async function loadSystemSettings() {
|
|||||||
if (result.data.hasOwnProperty(key)) (SystemSettings.value[sectionKey] as any)[key] = result.data[key]
|
if (result.data.hasOwnProperty(key)) (SystemSettings.value[sectionKey] as any)[key] = result.data[key]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
rustAccelAvailable.value = Boolean(result.data.RUST_ACCEL_AVAILABLE)
|
||||||
|
if (!rustAccelAvailable.value) SystemSettings.value.Advanced.RUST_ACCEL = false
|
||||||
SystemSettings.value.Basic.LLM_THINKING_LEVEL = resolveThinkingLevelValue(result.data)
|
SystemSettings.value.Basic.LLM_THINKING_LEVEL = resolveThinkingLevelValue(result.data)
|
||||||
await loadLlmProviders()
|
await loadLlmProviders()
|
||||||
}
|
}
|
||||||
@@ -699,6 +707,7 @@ async function testLlmConnection() {
|
|||||||
|
|
||||||
// 保存高级设置
|
// 保存高级设置
|
||||||
async function saveAdvancedSettings() {
|
async function saveAdvancedSettings() {
|
||||||
|
if (!rustAccelAvailable.value) SystemSettings.value.Advanced.RUST_ACCEL = false
|
||||||
cleanEmptyFields(SystemSettings.value.Advanced, ['LOG_FILE_FORMAT'])
|
cleanEmptyFields(SystemSettings.value.Advanced, ['LOG_FILE_FORMAT'])
|
||||||
|
|
||||||
// 同时保存高级设置和刮削开关设置
|
// 同时保存高级设置和刮削开关设置
|
||||||
@@ -2261,6 +2270,15 @@ watch(currentLlmSnapshotKey, (snapshotKey, previousSnapshotKey) => {
|
|||||||
persistent-hint
|
persistent-hint
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
|
<VCol cols="12" md="6">
|
||||||
|
<VSwitch
|
||||||
|
v-model="SystemSettings.Advanced.RUST_ACCEL"
|
||||||
|
:label="t('setting.system.rustAccel')"
|
||||||
|
:hint="rustAccelHint"
|
||||||
|
:disabled="!rustAccelAvailable"
|
||||||
|
persistent-hint
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
<VCol cols="12" md="6">
|
<VCol cols="12" md="6">
|
||||||
<VTextField
|
<VTextField
|
||||||
v-model.number="SystemSettings.Advanced.TRANSFER_THREADS"
|
v-model.number="SystemSettings.Advanced.TRANSFER_THREADS"
|
||||||
|
|||||||
Reference in New Issue
Block a user