@goodandready/dsh-image-gen 0.8.9 → 0.8.10

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.
Files changed (2) hide show
  1. package/lib/client.js +15 -1
  2. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -16,7 +16,16 @@ window.__ModuleLoader__.load({
16
16
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' })
17
17
  let react = require('react')
18
18
  let react_jsx_runtime = require('react/jsx-runtime')
19
- let runtime = require('@deepseek-ai/dsh-client-runtime/client')
19
+ // Любой require пакета ядра из клиентской половины обязан быть обёрнут:
20
+ // незащищённый роняет не только свой плагин, наружу это выходит списком
21
+ // чужих имён. Имя пакета менялось между ядрами — пробуем новое и старое.
22
+ function loadRuntime() {
23
+ for (const id of ['@deepseek-ai/dsh-client-store', '@deepseek-ai/dsh-client-runtime/client']) {
24
+ try { return require(id) } catch (missing) { /* следующее */ }
25
+ }
26
+ return null
27
+ }
28
+ let runtime = loadRuntime()
20
29
 
21
30
  // Ядровый шеврон раскрытия; в урезанной сборке — запасной SVG той же формы.
22
31
  let ChevronIcon = null
@@ -322,6 +331,11 @@ window.__ModuleLoader__.load({
322
331
  scope.subscribe(() => this.publish())
323
332
  }
324
333
  bind(project) {
334
+ if (!runtime) {
335
+ // Ядро без snapshot-store: отдаём статичный снимок, без подписки.
336
+ // Карточка не перерисуется сама, но не уронит загрузчик.
337
+ return { getSnapshot: () => project(), subscribe: () => () => {} }
338
+ }
325
339
  const store = runtime.createSnapshotStore(project())
326
340
  this.listeners.add(() => store.set(project()))
327
341
  return store
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodandready/dsh-image-gen",
3
- "version": "0.8.9",
3
+ "version": "0.8.10",
4
4
  "description": "Image generation for DeepSeek Harness: a generate_image tool with pluggable providers — the FAL queue, any OpenAI-compatible images API, or a ChatGPT/Grok subscription with no API key at all. The picture is shown inline in the conversation; the model receives either a link (works with any chat model) or the image itself (needs dsh-vision-bridge or a vision-capable model).",
5
5
  "keywords": [
6
6
  "deepseek-harness",