@goodandready/dsh-image-gen 0.10.12 → 0.10.13
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 +4 -0
- package/README.ru.md +4 -0
- package/lib/client.js +40 -41
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -84,6 +84,10 @@
|
|
|
84
84
|
* **Subscription Aspect Ratio Mapping**: maps aspect ratios (`16:9`, `3:2`, `9:16`, `2:3`) to appropriate subscription dimensions (`1536x1024` / `1024x1536`) instead of falling back to default square `1024x1024`.
|
|
85
85
|
|
|
86
86
|
|
|
87
|
+
### 🚀 What's New in v0.10.13
|
|
88
|
+
* **Plugin Settings Location (#208)**: Moved settings card exclusively into the standard `Settings → Plugins → Plugin settings` section (`settings.plugin.item` slot). Removed the legacy fallback to `settings.section` that previously caused duplicate entries in the top-level sidebar navigation.
|
|
89
|
+
* **Deferred Slot Injection (`registerSlotWhenReady`)**: Implemented robust deferred injection via `ctx.slots.inject` ensuring the settings card safely mounts when the parent settings container is rendered, eliminating timing collisions at startup.
|
|
90
|
+
|
|
87
91
|
### 🚀 What's New in v0.10.12
|
|
88
92
|
* **Fix Syntax Error (#208)**: Resolved variable redeclaration collision (`const hPrompt`) in `checkCache` within `lib/index.js` which could prevent plugin initialization on strict Node.js runtimes. Added automated syntax check across all source modules to test suite.
|
|
89
93
|
|
package/README.ru.md
CHANGED
|
@@ -130,6 +130,10 @@ graph LR
|
|
|
130
130
|
- **100% интернационализация (#140)**: устранены захардкоженные русские строки, добавлены переводы на русский, английский и китайский языки.
|
|
131
131
|
|
|
132
132
|
|
|
133
|
+
### 🚀 Что нового в v0.10.13
|
|
134
|
+
* **Размещение карточки настроек (#208)**: Карточка настроек плагина перенесена строго в стандартную вкладку «Настройки → Плагины → Настройки плагинов» (слот `settings.plugin.item`). Удалён устаревший запасной путь `settings.section`, из-за которого настройки отображались отдельным пунктом в общем корневом меню настроек.
|
|
135
|
+
* **Безопасная отложенная регистрация слота (`registerSlotWhenReady`)**: Регистрация через `ctx.slots.inject` гарантирует корректную загрузку и монтирование формы настроек при открытии страницы в DSH UI без ошибок синхронизации.
|
|
136
|
+
|
|
133
137
|
### 🚀 Что нового в v0.10.12
|
|
134
138
|
* **Исправление синтаксической ошибки (#208)**: Устранено повторное объявление переменной (`const hPrompt`) в функции `checkCache` внутри `lib/index.js`. Добавлена автоматическая проверка синтаксиса всех модулей в набор юнит-тестов.
|
|
135
139
|
|
package/lib/client.js
CHANGED
|
@@ -1251,50 +1251,49 @@ function FalImageCard(props) {
|
|
|
1251
1251
|
FalImageCard,
|
|
1252
1252
|
),
|
|
1253
1253
|
)
|
|
1254
|
-
// Карточка во вкладке «Настройки
|
|
1255
|
-
//
|
|
1256
|
-
//
|
|
1257
|
-
//
|
|
1258
|
-
//
|
|
1259
|
-
//
|
|
1260
|
-
//
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1254
|
+
// Карточка во вкладке «Настройки → Плагины → Настройки плагинов» (слот settings.plugin.item).
|
|
1255
|
+
// Ключ слота обязан равняться пространству настроек (SETTINGS_NS):
|
|
1256
|
+
// вкладка перебирает пространства и отрисовывает карточку.
|
|
1257
|
+
// Раздел верхнего уровня settings.section исключён, чтобы настройки не
|
|
1258
|
+
// засоряли общий боковой список настроек.
|
|
1259
|
+
// Отложенная регистрация через ctx.slots.inject предотвращает ошибки монтирования,
|
|
1260
|
+
// так как дочерние слоты страниц DSH UI объявляются родительскими компонентами.
|
|
1261
|
+
function registerSlotWhenReady(slotName, registerFn) {
|
|
1262
|
+
if (!ctx.slots) return
|
|
1263
|
+
if (typeof ctx.slots.inject === 'function') {
|
|
1264
|
+
try {
|
|
1265
|
+
ctx.slots.inject(slotName, () => {
|
|
1266
|
+
try {
|
|
1267
|
+
return registerFn()
|
|
1268
|
+
} catch (err) {
|
|
1269
|
+
console.warn('[dsh-image-gen] Error registering slot ' + slotName + ':', err)
|
|
1270
|
+
}
|
|
1271
|
+
})
|
|
1272
|
+
return
|
|
1273
|
+
} catch (err) {
|
|
1274
|
+
console.warn('[dsh-image-gen] Failed to inject slot ' + slotName + ':', err)
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
if (typeof ctx.slots.register === 'function') {
|
|
1278
|
+
try {
|
|
1279
|
+
registerFn()
|
|
1280
|
+
} catch (err) {
|
|
1281
|
+
console.warn('[dsh-image-gen] Failed direct registration for ' + slotName + ':', err)
|
|
1270
1282
|
}
|
|
1271
|
-
|
|
1272
|
-
ctx.slots.inject(entry.name, () => {
|
|
1273
|
-
ctx.slots.register(entry, component)
|
|
1274
|
-
ok = true
|
|
1275
|
-
})
|
|
1276
|
-
if (ok) return entry.name
|
|
1277
|
-
} catch {}
|
|
1283
|
+
}
|
|
1278
1284
|
}
|
|
1279
|
-
return undefined
|
|
1280
|
-
}
|
|
1281
1285
|
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
locale: NS,
|
|
1294
|
-
label: () => t('settings.navLabel'),
|
|
1295
|
-
inject: () => cardOnce().inject(),
|
|
1296
|
-
},
|
|
1297
|
-
], FalSettingsCard)
|
|
1286
|
+
registerSlotWhenReady('settings.plugin.item', () =>
|
|
1287
|
+
ctx.slots.register(
|
|
1288
|
+
{
|
|
1289
|
+
name: 'settings.plugin.item',
|
|
1290
|
+
key: SETTINGS_NS,
|
|
1291
|
+
locale: NS,
|
|
1292
|
+
inject: () => cardOnce().inject(),
|
|
1293
|
+
},
|
|
1294
|
+
FalSettingsCard,
|
|
1295
|
+
),
|
|
1296
|
+
)
|
|
1298
1297
|
}
|
|
1299
1298
|
exports.apply = apply
|
|
1300
1299
|
exports.inject = inject
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodandready/dsh-image-gen",
|
|
3
|
-
"version": "0.10.
|
|
4
|
-
"description": "Image generation for DeepSeek Harness: a generate_image tool with pluggable providers
|
|
3
|
+
"version": "0.10.13",
|
|
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",
|
|
7
7
|
"dsh",
|