kingkont 0.14.5 → 0.14.6
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 +1 -1
- package/renderer/chat.js +22 -3
- package/renderer/styles.css +15 -1
package/package.json
CHANGED
package/renderer/chat.js
CHANGED
|
@@ -816,7 +816,8 @@
|
|
|
816
816
|
const parts = [];
|
|
817
817
|
if (ctx.scene) parts.push({ key: 'scene', label: `🎬 ${ctx.scene.name}`, removable: false });
|
|
818
818
|
// Группируем выделенные ноды по type. Если 1 — показываем имя/id;
|
|
819
|
-
// если 2+ — «N картинок» с локализацией.
|
|
819
|
+
// если 2+ — «N картинок» с локализацией. Клик по чипу — снимает
|
|
820
|
+
// выделение с этой ноды (или со всех нод этого type для группы).
|
|
820
821
|
const byType = {};
|
|
821
822
|
for (const sel of ctx.selected) {
|
|
822
823
|
(byType[sel.type] = byType[sel.type] || []).push(sel);
|
|
@@ -825,10 +826,28 @@
|
|
|
825
826
|
const icon = type === 'image' ? '🖼' : type === 'video' ? '🎬' : type === 'audio' ? '🎙' : type === 'text' ? '📝' : '◉';
|
|
826
827
|
if (items.length === 1) {
|
|
827
828
|
const s = items[0];
|
|
828
|
-
parts.push({
|
|
829
|
+
parts.push({
|
|
830
|
+
key: 'sel:' + s.id,
|
|
831
|
+
label: `${icon} ${s.name || s.id.slice(0, 6)}`,
|
|
832
|
+
removable: true,
|
|
833
|
+
onRemove: () => {
|
|
834
|
+
state.selectedNodeIds.delete(s.id);
|
|
835
|
+
if (typeof renderSelection === 'function') renderSelection();
|
|
836
|
+
renderContextRow();
|
|
837
|
+
},
|
|
838
|
+
});
|
|
829
839
|
} else {
|
|
830
840
|
const noun = _typeForms[type] || ['нода','ноды','нод'];
|
|
831
|
-
parts.push({
|
|
841
|
+
parts.push({
|
|
842
|
+
key: 'sel-grp:' + type,
|
|
843
|
+
label: `${icon} ${items.length} ${_ru_plural(items.length, noun)}`,
|
|
844
|
+
removable: true,
|
|
845
|
+
onRemove: () => {
|
|
846
|
+
for (const it of items) state.selectedNodeIds.delete(it.id);
|
|
847
|
+
if (typeof renderSelection === 'function') renderSelection();
|
|
848
|
+
renderContextRow();
|
|
849
|
+
},
|
|
850
|
+
});
|
|
832
851
|
}
|
|
833
852
|
}
|
|
834
853
|
for (const a of ctx.attachments) {
|
package/renderer/styles.css
CHANGED
|
@@ -260,6 +260,10 @@
|
|
|
260
260
|
box-shadow: -8px 0 32px rgba(0,0,0,0.4);
|
|
261
261
|
/* --chat-font задаётся inline в chat.js (Cmd+/Cmd-). Дефолт 13px. */
|
|
262
262
|
font-size: var(--chat-font, 13px);
|
|
263
|
+
/* Защита от horizontal-overflow: дочерние flex-элементы (длинные
|
|
264
|
+
имена чипов, tool-args в pre) могли push'ать ширину — fixed
|
|
265
|
+
position спасал, но без этого max-width дочерних не работал. */
|
|
266
|
+
overflow-x: hidden; box-sizing: border-box;
|
|
263
267
|
}
|
|
264
268
|
.chat-panel.chat-drag::before {
|
|
265
269
|
content: '📎 Отпусти, чтобы прикрепить файл к чату';
|
|
@@ -274,6 +278,11 @@
|
|
|
274
278
|
display: flex; flex-wrap: wrap; gap: 4px;
|
|
275
279
|
padding: 6px 10px;
|
|
276
280
|
background: #1a1a1a; border-top: 1px solid #2a2a2a;
|
|
281
|
+
/* min-width:0 — без этого flex-children не «сжимаются», и длинная
|
|
282
|
+
строка чипов раздвигает родителя (chat-panel получает горизонтальный
|
|
283
|
+
overflow). С flex-wrap:wrap + min-width:0 чипы корректно
|
|
284
|
+
переносятся на следующую строку. */
|
|
285
|
+
min-width: 0; max-width: 100%; box-sizing: border-box;
|
|
277
286
|
}
|
|
278
287
|
.chat-context-row:empty { display: none; }
|
|
279
288
|
.chat-chip {
|
|
@@ -281,7 +290,12 @@
|
|
|
281
290
|
background: #232a36; border: 1px solid #2c3848;
|
|
282
291
|
color: #aac; font-size: 11px;
|
|
283
292
|
padding: 2px 8px; border-radius: 999px;
|
|
284
|
-
max-width: 200px
|
|
293
|
+
max-width: 100%; /* был 200px — длинные имена ужимались, но
|
|
294
|
+
если width контейнера меньше 200px, чип всё
|
|
295
|
+
ещё мог push'нуть строку. 100% относительно
|
|
296
|
+
.chat-context-row → гарантированно влезает. */
|
|
297
|
+
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
298
|
+
min-width: 0; /* чтобы flex-shrink работал */
|
|
285
299
|
}
|
|
286
300
|
.chat-chip-x {
|
|
287
301
|
background: transparent; border: none; color: #889;
|