fix(ui): 空catch块添加日志 + ErrorBoundary覆盖高风险组件
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled

空catch块修复 (12处, 6文件):
- ModelsAPI: 4处 localStorage 配置读写添加 console.warn
- VikingPanel: 2处 viking 操作添加日志
- Workspace/MCPServices/SaaSStatus/TOTPSettings: 各1-3处

ErrorBoundary新增覆盖:
- ChatArea: 两种UI模式均包裹(防白屏)
- RightPanel: 两种UI模式均包裹
- AuditLogsPanel/HeartbeatConfig/VikingPanel: 设置页包裹
This commit is contained in:
iven
2026-04-11 00:26:24 +08:00
parent 717f2eab4f
commit 9772d6ec94
7 changed files with 59 additions and 24 deletions

View File

@@ -50,7 +50,8 @@ export function VikingPanel() {
try {
const resources = await listVikingResources('');
setMemoryCount(resources.length);
} catch {
} catch (e) {
console.warn('[VikingPanel] Failed to list resources:', e);
setMemoryCount(null);
}
}
@@ -99,7 +100,8 @@ export function VikingPanel() {
try {
const fullContent = await readVikingResource(uri, 'L2');
setExpandedContent(fullContent);
} catch {
} catch (e) {
console.warn('[VikingPanel] Failed to read resource:', e);
setExpandedContent(null);
} finally {
setIsLoadingL2(false);