fix(#584: 移动SMART_MATCH_REASONS到组件外修复eslint warning
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 1m3s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 2m50s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 4m0s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 20s
AI Code Review / AI Code Review (pull_request) Successful in 6m37s
CI/CD Pipeline / Integration Tests (pull_request) Failing after 1399h9m7s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 1399h9m34s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 1399h9m34s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 1399h9m35s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 1399h9m35s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 1399h9m36s
CI/CD Pipeline / Unit Tests (pull_request) Failing after 1399h9m8s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 1399h9m36s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 1399h9m37s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 1399h9m37s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 1399h9m37s
CI/CD Pipeline / Check if frontend-only change (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Failing after 1399h41m41s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 1399h41m43s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 1399h41m43s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 1399h41m16s

- 将SMART_MATCH_REASONS常量移到组件外部,消除react-hooks/exhaustive-deps警告
This commit is contained in:
2026-07-20 08:19:37 +08:00
parent 856647a4e5
commit 31da58f153
+15 -10
View File
@@ -238,6 +238,21 @@ function getActivePreset(settings: TitleSettings): string | null {
return null
}
/* ================================================================
常量
================================================================ */
const SMART_MATCH_REASONS = [
"画面清晰度高,构图专业",
"与描述场景高度契合",
"时长适中,适合剪辑节奏",
"色彩风格统一",
"包含关键动作镜头",
"镜头运动流畅自然",
"光影效果出色",
"人物表情生动",
]
/* ================================================================
组件
================================================================ */
@@ -484,16 +499,6 @@ const GeneratePage: React.FC = () => {
})
/* ── 智能素材匹配 ── */
const SMART_MATCH_REASONS = [
"画面清晰度高,构图专业",
"与描述场景高度契合",
"时长适中,适合剪辑节奏",
"色彩风格统一",
"包含关键动作镜头",
"镜头运动流畅自然",
"光影效果出色",
"人物表情生动",
]
const handleSmartMatch = useCallback(async () => {
if (!smartMatchInput.trim()) {