kingkont 0.11.1 → 0.11.2

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.11.1",
3
+ "version": "0.11.2",
4
4
  "description": "KingKont · Chatium — нод-редактор сцен с AI-генерацией (картинки/видео/голос/SFX/музыка/текст)",
5
5
  "main": "main.js",
6
6
  "bin": {
@@ -599,7 +599,7 @@ async function openProjectTemplate(templateId, suggestedName) {
599
599
  'Имя нового проекта:',
600
600
  suggestedName || 'Из шаблона',
601
601
  suggestedName || '',
602
- { okText: 'Создать в облаке' },
602
+ { okText: 'Создать проект' },
603
603
  );
604
604
  if (!projectName) return;
605
605
 
@@ -662,6 +662,27 @@ async function openProjectTemplate(templateId, suggestedName) {
662
662
  } else {
663
663
  throw new Error('cloudProjects.open недоступен');
664
664
  }
665
+
666
+ // Auto-select первую сцену (или первый character/location если сцен нет).
667
+ // Юзер ожидает что после открытия проекта-из-шаблона он сразу видит
668
+ // содержимое, а не пустой холст.
669
+ try {
670
+ // Приоритет: episode → character → location.
671
+ const order = ['episode', 'character', 'location'];
672
+ const firstByOrder = order
673
+ .map(k => cloudBoards.find(b => b.kind === k))
674
+ .find(Boolean);
675
+ const target = firstByOrder || cloudBoards[0];
676
+ if (target && state.filmHandle) {
677
+ const list = target.kind === 'character' ? await listCharacters(state.filmHandle)
678
+ : target.kind === 'location' ? await listLocations(state.filmHandle)
679
+ : await listEpisodes(state.filmHandle);
680
+ const found = list.find(x => x.name === target.name);
681
+ if (found) await selectBoard({ kind: target.kind, ...found });
682
+ }
683
+ } catch (e) {
684
+ console.warn('auto-select first board failed:', e?.message || e);
685
+ }
665
686
  } catch (e) {
666
687
  TPL_PROGRESS.hide();
667
688
  tplStatus('Ошибка открытия проекта: ' + e.message, true);