kingkont 0.7.67 → 0.7.68

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kingkont",
3
- "version": "0.7.67",
3
+ "version": "0.7.68",
4
4
  "description": "KingKont · Chatium — нод-редактор сцен с AI-генерацией (картинки/видео/голос/SFX/музыка/текст)",
5
5
  "main": "main.js",
6
6
  "bin": {
@@ -287,6 +287,13 @@ async function ensureApiKey(forKind) {
287
287
  async function openGenModal(kind) {
288
288
  if (!await ensureApiKey(kind)) return;
289
289
  if (!state.currentBoard) return;
290
+ // Чистим стейт от прошлого regenerate'а (если юзер закрыл его modal через
291
+ // Esc, а не «Отмена» — глобальный Esc-handler не сбрасывает state).
292
+ // Без этого следующий submit принял бы текущую сессию за regenerate
293
+ // прошлой ноды и сгенерил бы туда вместо создания новой.
294
+ state.regenerateTarget = null;
295
+ state.pendingConnectionFrom = null;
296
+ state.sourceRef = null;
290
297
  state.genKind = kind;
291
298
  document.querySelectorAll('#genModal [data-kind]').forEach(b =>
292
299
  b.classList.toggle('active', b.dataset.kind === kind));
@@ -404,6 +404,10 @@ function closeAddMenuOnOutside(e) {
404
404
  }
405
405
 
406
406
  async function openGenerateForRef(fromNode, clientX, clientY, forceKind) {
407
+ // Чистим стейт от прошлого regenerate'а (см. комментарий в
408
+ // openGenModal — то же самое для anchor-drag flow).
409
+ state.regenerateTarget = null;
410
+ // pendingConnectionFrom выставится ниже, sourceRef — тоже.
407
411
  // forceKind — если из anchor-drop меню юзер выбрал конкретный тип.
408
412
  if (forceKind) {
409
413
  if (!await ensureApiKey(forceKind)) return;