Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.

Commit c746c33

Browse files
committed
feat(admin): add translation review section to AI settings
Expose enableTranslationReview, translationReviewModel, and translationReviewScoreThreshold in the AI settings page so users can configure the writer → reviewer → editor translation pipeline.
1 parent c03b0a4 commit c746c33

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

apps/admin/src/views/setting/tabs/sections/ai-config.tsx

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ interface AIConfig {
5656
writerModel?: AIModelAssignment
5757
commentReviewModel?: AIModelAssignment
5858
translationModel?: AIModelAssignment
59+
translationReviewModel?: AIModelAssignment
5960
insightsModel?: AIModelAssignment
6061
insightsTranslationModel?: AIModelAssignment
6162
enableSummary: boolean
@@ -66,6 +67,8 @@ interface AIConfig {
6667
enableTranslation?: boolean
6768
enableAutoGenerateTranslation?: boolean
6869
translationTargetLanguages?: string[]
70+
enableTranslationReview?: boolean
71+
translationReviewScoreThreshold?: number
6972
enableInsights?: boolean
7073
enableAutoGenerateInsightsOnCreate?: boolean
7174
enableAutoGenerateInsightsOnUpdate?: boolean
@@ -859,6 +862,15 @@ export const AIConfigSection = defineComponent({
859862
onUpdate={(a) => updateConfig({ translationModel: a })}
860863
/>
861864

865+
<AIModelAssignmentRow
866+
label="翻译审稿"
867+
description="用于审稿与修订翻译的模型,留空则复用翻译模型"
868+
assignment={config.value.translationReviewModel}
869+
providers={config.value.providers || []}
870+
providerModels={providerModels.value || {}}
871+
onUpdate={(a) => updateConfig({ translationReviewModel: a })}
872+
/>
873+
862874
<AIModelAssignmentRow
863875
label="精读生成"
864876
description="用于生成长篇精读的模型"
@@ -1060,6 +1072,38 @@ export const AIConfigSection = defineComponent({
10601072
disabled={!config.value.enableTranslation}
10611073
/>
10621074
</SettingsRow>
1075+
1076+
<SettingsRow
1077+
title="启用翻译审稿"
1078+
description="开启后走 writer → reviewer → editor 流水线:reviewer 按本地化规范评分,低于阈值时由 editor 修订有问题的段落"
1079+
>
1080+
<NSwitch
1081+
value={config.value.enableTranslationReview}
1082+
onUpdateValue={(v: boolean) =>
1083+
updateConfig({ enableTranslationReview: v })
1084+
}
1085+
disabled={!config.value.enableTranslation}
1086+
/>
1087+
</SettingsRow>
1088+
1089+
<SettingsRow
1090+
title="审稿评分阈值"
1091+
description="reviewer 评分(0-100)≥ 阈值时直接落盘,低于阈值触发 editor 修订。默认 85"
1092+
>
1093+
<NInputNumber
1094+
value={config.value.translationReviewScoreThreshold ?? 85}
1095+
min={0}
1096+
max={100}
1097+
step={5}
1098+
onUpdateValue={(v) =>
1099+
updateConfig({ translationReviewScoreThreshold: v ?? 85 })
1100+
}
1101+
disabled={
1102+
!config.value.enableTranslation ||
1103+
!config.value.enableTranslationReview
1104+
}
1105+
/>
1106+
</SettingsRow>
10631107
</SettingsSection>
10641108
</div>
10651109
)

0 commit comments

Comments
 (0)