From 44b0b8a7f0fc6116464f78877994642c5aca96e5 Mon Sep 17 00:00:00 2001 From: Yaojia Wang Date: Tue, 7 Jul 2026 19:51:19 +0200 Subject: [PATCH] =?UTF-8?q?feat(frontend):=20AI=E5=86=99=E4=BD=9C=E4=B8=89?= =?UTF-8?q?=E6=A7=BD=E2=80=94=E2=80=94=E6=96=87=E9=A3=8E=20/=20=E5=89=A7?= =?UTF-8?q?=E6=83=85=E9=9C=80=E6=B1=82=20/=20=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E8=A6=81=E6=B1=82=EF=BC=8C=E5=86=99=E7=AB=A0=E5=89=8D=E6=8C=89?= =?UTF-8?q?=E9=9C=80=E7=BB=84=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase 2(写作工作台重构):把写章指令升级为三槽——文风预设 + 新增剧情需求预设 (打脸反转/章末钩子/高潮/转折/扮猪吃虎,源自 plan §4.2 分类法,tianyayu6/oh-story MIT) + 自定义自由文本。三者经 composeDirective 合并为单条 directive→volatile(MVP 纯前端、 零契约、不动 write_craft.md 字节,金标准零回归)。DirectivePanel 拆成文风/剧情两组 chips。 --- apps/web/components/workbench/Workbench.tsx | 77 +++++++++++++++------ apps/web/lib/workbench/directive.test.ts | 14 +++- apps/web/lib/workbench/directive.ts | 32 ++++++--- 3 files changed, 91 insertions(+), 32 deletions(-) diff --git a/apps/web/components/workbench/Workbench.tsx b/apps/web/components/workbench/Workbench.tsx index 8a348ca..28d4b84 100644 --- a/apps/web/components/workbench/Workbench.tsx +++ b/apps/web/components/workbench/Workbench.tsx @@ -33,7 +33,12 @@ import { WORKBENCH_CHAPTER_NO, type ChapterEntry, } from "@/lib/workbench/chapter"; -import { composeDirective, STYLE_PRESETS } from "@/lib/workbench/directive"; +import { + composeDirective, + PLOT_PRESETS, + STYLE_PRESETS, + type Preset, +} from "@/lib/workbench/directive"; import { applyRefinement } from "@/lib/workbench/refineApply"; import { buttonClass } from "@/lib/ui/variants"; import { ChapterList, ChapterListContent } from "./ChapterList"; @@ -381,11 +386,23 @@ function DirectivePanel({
+ +