cortico-world-fun 0.7.6 → 0.7.7

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/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  市场按 `##` 标题里的版本号切段,显示在「历史版本」里。
4
4
 
5
+ ## 0.7.7
6
+
7
+ 两处面板体验修复:**从回忆开分支后直接落到「出游」**、**对话式出游的 4 个选项不再被裁成 3 个**。没有数据迁移,故事包格式、存储键与面板 id 都不变。
8
+
9
+ - **修:开分支后停在回忆页**。点「从最近可继续检查点开分支」原来只建出新 runId 并留一条提示,还得自己切到「出游」找这一趟;现在分支建好就直接跳到「出游」,没建出来(错误 / 回放拦截)才留在原地看提示,分支说明仍在顶部。
10
+ - **修:4 个选项只显示 3 个,而且不能下滑**。对话式出游底部选项区原来是 `flex:none`,卡片又是 `overflow:hidden`:4 个选项时整块溢出被裁掉,能滚的只有上面的正文区。现在选项区可收缩并在内部滚动,正文区让位(`flex:1 1 0`),卡片固定为 `min(74vh, 780px)`;窗口高度 ≤860px 时收起装饰性场景条与「此刻 · …」元信息行,优先保选项和正文。
11
+ - 测试:`webui/story/webui.test.mjs` 新增「开分支后直接落到出游」;布局用 headless Edge 在 905 / 805 / 705 / 605 / 505 五档视口实测——4 个选项在 ≥705px 全部可见,更矮时可滚动到第 4 个,卡片不再有被裁掉的内容。
12
+ - 版本号升到 0.7.7。
13
+
5
14
  ## 0.7.6
6
15
 
7
16
  共同决定(两席同票)的修复:**异票不再吞掉对方那一票**。没有数据迁移,故事包格式、存储键与面板 id 都不变。
package/README.md CHANGED
@@ -21,7 +21,7 @@
21
21
  - **出门时只读**:显示「出门中 · 某地(逛了 1/3)」,在房间里换姿势不会影响正在走的行程。
22
22
  - 素材规格、命名与十张贴图的对齐坐标见 [素材单](<E:/deep seek/素材单-鱼的家2D房间/素材单.md>)。
23
23
 
24
- ## 版本:0.4.4 → 0.7.6
24
+ ## 版本:0.4.4 → 0.7.7
25
25
 
26
26
  下游文档(用户手册、市场描述)一度停在 0.4.4,这里补一条线,细节仍以 [CHANGELOG.md](CHANGELOG.md) 为准:
27
27
 
@@ -32,6 +32,7 @@
32
32
  - **0.7.2** 是代码体检整改:六个只读故事查询加 10 分钟记忆化(重复问只回「没变化」,写操作立即失效,`full:true` 重取);工具说明与提示词瘦身(实发 schema 9,472 → 9,216,`ENV_PROMPT` 1,202 → 903);文字通道默认开,聊天里六个查询与开局推进都在,作者工具另有一个开关 `funStoryAuthorInChat`;`hmToMin` / `el()` / `feedback` 抽成共享模块,只读查询拆到 `src/story-read.js`。
33
33
  - **0.7.3** 是设置重组:故事长度、主持接口地址与模型、剧情图片来源搬进配置页(热改),旧 `story-node-limit.json` / `story-secrets.json` 密文里的地址与模型 / `story-images/settings.json` 的来源在首次启动时一次性迁移;「自动配图」开关移到出游页顶部;本地插画搬到「地点册 → 本地插画」;出游「设置」只剩「高级设置」(API Key、直连手动出图、自定义工作流)。面板 id 与页签名不变。
34
34
  - **0.7.4** 把地点册改成「左栏分组 + 右侧封面列表」:左栏「我的地点册」六项带计数(全部 / 可玩 / 只是地点 / 故事 / 我的 / 住所),「整理与设置」三项(住所与默认画风 / 本地插画 / 从小世界迁入);右栏搜索 + 分类 + 列表/卡片切换 + 封面缩略图行 + 「编辑地点」,窄屏左栏折成横向筛选。数据层、面板 id、编辑器与四个既有视图都不变。同一版把「允许她自己出门」改成只留许可:**不再有 `funHomeAutoSlots`,也不再推 `fun.home.free`**——几点算她自己的时间跟着「鱼的每一天」的「她自己的时间」走,那边叫醒她时她再按日程决定出不出门。`describe.json` 因此从 1 个事件变成 0 个。
35
+ - **0.7.7** 两处面板体验修复:从回忆「从最近可继续检查点开分支」建好后直接跳到「出游」,不用再自己找;对话式出游的底部选项区可滚动,4 个选项不再被裁成 3 个(矮屏收起装饰性场景条,卡片高度固定)。存储、故事包格式与面板 id 不变。
35
36
  - **0.7.6** 修共同决定(两席同票):异票时不再「只保留后投的那一票」,两票都留在票面上;空票面时两席都能先投,只剩一席没投时仍等那一席自己投,两票不一样时两席都能改自己那一票,改成一致才前进;异票僵住时也能直接回家。文字通道支持 `as: "fish"` 显式声明这一票是谁的(鱼先开口就记在她名下)。存储与故事包格式不变。
36
37
  - **0.7.5** 收掉故事工坊里重复的创建入口:标题条只留「+ 编写故事」,展开后是「选项式故事 / 自由场景包 / 从文件导入」三个起点;右侧「从一个小片段开始」栏删除(窄屏本来也看不到),「展开 / 收起」降成标题旁的小箭头。导入主路径改成选 `.json` 文件(单个 ≤ 32 KB,读完填进原文本框,可继续校验 / 预览 / 导入),粘贴保留;内容列收窄到 1040 居中。数据层、校验、隔离试玩与草稿保护不变。
37
38
  - **工具面**:共 24 个;默认只挂 23 个——文字通道默认开着,作者工具 `fun_story` 要另开「聊天里也能管故事」。关掉文字通道则只剩 17 个。六个只读故事查询有 10 分钟记忆化,同一参数重复问只回 `{ok:true, unchanged:true}` 短回执,任何写操作立即失效,`full:true` 可强制重取。
package/dist/webui.js CHANGED
@@ -1843,7 +1843,7 @@ function createStoryController(ctx, onChange = () => {
1843
1843
  return mutate("choose", { choiceId: current.pending.id, optionId, substitute: true, confirm: true });
1844
1844
  }
1845
1845
  async function fork(memoryId, checkpointId) {
1846
- if (!alive() || !state.ready || trip() || state.busy || state.recovering || !memoryId || !checkpointId) return;
1846
+ if (!alive() || !state.ready || trip() || state.busy || state.recovering || !memoryId || !checkpointId) return false;
1847
1847
  const forkToken = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 14)}`;
1848
1848
  state.error = "";
1849
1849
  state.notice = "";
@@ -1851,11 +1851,13 @@ function createStoryController(ctx, onChange = () => {
1851
1851
  emit();
1852
1852
  try {
1853
1853
  const snapshot = await call("fork", { memoryId, checkpointId, forkToken });
1854
- if (!alive()) return;
1854
+ if (!alive()) return false;
1855
1855
  apply(snapshot);
1856
1856
  state.notice = "已从已验证检查点创建新 runId。源回忆与预算保留;此分支不写入正史探索、心愿或收藏。";
1857
+ return Boolean(snapshot?.trip);
1857
1858
  } catch (error) {
1858
1859
  if (alive()) state.error = description(error);
1860
+ return false;
1859
1861
  } finally {
1860
1862
  state.busy = "";
1861
1863
  emit();
@@ -2169,16 +2171,19 @@ var STYLES = `
2169
2171
  .sw-trash{margin-top:18px}.sw-trash>summary{cursor:pointer;font-size:12px;color:var(--sw-muted);padding:9px 0;list-style:none}.sw-trash>summary::-webkit-details-marker{display:none}.sw-trash>summary:before{content:'›';display:inline-block;margin-right:6px;transition:transform .15s}.sw-trash[open]>summary:before{transform:rotate(90deg)}.sw-trash-body{margin-top:8px}.sw-trash-list{display:flex;flex-direction:column;gap:10px;margin:10px 0}.sw-trash-row{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap;border-top:1px dashed var(--sw-line);padding-top:10px}.sw-trash-row:first-child{border-top:0;padding-top:0}.sw-trash-meta{display:flex;flex-direction:column;gap:3px;min-width:0}.sw-trash-meta small{color:var(--sw-muted);font-size:10px}.sw-trash-meta .sw-badge{align-self:flex-start}
2170
2172
  .sw-free-log{list-style:none;padding:0;margin:0}.sw-free-log li+li{border-top:1px dashed var(--sw-line);padding-top:14px;margin-top:14px}.sw-free-log small{display:block;color:var(--sw-muted);font-size:10px;margin-bottom:5px}.sw-free-say{font-size:13px;color:var(--sw-green);margin-bottom:6px;overflow-wrap:anywhere}.sw-free-state .sw-story-meta{margin-top:6px}.sw-free-input{width:100%;min-height:76px;resize:vertical;font:inherit;font-size:13px;line-height:1.7;padding:10px 12px;border:1px solid var(--sw-line);border-radius:9px;background:var(--sw-paper);color:var(--sw-ink)}.sw-free-compose{align-items:flex-start}.sw-free-compose .sw-stack{flex:1;min-width:min(100%,260px)}
2171
2173
  /* 出游页 · 对话式(默认):头尾钉住,只有中间那段滚 */
2172
- .sw-play{--sw-play-h:min(68vh,760px)}
2173
- .sw-play>article.sw-card{display:flex;flex-direction:column;min-height:0;max-height:var(--sw-play-h);overflow:hidden}
2174
+ .sw-play{--sw-play-h:min(74vh,780px)}
2175
+ .sw-play>article.sw-card{display:flex;flex-direction:column;min-height:0;height:var(--sw-play-h);overflow:hidden}
2174
2176
  .sw-play .sw-play-head{flex:none}
2175
2177
  .sw-play .sw-play-context{flex:none;display:flex;gap:7px;align-items:center;padding:0 22px 10px;color:var(--sw-muted);font-size:11px}
2176
2178
  .sw-dot-sep{opacity:.5}
2177
2179
  .sw-play .sw-play-strip{flex:none;height:84px;min-height:84px;aspect-ratio:auto;border-radius:0}
2178
2180
  .sw-play .sw-play-strip .sw-scene-label{bottom:12px;left:18px;right:18px}
2179
2181
  .sw-play .sw-play-strip .sw-scene-label h2{font-size:16px;margin:0}
2180
- .sw-play .sw-reading{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-bottom:10px;-webkit-mask-image:linear-gradient(180deg,transparent 0,#000 18px);mask-image:linear-gradient(180deg,transparent 0,#000 18px)}
2181
- .sw-play .sw-play-action{flex:none;display:flex;flex-direction:column;gap:7px;padding:13px 22px 12px;border-top:1px solid var(--sw-line);background:color-mix(in srgb,var(--sw-green) 4%,var(--sw-paper))}
2182
+ .sw-play .sw-reading{flex:1 1 0;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-bottom:10px;-webkit-mask-image:linear-gradient(180deg,transparent 0,#000 18px);mask-image:linear-gradient(180deg,transparent 0,#000 18px)}
2183
+ .sw-play .sw-play-action{flex:0 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;display:flex;flex-direction:column;gap:7px;padding:13px 22px 12px;border-top:1px solid var(--sw-line);background:color-mix(in srgb,var(--sw-green) 4%,var(--sw-paper))}
2184
+ /* 选项多(v2 最多 4 个)或窗口矮时:先收装饰性的场景条与一行元信息,让选项和正文都有地方;
2185
+ 底部这一块自己滚,绝不裁掉最后一个选项。 */
2186
+ @media (max-height:860px){.sw-play .sw-play-strip,.sw-play .sw-play-context{display:none}}
2182
2187
  .sw-play .sw-play-action .sw-choices{margin-top:0}
2183
2188
  .sw-play .sw-play-action .sw-prose{font-size:13px;line-height:1.8;max-width:none}
2184
2189
  .sw-play .sw-play-foot{flex:none}
@@ -3201,7 +3206,10 @@ function mountPanel(root, ctx) {
3201
3206
  const forkable = (memory.checkpoints ?? []).filter((checkpoint) => checkpoint.resumable === true);
3202
3207
  if (forkable.length && !state.snapshot.trip) actions.push(button("从最近可继续检查点开分支", () => {
3203
3208
  const checkpoint = forkable.at(-1);
3204
- if (checkpoint) void controller.fork(memory.id, checkpoint.id);
3209
+ if (!checkpoint) return;
3210
+ void controller.fork(memory.id, checkpoint.id).then((created) => {
3211
+ if (created && !disposed) navigate("play");
3212
+ });
3205
3213
  }, { small: true, key: `fork-${memory.id}` }));
3206
3214
  actions.push(button("移到回收站", () => void removeMemory(memory), { small: true, quiet: true, danger: true, key: `delete-${memory.id}` }));
3207
3215
  return node("article", { class: "sw-card sw-memory" }, node(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cortico-world-fun",
3
- "version": "0.7.6",
3
+ "version": "0.7.7",
4
4
  "type": "module",
5
5
  "description": "从0开始的肥鱼大冒险 —— 给 Coopanion 桌宠二十处真能去逛的地方:游乐场、海洋馆、庙会、漫展、电影院、动物园、公园、电玩城、KTV、博物馆、猫咖、爬山、咖啡店、奶茶店、餐厅、图书馆、夜市、澡堂、旧货市场、江边。进门、逛摊位、买纪念品、拍张照、吃喝点什么,回家记一笔。\n\n七个面板:家(2D 房间、十个活动)、去哪儿(此刻推荐)、地点册(唯一的编辑器)、出游(当前这一趟与故事)、纪念册、纪念品架、故事工坊。故事可以自己写:选项式一步一选,自由场景包交给主持即兴演;双人故事里的共同决定要两席同票才前进。24 个工具、0 个事件,数据全部存在本机 fun/ 目录。\n\n能和「鱼的每一天」「生图工作室」联动,但都不依赖;「鱼的小世界」已并入这里,地点与房间就是本插件的「地点册」与「家」,不必再装两个包。",
6
6
  "license": "MIT",