kingkont 0.7.73 → 0.7.75

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/lib/cli.js CHANGED
@@ -220,10 +220,11 @@ async function cmdGen({ positional, flags }) {
220
220
  p && p.enabled !== false && (p.kinds || []).includes(kind) && p.text
221
221
  );
222
222
  if (applicable.length && !noDefault) {
223
- const prefix = applicable.map(p => String(p.text).trim()).join(', ');
223
+ const tail = applicable.map(p => String(p.text).trim()).join(', ');
224
224
  const u = (prompt || '').trim();
225
- effectivePrompt = u ? (prefix + ', ' + u) : prefix;
226
- console.error(`[gen] applied ${applicable.length} default prompt(s) for ${kind}: "${prefix.slice(0, 100)}${prefix.length > 100 ? '…' : ''}"`);
225
+ // Suffix, не prefix: user-prompt идёт первым, дефолты хвостом.
226
+ effectivePrompt = u ? (u + ', ' + tail) : tail;
227
+ console.error(`[gen] appended ${applicable.length} default prompt(s) for ${kind}: "${tail.slice(0, 100)}${tail.length > 100 ? '…' : ''}"`);
227
228
  }
228
229
 
229
230
  // 4) Запускаем генерацию через провайдер.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kingkont",
3
- "version": "0.7.73",
3
+ "version": "0.7.75",
4
4
  "description": "KingKont · Chatium — нод-редактор сцен с AI-генерацией (картинки/видео/голос/SFX/музыка/текст)",
5
5
  "main": "main.js",
6
6
  "bin": {
@@ -735,6 +735,15 @@ $('textGenModal').addEventListener('keydown', e => {
735
735
  }
736
736
  });
737
737
 
738
+ // Тот же шорткат для основной gen-modal'и (картинка/видео/аудио).
739
+ $('genModal').addEventListener('keydown', e => {
740
+ if (e.key === 'Enter' && (e.metaKey || e.ctrlKey)) {
741
+ e.preventDefault();
742
+ e.stopPropagation();
743
+ if (!$('genSubmit').disabled) $('genSubmit').click();
744
+ }
745
+ });
746
+
738
747
  // Переключатель типа (картинка/видео)
739
748
  document.querySelectorAll('#genModal [data-kind]').forEach(b => {
740
749
  b.addEventListener('click', () => {
@@ -865,7 +874,9 @@ function syncDefaultPromptRow() {
865
874
  }
866
875
 
867
876
  // Применяет включённые дефолтные промпты сцены к user-prompt'у.
868
- // Префиксует с разделителем ", ". Промпты идут в порядке как в settings.
877
+ // Дописывает в КОНЕЦ через ", ". Промпты идут в порядке как в settings.
878
+ // (Раньше был prefix — поменяли на suffix по запросу юзера: его собственный
879
+ // текст идёт первым, дефолты — общим хвостом.)
869
880
  function applyDefaultPrompt(userPrompt, kind) {
870
881
  const all = state.currentBoard?.metadata?.settings?.defaultPrompts || [];
871
882
  const active = state.activeDefaultPrompts || new Set();
@@ -874,10 +885,10 @@ function applyDefaultPrompt(userPrompt, kind) {
874
885
  .map(p => p.text.trim())
875
886
  .filter(Boolean);
876
887
  if (!apply.length) return userPrompt;
877
- const prefix = apply.join(', ');
888
+ const tail = apply.join(', ');
878
889
  const u = (userPrompt || '').trim();
879
- if (!u) return prefix;
880
- return prefix + ', ' + u;
890
+ if (!u) return tail;
891
+ return u + ', ' + tail;
881
892
  }
882
893
 
883
894
  // === Source frame controls ===