feat(setting): 实验室新增目录监控与本地文件操作隔离相关配置 (#670)

* feat(setting): 实验室新增网络存储快速监控开关

在高级设置->实验室暴露后端 MONITOR_NETWORK_FAST_MODE 配置:允许
网络/FUSE 挂载目录使用内核通知的快速监控模式。附风险提示文案
(挂载不支持文件变更通知时开启会漏文件,修改后重启生效),
三语言文案同步。

* docs(setting): 快速监控开关文案更新为保存即时生效

* feat(setting): 实验室新增整理失败重试次数

在高级设置->实验室暴露后端 TRANSFER_MAX_FAILED_RETRIES:自动整理失败后
允许重试的最大次数,避免一次网络或识别抖动让文件永久漏整理;次数用尽后
需手动整理或删除整理记录。取值 1-10,整理成功或删除记录时计数清零。
三语言文案同步。

* feat(setting): 实验室新增本地文件操作隔离相关配置

配合后端把本地文件的读取、复制、移动与删除放进可强杀的子进程执行:
CloudDrive2 等 FUSE 挂载失去响应时,这类系统调用会永久卡住且无法中断,
进而拖死整理队列与目录监控。

- FS_PROXY_ENABLED:隔离开关,关闭后退回直接调用,行为与旧版一致
- FS_PROXY_TIMEOUT:读属性/列目录/删除/重命名等快操作的超时
- FS_PROXY_STALL_TIMEOUT:复制时允许「完全没有进度」的最长时间

两个超时项随开关 v-if 显隐——隔离关闭时它们不生效,继续显示只会误导。
停滞超时的提示特意说明判据是「进度是否推进」而非总耗时,避免用户以为
复制大文件会被 120 秒打断。

---------

Co-authored-by: Your Name <you@example.com>
Co-authored-by: Aqr-K <Aqr-K@users.noreply.github.com>
This commit is contained in:
Aqr-K
2026-08-13 08:16:20 +08:00
committed by GitHub
co-authored by Your Name Aqr-K
parent 2c4b859729
commit e4b1ba34e1
4 changed files with 100 additions and 0 deletions
@@ -134,6 +134,11 @@ const SystemSettings = ref<any>({
RUST_ACCEL: false,
ENCODING_DETECTION_PERFORMANCE_MODE: true,
TRANSFER_THREADS: 1,
MONITOR_NETWORK_FAST_MODE: false,
TRANSFER_MAX_FAILED_RETRIES: 3,
FS_PROXY_ENABLED: true,
FS_PROXY_TIMEOUT: 30,
FS_PROXY_STALL_TIMEOUT: 120,
},
})
@@ -2544,6 +2549,40 @@ watch(currentLlmSnapshotKey, (snapshotKey, previousSnapshotKey) => {
prepend-inner-icon="mdi-swap-horizontal"
/>
</VCol>
<VCol cols="12" md="6">
<VTextField
v-model.number="SystemSettings.Advanced.TRANSFER_MAX_FAILED_RETRIES"
:label="t('setting.system.transferMaxFailedRetries')"
:hint="t('setting.system.transferMaxFailedRetriesHint')"
persistent-hint
type="number"
min="1"
max="10"
prepend-inner-icon="mdi-refresh-alert"
/>
</VCol>
<VCol v-if="SystemSettings.Advanced.FS_PROXY_ENABLED" cols="12" md="6">
<VTextField
v-model.number="SystemSettings.Advanced.FS_PROXY_TIMEOUT"
:label="t('setting.system.fsProxyTimeout')"
:hint="t('setting.system.fsProxyTimeoutHint')"
persistent-hint
type="number"
min="5"
prepend-inner-icon="mdi-timer-outline"
/>
</VCol>
<VCol v-if="SystemSettings.Advanced.FS_PROXY_ENABLED" cols="12" md="6">
<VTextField
v-model.number="SystemSettings.Advanced.FS_PROXY_STALL_TIMEOUT"
:label="t('setting.system.fsProxyStallTimeout')"
:hint="t('setting.system.fsProxyStallTimeoutHint')"
persistent-hint
type="number"
min="10"
prepend-inner-icon="mdi-timer-alert-outline"
/>
</VCol>
</VRow>
<VRow>
<VCol cols="12" md="6">
@@ -2554,6 +2593,14 @@ watch(currentLlmSnapshotKey, (snapshotKey, previousSnapshotKey) => {
persistent-hint
/>
</VCol>
<VCol cols="12" md="6">
<VSwitch
v-model="SystemSettings.Advanced.FS_PROXY_ENABLED"
:label="t('setting.system.fsProxyEnabled')"
:hint="t('setting.system.fsProxyEnabledHint')"
persistent-hint
/>
</VCol>
<VCol cols="12" md="6">
<VSwitch
v-model="SystemSettings.Advanced.ENCODING_DETECTION_PERFORMANCE_MODE"
@@ -2571,6 +2618,14 @@ watch(currentLlmSnapshotKey, (snapshotKey, previousSnapshotKey) => {
persistent-hint
/>
</VCol>
<VCol cols="12" md="6">
<VSwitch
v-model="SystemSettings.Advanced.MONITOR_NETWORK_FAST_MODE"
:label="t('setting.system.monitorNetworkFastMode')"
:hint="t('setting.system.monitorNetworkFastModeHint')"
persistent-hint
/>
</VCol>
</VRow>
</div>
</VWindowItem>