效果优化

This commit is contained in:
董宏凯 committed 2026-05-19 18:10:15 +08:00
1 parent 2402a84c71
commit ab85e4df72
15 files changed
+548 -35

No files matched your search

@@ -37,6 +37,7 @@ export function AIWritingForm({ onSubmit, disabled }: AIWritingFormProps) {
const [audience, setAudience] = useState('普通读者');
const [wordCountInput, setWordCountInput] = useState('800');
const [keywordCountInput, setKeywordCountInput] = useState('6');
const [strictMode, setStrictMode] = useState(false);
const [modelName, setModelName] = useState('');
const [models, setModels] = useState<ModelOption[]>([]);
@@ -116,6 +117,7 @@ export function AIWritingForm({ onSubmit, disabled }: AIWritingFormProps) {
targetAudience: audience.trim() || '普通读者',
wordCountTarget: wordCount,
keywordCount,
writingMode: strictMode ? 'strict' : 'loose',
modelName: modelName || undefined,
});
}
@@ -190,6 +192,23 @@ export function AIWritingForm({ onSubmit, disabled }: AIWritingFormProps) {
</p>
</div>
<div className="flex items-start gap-2 rounded-md border bg-muted/20 px-3 py-2">
<input
type="checkbox"
id="strict-mode"
checked={strictMode}
onChange={(e) => setStrictMode(e.target.checked)}
disabled={disabled}
className="mt-0.5 size-3.5 shrink-0 accent-primary cursor-pointer"
/>
<label htmlFor="strict-mode" className="cursor-pointer select-none">
<span className="text-xs font-medium text-foreground/80">严格依据素材写作</span>
<p className="text-[11px] text-muted-foreground/70 mt-0.5 leading-relaxed">
勾选后作家只依据检索素材写作,素材不足以支撑某章节时会暂停询问你;不勾选则可结合通用知识补充论述。
</p>
</label>
</div>
<div className="space-y-1.5">
<label className="text-xs font-medium text-muted-foreground">目标读者</label>
<input