fix(web): 修復 TypeScript 錯誤

- useCSRF: 修正 import 路徑 @/lib/env → @/lib/config
- terminal-telemetry: 新增 UNKNOWN_COMPONENT 錯誤碼

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
OG T
2026-03-28 19:06:44 +08:00
parent 6ca2efe27b
commit 26839227ff
2 changed files with 2 additions and 2 deletions

View File

@@ -29,7 +29,7 @@
import { useCallback, useEffect, useState } from "react";
import { getApiUrl } from "@/lib/env";
import { getApiUrl } from "@/lib/config";
interface CSRFTokenResponse {
token: string;

View File

@@ -73,7 +73,7 @@ export interface GenUIRenderEvent {
/** 錯誤訊息 */
error?: string
/** 錯誤分類碼 (Phase 19 首席架構師審查 P1 - 便於 Sentry 聚合) */
errorCode?: 'NOT_REGISTERED' | 'DEF_NOT_FOUND' | 'ZOD_VALIDATION_FAILED' | 'LEGACY_TYPE_MISMATCH' | 'RENDER_ERROR'
errorCode?: 'NOT_REGISTERED' | 'DEF_NOT_FOUND' | 'ZOD_VALIDATION_FAILED' | 'LEGACY_TYPE_MISMATCH' | 'RENDER_ERROR' | 'UNKNOWN_COMPONENT'
}
// =============================================================================