dsh-novel-generator 0.1.28 → 0.1.29
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.
- package/README.md +1 -0
- package/index.js +31 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,6 +37,7 @@ dsh plugin --profile web add dsh-novel-generator
|
|
|
37
37
|
- 也不收录上一份快照已经收录过的章节(`结束日 < 上一快照日` 的跳过),所以**每一章恰好被一份快照收录一次**。
|
|
38
38
|
- 例:间隔 30、章节各 10 天 → 第 30 天快照收录第 1、2 章;第 60 天快照收录第 3、4、5 章。
|
|
39
39
|
- 这样改间隔不会把旧快照重排:网格随当前间隔移动,自动生成只沿着链条向前推进,断档的地方留给你手动补。
|
|
40
|
+
- **空段落点不调用模型**:如果某个网格点没有可收录的章节(例如一章就占满整个间隔),插件直接把上一版快照抄过来、注明"这段时间没有已写章节",既省一次模型调用,也避免模型凭空编出世界设定——那种编造会污染后续所有章节的提示。落点那一章不会因此丢失:写下一章时它照样出现在「已发生的章节梗概」里。
|
|
40
41
|
- 同一部作品同一时间只跑一个快照任务,避免并发把同一个点重复生成。
|
|
41
42
|
|
|
42
43
|
- **重置**:时间线右上角的「重置快照」会清空全部快照,再按当前间隔从第 1 格逐格重建到故事末端(确认框里写明要生成几份)。
|
package/index.js
CHANGED
|
@@ -1499,7 +1499,7 @@ async function bootstrap(ctx, root) {
|
|
|
1499
1499
|
}
|
|
1500
1500
|
}
|
|
1501
1501
|
return {
|
|
1502
|
-
revision: '2026-10-27.
|
|
1502
|
+
revision: '2026-10-27.17',
|
|
1503
1503
|
projects,
|
|
1504
1504
|
models: {
|
|
1505
1505
|
default: modelCatalog.default || null,
|
|
@@ -2333,6 +2333,36 @@ function registerSnapshot(ctx, root, registry, projectId, targetDay) {
|
|
|
2333
2333
|
const project = await readProject(root, projectId);
|
|
2334
2334
|
const base = (project.snapshots || []).filter((snapshot) => snapshot.day < point).pop() || null;
|
|
2335
2335
|
const chapters = chaptersForPoint(project, base ? base.day : 0, point);
|
|
2336
|
+
// A point whose stretch holds no chapter is a blank update: carry the
|
|
2337
|
+
// previous snapshot forward verbatim instead of asking the model to invent
|
|
2338
|
+
// a world out of nothing — that invented text would then feed every later
|
|
2339
|
+
// chapter. No material, no call.
|
|
2340
|
+
if (chapters.length === 0) {
|
|
2341
|
+
const carried = {
|
|
2342
|
+
snapshotId: randomUUID(),
|
|
2343
|
+
day: point,
|
|
2344
|
+
createdAt: Date.now(),
|
|
2345
|
+
unitDays: unit,
|
|
2346
|
+
world: (base && base.world) || '',
|
|
2347
|
+
characters: (base && base.characters) || [],
|
|
2348
|
+
factions: (base && base.factions) || [],
|
|
2349
|
+
relations: (base && base.relations) || [],
|
|
2350
|
+
items: (base && base.items) || [],
|
|
2351
|
+
events: (base && base.events) || [],
|
|
2352
|
+
summary: base
|
|
2353
|
+
? `第 ${base.day} 天至第 ${point} 天之间没有已写章节,沿用上一版设定。`
|
|
2354
|
+
: `第 ${point} 天之前还没有已写章节。`,
|
|
2355
|
+
};
|
|
2356
|
+
await mutateProject(root, projectId, (draft) => {
|
|
2357
|
+
draft.snapshots = (draft.snapshots || []).filter((entry) => entry.day !== point);
|
|
2358
|
+
draft.snapshots.push(carried);
|
|
2359
|
+
draft.snapshots.sort((a, b) => a.day - b.day);
|
|
2360
|
+
return carried;
|
|
2361
|
+
});
|
|
2362
|
+
await exportSnapshot(project, carried);
|
|
2363
|
+
made.push(point);
|
|
2364
|
+
continue;
|
|
2365
|
+
}
|
|
2336
2366
|
job.message = `正在生成第 ${point} 天的世界快照(第 ${made.length + 1}/${points.length} 份,目标第 ${target} 天)`;
|
|
2337
2367
|
const reply = await askAgent(ctx, root, project, snapshotPrompt(project, base, chapters, point), (note) => {
|
|
2338
2368
|
job.message = note;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-novel-generator",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.29",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Novel studio for DeepSeek Harness: a draggable story timeline, world snapshots, chapter outlines, and chapters written by the work's own agent.",
|
|
6
6
|
"license": "MIT",
|