kingkont 0.20.53 → 0.20.55

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/providers.js CHANGED
@@ -617,17 +617,27 @@ async function _startGenerationViaKie({ kind, prompt, key, imageInputs, videoInp
617
617
  if (aspectRatio) input.aspect_ratio = aspectRatio;
618
618
  input.output_format = 'jpg';
619
619
  // flux/sdxl быстрые, quality для них N/A — пропускаем.
620
- } else if (key === 'gpt-image-2' || key === 'gpt-image-1.5') {
621
- // OpenAI gpt-image-2 / 1.5 через KIE. Если есть imageInputs
622
- // переключаемся на image-to-image вариант slug'а (KIE использует
623
- // отдельные модели для t2i vs i2i).
620
+ } else if (key === 'gpt-image-2') {
621
+ // KIE GPT Image 2 отдельные slug для t2i vs i2i (см. switch ниже).
622
+ // Параметры для обеих:
623
+ // prompt (req), aspect_ratio (auto|1:1|9:16|16:9|4:3|3:4),
624
+ // resolution (1K|2K|4K).
625
+ // Для image-to-image — input_urls: string[] (<=16).
626
+ // (gpt-image-2 НЕ принимает image_input, output_format, quality,
627
+ // size — это OpenAI-direct поля; KIE proxy игнорирует но логирует
628
+ // warning. Не отправляем чтобы не мусорить.)
624
629
  if (imageInputs?.length) {
625
- // gpt-image-2-image-to-image — same input.image_input format,
626
- // нужно сменить fullModel ниже.
630
+ input.input_urls = imageInputs.slice(0, 16);
627
631
  }
632
+ // KIE: при aspect_ratio='auto' принудительно понижает resolution до 1K.
633
+ // Явный 16:9 даёт 2K/4K если попросит.
634
+ input.aspect_ratio = aspectRatio || '16:9';
635
+ input.resolution = resolution || '1K';
636
+ } else if (key === 'gpt-image-1.5') {
637
+ // gpt-image-1.5 (KIE): «OpenAI-стиль» параметры (size/quality/format) —
638
+ // совпадает с OpenAI direct API.
628
639
  if (aspectRatio) input.size = _gptImageAspectToSize(aspectRatio);
629
640
  if (imageInputs?.length) input.image_input = imageInputs;
630
- // quality: 'low' | 'medium' | 'high' — gpt-image поддерживает.
631
641
  if (quality) input.quality = quality;
632
642
  input.output_format = 'jpg';
633
643
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kingkont",
3
- "version": "0.20.53",
3
+ "version": "0.20.55",
4
4
  "description": "KingKont \u00b7 Chatium \u2014 \u043d\u043e\u0434-\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0441\u0446\u0435\u043d \u0441 AI-\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 (\u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438/\u0432\u0438\u0434\u0435\u043e/\u0433\u043e\u043b\u043e\u0441/SFX/\u043c\u0443\u0437\u044b\u043a\u0430/\u0442\u0435\u043a\u0441\u0442)",
5
5
  "main": "main.js",
6
6
  "bin": {
@@ -1908,7 +1908,10 @@
1908
1908
  .modal.hidden { display: none; }
1909
1909
  .modal-card {
1910
1910
  background: #2a2a2a; border: 1px solid #444; border-radius: 12px;
1911
- padding: 24px; width: 540px; max-width: 92vw; max-height: 90vh;
1911
+ /* padding-bottom=0: .modal-actions сама даёт нижний паддинг через свой
1912
+ padding-bottom — нужно чтобы sticky-bottom:0 ровно совпал с краем
1913
+ модалки. */
1914
+ padding: 24px 24px 0; width: 540px; max-width: 92vw; max-height: 90vh;
1912
1915
  overflow-y: auto; display: flex; flex-direction: column; gap: 14px;
1913
1916
  position: relative;
1914
1917
  }
@@ -1928,7 +1931,20 @@
1928
1931
  }
1929
1932
  .modal-card input:focus, .modal-card textarea:focus, .modal-card select:focus { border-color: #6a8aaa; }
1930
1933
  .modal-card textarea { resize: vertical; min-height: 100px; }
1931
- .modal-actions { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
1934
+ /* Кнопки внизу модалки залипают к её низу юзер: «сделай чтобы кнопки
1935
+ прилипали к нижней части модалки и были всегда видны, во всех модалках».
1936
+ Sticky bottom:0 пинит к нижнему краю scroll-контейнера (modal-card),
1937
+ negative margin-left/right компенсирует padding modal-card'а (24px),
1938
+ padding 14px 24px 24px даёт собственный bottom-pad. */
1939
+ .modal-actions {
1940
+ display: flex; gap: 8px; align-items: center;
1941
+ position: sticky; bottom: 0;
1942
+ margin: 14px -24px 0;
1943
+ padding: 14px 24px 24px;
1944
+ background: #2a2a2a;
1945
+ border-top: 1px solid #383838;
1946
+ z-index: 5;
1947
+ }
1932
1948
  .modal-actions .spacer { flex: 1; }
1933
1949
  .seg-control { display: flex; }
1934
1950
  .seg-control .seg { flex: 1; background: #1e1e1e; border: 1px solid #383838; border-radius: 0; }