diff --git a/src/components/DeepLinkImportDialog.tsx b/src/components/DeepLinkImportDialog.tsx index 05acafa89..49299eb7c 100644 --- a/src/components/DeepLinkImportDialog.tsx +++ b/src/components/DeepLinkImportDialog.tsx @@ -17,6 +17,12 @@ import { PromptConfirmation } from "./deeplink/PromptConfirmation"; import { McpConfirmation } from "./deeplink/McpConfirmation"; import { SkillConfirmation } from "./deeplink/SkillConfirmation"; import { ProviderIcon } from "./ProviderIcon"; +import { + classifyEndpoint, + classifyEnvKey, + maskValue, + riskI18nKey, +} from "@/utils/deeplinkRisk"; interface DeeplinkError { url: string; @@ -277,16 +283,28 @@ export function DeepLinkImportDialog() { } }, [request?.config, request?.app]); - // Helper to mask sensitive values - const maskValue = (key: string, value: string): string => { - const sensitiveKeys = ["TOKEN", "KEY", "SECRET", "PASSWORD"]; - const isSensitive = sensitiveKeys.some((k) => - key.toUpperCase().includes(k), + /** + * env 行:值经 `maskValue` 脱敏,键命中加载器控制变量时标记。 + * + * `break-all` 而非 `truncate`——被截断的值等于没展示。 + */ + const EnvRow = ({ envKey, value }: { envKey: string; value: string }) => { + const risk = classifyEnvKey(envKey); + return ( +