dsh-game-material-master 0.9.0 → 0.9.1

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.en.md CHANGED
@@ -12,7 +12,10 @@ third-party service.
12
12
  [![npm](https://img.shields.io/npm/v/dsh-game-material-master?color=blue)](https://www.npmjs.com/package/dsh-game-material-master)
13
13
  [![license](https://img.shields.io/badge/license-MIT-green)](LICENSE)
14
14
 
15
- > **🆕 What's new in 0.9.0**: an eighth module, [**Sound effects**](#-sound-effects-volcengine-seed-audio)
15
+ > **🆕 0.9.1 fixes**: the sound-effect job list now refreshes after polling completes (no more "0 takes · ⏳"
16
+ > stuck forever), and Volcengine network errors include the underlying cause instead of a bare `fetch failed`.
17
+ >
18
+ > **0.9.0 update**: an eighth module, [**Sound effects**](#-sound-effects-volcengine-seed-audio)
16
19
  > (Volcengine Seed-Audio: one prompt → sound effects / ambience / character voices, with an optional reference
17
20
  > image or audio; every run is billed; up to 120 seconds). The 0.8.0 **music generation / compose mode**,
18
21
  > map editor **Generate with AI / stamps**, **local ComfyUI** backend and **DSH 0.2.1** support remain.
@@ -359,7 +362,7 @@ dsh plugin --profile web add /path/to/dsh-game-material-master
359
362
  ```
360
363
 
361
364
  The package is published to npm: [dsh-game-material-master](https://www.npmjs.com/package/dsh-game-material-master)
362
- (currently `0.9.0`, `latest`). It has no runtime dependencies, so `dsh plugin add` is all you need.
365
+ (currently `0.9.1`, `latest`). It has no runtime dependencies, so `dsh plugin add` is all you need.
363
366
 
364
367
  **DSH version**: `>=0.2.0-rc.2 <0.3.0` (the `engines.dsh` field; since DSH 0.2.1 the plugin manager checks it first).
365
368
  When a Web deployment uses `--public-url https://host/prefix/`, deep links and asset URLs include that path prefix.
package/README.md CHANGED
@@ -10,7 +10,10 @@
10
10
  [![npm](https://img.shields.io/npm/v/dsh-game-material-master?color=blue)](https://www.npmjs.com/package/dsh-game-material-master)
11
11
  [![license](https://img.shields.io/badge/license-MIT-green)](LICENSE)
12
12
 
13
- > **🆕 0.9.0 更新**:新增第八个模块 [**音效生成**](#-音效生成火山引擎-seed-audio)(火山引擎 Seed-Audio:
13
+ > **🆕 0.9.1 修复**:音效生成任务在轮询完成后会同步刷新左侧列表(不再停在「0 条 · ⏳」);
14
+ > 火山引擎网络错误会带出底层原因,不再是只有一句 `fetch failed`。
15
+ >
16
+ > **0.9.0 更新**:新增第八个模块 [**音效生成**](#-音效生成火山引擎-seed-audio)(火山引擎 Seed-Audio:
14
17
  > 一句话描述 → 音效 / 环境音 / 角色配音,可带参考图或参考音频,每次生成真实计费,单次最长 120 秒)。
15
18
  > 上一版 0.8.0 的 **音乐生成编辑 / 谱曲模式**、地图编辑器 **AI 生成素材 / 整图**、**本地 ComfyUI**
16
19
  > 与 **DSH 0.2.1** 适配继续保留。
@@ -296,7 +299,7 @@ dsh plugin --profile web add /path/to/dsh-game-material-master
296
299
  ```
297
300
 
298
301
  包已发布到 npm:[dsh-game-material-master](https://www.npmjs.com/package/dsh-game-material-master)
299
- (当前 `0.9.0`,`latest`)。本包没有运行时依赖,`dsh plugin add` 拉下来即可用。
302
+ (当前 `0.9.1`,`latest`)。本包没有运行时依赖,`dsh plugin add` 拉下来即可用。
300
303
 
301
304
  **DSH 版本**:`>=0.2.0-rc.2 <0.3.0`(`package.json` 的 `engines.dsh`;DSH 0.2.1 起插件管理器优先按它判断兼容性)。
302
305
  Web 部署用 `--public-url https://host/prefix/` 时,深链接与产物地址会跟着补路径前缀。
package/lib/client.js CHANGED
@@ -10619,6 +10619,28 @@ window.__ModuleLoader__.load({
10619
10619
  return undefined;
10620
10620
  setJob(next);
10621
10621
  setJobId(id);
10622
+ // 左侧列表也要跟着轮询更新:只刷新详情的话,生成完成后列表会一直停在
10623
+ // 「0 条 · ⏳」,用户会以为任务没跑完。
10624
+ setJobs((current) => {
10625
+ const takes = Array.isArray(next.takes) ? next.takes : [];
10626
+ const latest = takes[takes.length - 1];
10627
+ const summary = {
10628
+ id: next.id,
10629
+ name: next.name,
10630
+ createdAt: next.createdAt,
10631
+ updatedAt: next.updatedAt,
10632
+ status: next.status,
10633
+ busy: next.busy === true,
10634
+ takes: takes.length,
10635
+ latestDuration: latest?.duration ?? null,
10636
+ format: latest?.format ?? null,
10637
+ reviewMode: next.reviewMode ?? null
10638
+ };
10639
+ const exists = current.some((entry) => entry.id === next.id);
10640
+ return exists
10641
+ ? current.map((entry) => (entry.id === next.id ? { ...entry, ...summary } : entry))
10642
+ : [summary, ...current];
10643
+ });
10622
10644
  const force = loadedDraft.current.jobId !== next.id;
10623
10645
  const nextPrompt = typeof next.prompt === "string" ? next.prompt : "";
10624
10646
  const nextSettings = sfxSettingsOf(next);
package/lib/sfxapi.js CHANGED
@@ -308,7 +308,8 @@ export async function generateSfx(config, request, signal) {
308
308
  }
309
309
  if (composed.aborted)
310
310
  throw new SfxApiError("生成已取消(远端可能仍会完成并计费)");
311
- throw new SfxApiError(`请求火山引擎失败:${error instanceof Error ? error.message : String(error)}`);
311
+ const cause = error instanceof Error && error.cause instanceof Error ? `(${error.cause.message})` : "";
312
+ throw new SfxApiError(`请求火山引擎失败:${error instanceof Error ? error.message : String(error)}${cause}`);
312
313
  }
313
314
  const logId = response.headers.get("x-tt-logid") ?? undefined;
314
315
  if (!response.ok)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-game-material-master",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "游戏素材大师:DSH 插件,包含八方向图生成、图片生成、序列帧生成、地图编辑器、音乐生成编辑、音效生成六个正式模块(地图编辑器参考 AsLib 的 RPG Map Maker 重做:一屏、纯图标、零术语,地图四周环绕、素材自动识别与自动连接、动画地块、内置素材、一键生成,全本地零计费;音乐生成编辑接谱乐 AI:灵感/歌词 → 不挂靠项目的新对话 → agent 扩写/选引擎生成 → 回界面裁剪/音量/淡入淡出/标准化/导出,生成按平台积分计费;另有谱曲模式:先给方案 → scoremill 本地写 MIDI → 渲染试听 → 逐版修改 → 可选交 Suno,谱曲/试听/导出本地免费;音效生成接火山引擎 Seed-Audio:一句话描述 → 音效/环境音/角色配音,可带参考图或参考音频,每次生成真实计费),以及实验性的 45° 地图地块生成与骨骼动画生成模块。界面与内置提示词跟随 DSH 语言设置(中 / 英)。八方向图默认「转圈截帧」(一段原地匀速转一圈的绿幕视频 → 按时间轴截出八个方向),也可逐方向生图;45° 地图地块用「几何交给代码、内容交给 AI」的方式拼成整张地图。生图后端可选火山方舟 Seedream,或自定义生图模型(OpenAI API / ComfyUI API / Stable Diffusion WebUI API 三种协议);图生视频走 MiniMax;抠绿幕合成与音乐后期全部在本地。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",