@cloud411716/fancy-webnovel 4.27.2 → 4.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,6 +25,8 @@ export function helpText() {
25
25
  /fancy-material <素材类型> 只生成指定类型,例如:/fancy-material 地名
26
26
  /fancy-material <题材> <素材类型> 自定义题材+素材类型,source=other,例如:/fancy-material 都市高武 地名
27
27
  /fancy-material <题材> all 生成该题材下全部 58 个 kind,source=other,例如:/fancy-material 都市高武 all
28
+ /fancy-material --style <key> ... 手动指定账号风格;多个用逗号分隔,例如 --style suci,crazy-fish
29
+ 不指定时按题材自动选 2-3 个兼容风格
28
30
  /fancy-material load <文件.jsonl> 导入 JSONL;导入前先校验格式
29
31
  /fancy-material init 创建/补齐素材库 schema、索引和查询/校验脚本
30
32
  /fancy-material remove 删除整个素材库(会二次确认)
@@ -43,6 +45,8 @@ export function helpText() {
43
45
  - 禁止用质量评价词做 tags:精品、高价值、文笔好、强力、神秘。
44
46
  - tags 和 genres 都是数组:tags 3–8 个,genres 1–5 个;一个素材可以同时适配多个题材/标签。
45
47
  - 每次运行:每个 kind 新增 50 条;每批最多 10 条,插件自动分批直到完成。
48
+ - 风格来源:内置风格库 + 数据库 douyin_style,按题材自动选 2-3 个;可用 --style 手动覆盖。
49
+ - 用 /fancy-douyin list 查看账号的 style_key、风格名和示例。
46
50
  - 未指定类型:${MATERIAL_KINDS.length} 个 kind 全部排队。
47
51
  - 题材来源:优先 _novel_topic.json,其次 _novel_topic_suggestion.json;都没有时弹框确认后使用内置全题材。
48
52
  - 指定类型:只生成指定 kind,题材来源不变,source=builtin。
@@ -134,6 +138,7 @@ export function generationPrompt({
134
138
  custom = null,
135
139
  customKindPending = false,
136
140
  sourceFixed = 'builtin',
141
+ styleSummary = '',
137
142
  }) {
138
143
  const lines = [];
139
144
  if (includeBase && base) {
@@ -144,6 +149,9 @@ export function generationPrompt({
144
149
  lines.push(...compactRules(genres, queryScript, workspace, sourceFixed), '');
145
150
  }
146
151
 
152
+ if (styleSummary) {
153
+ lines.push('## 本批风格锁定(必须保持)', '', styleSummary, '');
154
+ }
147
155
  lines.push('## 本次运行', '');
148
156
  lines.push('- 工作区目录:' + workspace);
149
157
  lines.push('- 目标文件(**绝对路径**):`' + target + '`');
@@ -253,6 +261,7 @@ export function generationRunText({
253
261
  batches = 0,
254
262
  total,
255
263
  progressFile,
264
+ styles = [],
256
265
  aborted = false,
257
266
  stopReason = '',
258
267
  }) {
@@ -279,6 +288,9 @@ export function generationRunText({
279
288
  lines.push('本次新增:' + importedTotal + ' 条');
280
289
  if (Number.isFinite(total)) lines.push('库中素材:' + total + ' 条');
281
290
  if (batches) lines.push('已导入批次:' + batches + ' 批');
291
+ if (Array.isArray(styles) && styles.length) {
292
+ lines.push('本次风格:' + styles.map((style) => `${style.style_key}(${style.style_name})`).join('、'));
293
+ }
282
294
  if (Number.isFinite(elapsedMs) && elapsedMs > 0) lines.push('耗时:' + formatDuration(elapsedMs));
283
295
  if (stopReason) lines.push('停止原因:' + stopReason);
284
296
  if (progressFile) lines.push('进度文件:' + progressFile);