wezard 3.0.4 → 3.0.5
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/cli/wezard.sh +100 -7
- package/dist/cli/init.js +4 -1
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/wx.js +3 -0
- package/dist/cli/wx.js.map +1 -1
- package/dist/daemon/bg-tasks.js +74 -0
- package/dist/daemon/bg-tasks.js.map +1 -0
- package/dist/daemon/channel.js +12 -7
- package/dist/daemon/channel.js.map +1 -1
- package/dist/daemon/danger-scrub.js +11 -1
- package/dist/daemon/danger-scrub.js.map +1 -1
- package/dist/daemon/danger.js +21 -1
- package/dist/daemon/danger.js.map +1 -1
- package/dist/daemon/detail.js +1 -0
- package/dist/daemon/detail.js.map +1 -1
- package/dist/daemon/http.js +15 -3
- package/dist/daemon/http.js.map +1 -1
- package/dist/daemon/inbound.js +10 -2
- package/dist/daemon/inbound.js.map +1 -1
- package/dist/daemon/index.js +294 -43
- package/dist/daemon/index.js.map +1 -1
- package/dist/daemon/loop-lag.js +39 -0
- package/dist/daemon/loop-lag.js.map +1 -0
- package/dist/daemon/mcp-http.js +3 -0
- package/dist/daemon/mcp-http.js.map +1 -1
- package/dist/daemon/mirror-bridge.js +129 -43
- package/dist/daemon/mirror-bridge.js.map +1 -1
- package/dist/daemon/peers.js +61 -12
- package/dist/daemon/peers.js.map +1 -1
- package/dist/daemon/quota.js +1 -1
- package/dist/daemon/quota.js.map +1 -1
- package/dist/daemon/room-archive.js +189 -0
- package/dist/daemon/room-archive.js.map +1 -0
- package/dist/daemon/room-facts.js +2 -1
- package/dist/daemon/room-facts.js.map +1 -1
- package/dist/daemon/room-hub.js +26 -4
- package/dist/daemon/room-hub.js.map +1 -1
- package/dist/daemon/rooms.js +203 -11
- package/dist/daemon/rooms.js.map +1 -1
- package/dist/daemon/spawn-tmux.js +41 -21
- package/dist/daemon/spawn-tmux.js.map +1 -1
- package/dist/daemon/steward-model.js +19 -4
- package/dist/daemon/steward-model.js.map +1 -1
- package/dist/daemon/steward.js +12 -0
- package/dist/daemon/steward.js.map +1 -1
- package/dist/daemon/store-metrics.js +124 -0
- package/dist/daemon/store-metrics.js.map +1 -0
- package/dist/daemon/tool-latency.js +24 -0
- package/dist/daemon/tool-latency.js.map +1 -0
- package/dist/daemon/wezard-session.js +1 -1
- package/dist/daemon/wezard-session.js.map +1 -1
- package/dist/daemon/wizard.js.map +1 -1
- package/dist/daemon/zombie-panes.js +216 -0
- package/dist/daemon/zombie-panes.js.map +1 -0
- package/dist/mcp/tools.js +12 -1
- package/dist/mcp/tools.js.map +1 -1
- package/dist/shared/chat-http.js +3 -1
- package/dist/shared/chat-http.js.map +1 -1
- package/dist/shared/cli-backends.js +13 -1
- package/dist/shared/cli-backends.js.map +1 -1
- package/dist/shared/config.js +22 -2
- package/dist/shared/config.js.map +1 -1
- package/dist/shared/daemon-client.js +13 -2
- package/dist/shared/daemon-client.js.map +1 -1
- package/dist/shared/log.js +76 -5
- package/dist/shared/log.js.map +1 -1
- package/dist/shared/room-view.js +2 -1
- package/dist/shared/room-view.js.map +1 -1
- package/dist/shared/room.js +2 -0
- package/dist/shared/room.js.map +1 -1
- package/dist/shared/session-hooks.js +1 -1
- package/dist/shared/session-hooks.js.map +1 -1
- package/dist/shared/workspace-trust.js +88 -2
- package/dist/shared/workspace-trust.js.map +1 -1
- package/dist/svr/index.js +3 -37
- package/dist/svr/index.js.map +1 -1
- package/dist/svr/room-reader.js +140 -0
- package/dist/svr/room-reader.js.map +1 -0
- package/package.json +1 -1
- package/web/chat.js +114 -32
package/web/chat.js
CHANGED
|
@@ -208,9 +208,9 @@
|
|
|
208
208
|
var topicName = function (r) {
|
|
209
209
|
var b = topicBase(r);
|
|
210
210
|
var dup = (W.rooms || []).some(function (o) { return o.id !== r.id && o.kind === 'topic-post' && o.channel && r.channel && o.channel.id === r.channel.id && topicBase(o) === b; });
|
|
211
|
-
//
|
|
212
|
-
|
|
213
|
-
return dup ?
|
|
211
|
+
// 撞名时只追加帖号, 正文原样保留 (不压到 8 字): 首条人话开头若是日志名 / 文件名这种长 token,
|
|
212
|
+
// 8 字截断后 (「wecom-ag…」) 读起来就像个自动名, 正是「名字不是用户说的第一句」的观感。
|
|
213
|
+
return dup ? b + ' · 帖' + postTail(r) : b;
|
|
214
214
|
};
|
|
215
215
|
var shortRoom = function (id) {
|
|
216
216
|
var s = String(id || '');
|
|
@@ -238,7 +238,9 @@
|
|
|
238
238
|
var roomLabelOf = function (r) {
|
|
239
239
|
return r ? roomNameOf(r, r.label) : '';
|
|
240
240
|
};
|
|
241
|
-
//
|
|
241
|
+
// 帖子 (topic-post) 的图标: 全站单一来源 (roomIcon / roomIconOf / 图例), 换图标只改这里。
|
|
242
|
+
var POST_ICON = '📄';
|
|
243
|
+
// room 图标: 多人群聊 👥 / 人与 wizard 的单聊 💬 / 频道 #️⃣ / 帖子 📄 / 只有 wizard 的 room 🧙 (与 wizard 默认头像同一个 emoji)。
|
|
242
244
|
// 先分「有没有人参与」(isPeopleRoom, 与列表的「群聊 / 会话」分组、搜索的 group 同一口径: 绑定企微 / topic / 微信的 room 不管有没有人发过话都算有人);
|
|
243
245
|
// 频道 (channel) 与帖子 (topic-post) 各有一个专属图标, 与群聊 / 单聊一眼分开 —— 它们是传输形态, 比成员数更能说明「这是什么 room」。
|
|
244
246
|
// 其余有人的再分单聊 / 群聊: 单聊 = 恰好两位参与者、其中一位是人、且不是企微群 / topic 帖 (即绑定的 wecom-dm 那种: 一个人 + 一个 wizard) —— 这是唯一保留 💬 的特例;
|
|
@@ -251,14 +253,14 @@
|
|
|
251
253
|
var roomIcon = function (r) {
|
|
252
254
|
if (!isPeopleRoom(r)) return '🧙';
|
|
253
255
|
if (r.kind === 'channel') return '#️⃣';
|
|
254
|
-
if (r.kind === 'topic-post') return
|
|
256
|
+
if (r.kind === 'topic-post') return POST_ICON;
|
|
255
257
|
return isSoloChat(r) ? '💬' : '👥';
|
|
256
258
|
};
|
|
257
259
|
// 搜索命中带 id + group (+ kind): 能在 W.rooms 里找到就走同一套, 找不到 (没拉到的老 room) 按 kind / group 退回。
|
|
258
260
|
var roomIconOf = function (id, group, kind) {
|
|
259
261
|
var r = roomById(id);
|
|
260
262
|
if (r) return roomIcon(r);
|
|
261
|
-
return kind === 'channel' ? '#️⃣' : kind === 'topic-post' ?
|
|
263
|
+
return kind === 'channel' ? '#️⃣' : kind === 'topic-post' ? POST_ICON : group ? '👥' : '🧙';
|
|
262
264
|
};
|
|
263
265
|
var KIND_WORD = { 'wecom-group': '企微群', 'wecom-dm': '企微单聊', channel: '频道', 'topic-post': '帖子', wx: '微信', dm: 'wizard 两人会话', adhoc: '临时多人 room' };
|
|
264
266
|
var roomKindWord = function (r) { return (isPeopleRoom(r) ? '群聊' : '会话') + ' · ' + (KIND_WORD[r.kind] || r.kind || ''); };
|
|
@@ -269,6 +271,7 @@
|
|
|
269
271
|
var seen = {};
|
|
270
272
|
(rooms || []).forEach(function (r) {
|
|
271
273
|
(r.members || []).forEach(function (m) {
|
|
274
|
+
if (m.role === 'monitor') return; // monitor 不上图: 只在频道框标题的 👁 chip 里露面 (侧栏成员列表照旧列出)
|
|
272
275
|
var id = nodeIdOf(m.who);
|
|
273
276
|
if (id) seen[id] = true;
|
|
274
277
|
});
|
|
@@ -290,6 +293,7 @@
|
|
|
290
293
|
if (r.channel) return null; // 频道名下的 room (帖子 / 存档) 必须留成 room 节点: 它要被画进频道框, 收成直连线就出框了
|
|
291
294
|
var ids = {}, human = false;
|
|
292
295
|
(r.members || []).forEach(function (m) {
|
|
296
|
+
if (m.role === 'monitor') return; // monitor 不是图上节点, 也就不参与「两人 wizard 收成直连线」的判断
|
|
293
297
|
var id = nodeIdOf(m.who);
|
|
294
298
|
if (!id) return;
|
|
295
299
|
ids[id] = true;
|
|
@@ -408,20 +412,37 @@
|
|
|
408
412
|
// room.channel.name 是读时算的 (可能已掺进 chatNames 的 cwd 自动名): 只把频道**自己那个 room 的人起 title**
|
|
409
413
|
// 当名字用 (room_name 过的才算人起的名字); 帖子 room 的 title 是帖子名, 不能拿来命名频道。
|
|
410
414
|
rooms.forEach(function (r) { if (r.channel && r.channel.id) touch(r.channel.id, r.kind === 'channel' ? r.title : '', r.channel.host).rooms.push(r.id); });
|
|
411
|
-
return order.filter(function (id) { return by[id].rooms.length; }).sort().map(function (id) {
|
|
415
|
+
return order.filter(function (id) { return by[id].rooms.length; }).sort().map(function (id) {
|
|
416
|
+
var f = by[id]; f.name = channelName(f.cid, f.name);
|
|
417
|
+
// 框标题里的 👁 monitor: 框内各 room 的 perceptron 成员 (role=monitor), 按 target 去重 —— 同一个 monitor 服务本频道多个帖也只出现一次。
|
|
418
|
+
var seen = {};
|
|
419
|
+
f.mons = [];
|
|
420
|
+
f.rooms.forEach(function (rid) {
|
|
421
|
+
var r = roomById(rid);
|
|
422
|
+
((r && r.members) || []).forEach(function (m) {
|
|
423
|
+
if (m.role !== 'monitor' || !m.who) return;
|
|
424
|
+
var t = nodeIdOf(m.who);
|
|
425
|
+
if (!t || seen[t]) return;
|
|
426
|
+
seen[t] = true;
|
|
427
|
+
f.mons.push({ target: t, name: m.name || nodeOf(t).name });
|
|
428
|
+
});
|
|
429
|
+
});
|
|
430
|
+
return f;
|
|
431
|
+
});
|
|
412
432
|
};
|
|
413
433
|
// 文字宽的估值 (12px 粗体): 汉字 / 全角 12.5, emoji 15, 其余 7。
|
|
414
434
|
var textW = function (t) {
|
|
415
435
|
return Array.from(String(t)).reduce(function (w, ch) { var c = ch.codePointAt(0); return w + (c > 0xffff ? 15 : c >= 0x2e80 ? 12.5 : 7); }, 0);
|
|
416
436
|
};
|
|
417
437
|
var clipText = function (t, n) { t = String(t); return t.length > n ? t.slice(0, n - 1) + '…' : t; };
|
|
418
|
-
// 框的标题: 频道名 + 🎩 host 名 (没绑 host 显示「未绑 host」); 窄屏截得更短。w =
|
|
438
|
+
// 框的标题: 频道名 + 🎩 host 名 (没绑 host 显示「未绑 host」) + 👁 monitor 名 (框内 room 的 perceptron, 去重; 没有就不出这段); 窄屏截得更短。w = 标题像素宽 (含 monitor 段, 框宽 minW 按它兜底)。
|
|
419
439
|
var frameTitle = function (f) {
|
|
420
440
|
var narrow = (panelBox().w || 332) <= 420;
|
|
421
441
|
var name = clipText(f.name, narrow ? 8 : 14);
|
|
422
442
|
var host = f.host && f.host.name ? clipText(f.host.name, narrow ? 7 : 12) : '';
|
|
423
443
|
var tail = host ? ' · 🎩 ' + host : ' · 未绑 host';
|
|
424
|
-
return {
|
|
444
|
+
var mons = (f.mons || []).map(function (m) { return { target: m.target, text: ' · 👁 ' + clipText(m.name, narrow ? 7 : 12) }; });
|
|
445
|
+
return { name: name, tail: tail, bound: !!host, mons: mons, w: textW(name + tail + mons.map(function (m) { return m.text; }).join('')) };
|
|
425
446
|
};
|
|
426
447
|
var FR_PAD = 12, FR_HEAD = 26; // 框离框内 room 的边距 / 顶部标题条高
|
|
427
448
|
// 框的矩形: 框内 room 的包围盒 (胶囊 ±3 / ±16) 外扩 FR_PAD, 顶上多留标题条, 宽不小于标题 (框一定有 room: 空频道不出框)。
|
|
@@ -455,8 +476,8 @@
|
|
|
455
476
|
(r.members || []).forEach(function (m) {
|
|
456
477
|
var pid = 'p:' + nodeIdOf(m.who);
|
|
457
478
|
// host 边方向 = room → host (线从 room 出发, 箭头落在 host 的圆点边上); 普通成员边无向、同样粗细。
|
|
458
|
-
// monitor
|
|
459
|
-
if (have[pid]) add({ key: 'm|' + r.id + '|' + pid, a: 'r:' + r.id, b: pid, room: r.id, host: !!m.host
|
|
479
|
+
// monitor 没有节点 (见 participants), 这里也就画不出它的边。
|
|
480
|
+
if (have[pid]) add({ key: 'm|' + r.id + '|' + pid, a: 'r:' + r.id, b: pid, room: r.id, host: !!m.host });
|
|
460
481
|
});
|
|
461
482
|
});
|
|
462
483
|
// 频道框: 每个频道一个 hub + 连向框内各 room 的虚拟边 (不画)。归属由框表达, 不再有「帖子 → 频道 room」的弱连线。
|
|
@@ -468,9 +489,9 @@
|
|
|
468
489
|
// 框与框之间再串一条虚拟边: 否则没有真实边连着的框 (只有孤立 host 的频道) 会被当成不连通块甩到图的远处。
|
|
469
490
|
frames.forEach(function (f, i) { if (i) add({ key: 'f|' + frames[i - 1].id + '|' + f.id, a: frames[i - 1].id, b: f.id, room: '', virt: true }); });
|
|
470
491
|
// 节点级 host: 在任一 room 里是 host 就戴礼帽 (边上不再有箭头)。
|
|
471
|
-
var hostIds = {}
|
|
472
|
-
links.forEach(function (l) { if (l.host) hostIds[l.b] = true;
|
|
473
|
-
nodes.forEach(function (n) { if (hostIds[n.id]) n.host = true;
|
|
492
|
+
var hostIds = {};
|
|
493
|
+
links.forEach(function (l) { if (l.host) hostIds[l.b] = true; });
|
|
494
|
+
nodes.forEach(function (n) { if (hostIds[n.id]) n.host = true; });
|
|
474
495
|
(directs || []).forEach(function (d) {
|
|
475
496
|
add({ key: 'd|' + d.room.id, a: 'p:' + d.pair[0], b: 'p:' + d.pair[1], room: d.room.id, direct: true, unread: unreadOf(d.room) > 0 });
|
|
476
497
|
});
|
|
@@ -622,7 +643,10 @@
|
|
|
622
643
|
if (p.hub || p.fx != null || f.set[p.id]) return;
|
|
623
644
|
var b = gBox(p), cy = p.y + b[2], l = p.x - b[0] * ik, r = p.x + b[0] * ik, t = cy - b[1] * ik, d = cy + b[1] * ik;
|
|
624
645
|
if (r <= R.x0 || l >= R.x1 || d <= R.y0 || t >= R.y1) return;
|
|
625
|
-
|
|
646
|
+
// 只推到框边 (m = 穿透), 不额外加固定 10px 空隙: 加了它会每帧过冲 —— 这一帧被推出框 10px, 下一帧 gCollide
|
|
647
|
+
// 把邻居推回来又被整段推出 20px, 60fps 下就是 +-10~20px 的抖动 (拖动时最明显)。不阻尼: 阻尼会让被两个
|
|
648
|
+
// 约束夹住的人停在框内十几到几十像素 (实测 q50 12px), 全推反而每帧停在框边上 (实测 q50 1px)。
|
|
649
|
+
var ex = [r - R.x0, R.x1 - l, d - R.y0, R.y1 - t], k = ex.indexOf(Math.min.apply(null, ex)), m = ex[k] * s;
|
|
626
650
|
if (k === 0) p.x -= m; else if (k === 1) p.x += m; else if (k === 2) p.y -= m; else p.y += m;
|
|
627
651
|
});
|
|
628
652
|
});
|
|
@@ -821,7 +845,7 @@
|
|
|
821
845
|
var nodeCls = function (n) {
|
|
822
846
|
if (n.isRoom) return 'rv-node rv-room' + (n.ref.kind === 'channel' ? ' arch' : '') + (nodeOn(n) ? ' on' : '');
|
|
823
847
|
var human = n.ref.kind === 'human';
|
|
824
|
-
return 'rv-node rv-person ' + (human ? 'human' : 'wizard st-' + stateOfNode(n.ref) + (coldOfNode(n.ref) ? ' cold' : '')
|
|
848
|
+
return 'rv-node rv-person ' + (human ? 'human' : 'wizard st-' + stateOfNode(n.ref) + (coldOfNode(n.ref) ? ' cold' : '')) + (nodeOn(n) ? ' on' : '') + (n.ref.ghost ? ' ghost' : '');
|
|
825
849
|
};
|
|
826
850
|
// 名字过长用省略号收尾 (全名在节点 <title> 悬停里), 不再硬截成 `DavidDavi` 这种半截词。
|
|
827
851
|
var clipName = function (t, n) { t = String(t); return t.length > n ? t.slice(0, n - 1) + '…' : t; };
|
|
@@ -857,12 +881,15 @@
|
|
|
857
881
|
var shape = function (cls, grow) {
|
|
858
882
|
return polyEl(sides, rr + grow, cls);
|
|
859
883
|
};
|
|
884
|
+
// 命中区: 形状本身只有 14~20px, 用户按的是「这个节点」而不是那个小多边形 —— 再垫一个透明圆,
|
|
885
|
+
// 否则点在图形与名字之间的空隙只落到 svg 上 (被当成拖背景), 看着就是「点不动」。
|
|
886
|
+
var tap = '<circle class="rv-tap" r="' + (rr + 8) + '"/>';
|
|
860
887
|
// 用户不画圆: 一个 👤 emoji + 名字 (多位用户靠名字分辨); 选中与否只靠名字蓝色加粗 (.on)。
|
|
861
|
-
if (human) return '<title>' + esc(p.name + ' · 用户') + '</title>' +
|
|
888
|
+
if (human) return '<title>' + esc(p.name + ' · 用户') + '</title>' + tap +
|
|
862
889
|
'<g class="rv-body"><text class="rv-emo" y="5.5" text-anchor="middle">👤</text></g>' +
|
|
863
890
|
'<text class="rv-nm" y="' + (rr + 13) + '" text-anchor="middle">' + esc(clipName(p.name, gNameMax())) + '</text>';
|
|
864
|
-
var tip = [p.name, ST_WORD[st], coldOfNode(p) ? COLD_WORD : '', n.host ? '🎩 host' : '',
|
|
865
|
-
return '<title>' + esc(tip) + '</title>' +
|
|
891
|
+
var tip = [p.name, ST_WORD[st], coldOfNode(p) ? COLD_WORD : '', n.host ? '🎩 host' : '', p.lead ? '👑 lead' : '', smartsTip(p)].filter(Boolean).join(' · ');
|
|
892
|
+
return '<title>' + esc(tip) + '</title>' + tap +
|
|
866
893
|
'<g class="rv-body">' + shape('sh', 0) + '</g>' + headGear(topR(sides, rr), n.host, p.lead) +
|
|
867
894
|
'<text class="rv-nm" y="' + (rr + 13) + '" text-anchor="middle">' + esc(clipName(p.name, gNameMax())) + '</text>';
|
|
868
895
|
};
|
|
@@ -870,7 +897,7 @@
|
|
|
870
897
|
// role 不是成员 (旧链接) 时没有这条边, 只有 room 节点 .on。
|
|
871
898
|
var edgeCls = function (l) {
|
|
872
899
|
var sel = !!D.roomId && D.roomId === l.room && (l.direct || isRoleId(String(l.b).slice(2)));
|
|
873
|
-
return 'rv-edge' + (l.host ? ' host' : '') + (l.
|
|
900
|
+
return 'rv-edge' + (l.host ? ' host' : '') + (l.direct ? ' direct' : '') + (l.direct && l.unread ? ' unread' : '') +
|
|
874
901
|
(sel ? ' on sel' : '');
|
|
875
902
|
};
|
|
876
903
|
// 频道框配色: 对频道 id 做稳定 hash 取色相 —— 同一频道每次加载颜色不变, 不同频道可辨;
|
|
@@ -915,8 +942,17 @@
|
|
|
915
942
|
if (e.getAttribute('class') !== 'rv-frame') e.setAttribute('class', 'rv-frame');
|
|
916
943
|
var h = frameHtml(f), t = frameTitle(f);
|
|
917
944
|
if (e._h !== h) { e._h = h; e.innerHTML = h; e._rc = e.querySelector('rect'); }
|
|
918
|
-
var th = '<tspan class="fn">' + esc(t.name) + '</tspan><tspan class="fh' + (t.bound ? '' : ' none') + '">' + esc(t.tail) + '</tspan>'
|
|
945
|
+
var th = '<tspan class="fn">' + esc(t.name) + '</tspan><tspan class="fh' + (t.bound ? '' : ' none') + '">' + esc(t.tail) + '</tspan>' +
|
|
946
|
+
(t.mons || []).map(function (m) { return '<tspan class="fm" data-mon="' + esc(m.target) + '">' + esc(m.text) + '</tspan>'; }).join('');
|
|
919
947
|
if (e._tx._h !== th) { e._tx._h = th; e._tx.setAttribute('class', 'rv-ftl'); e._tx.innerHTML = th; }
|
|
948
|
+
if (!e._tx.onclick) e._tx.onclick = function (ev) {
|
|
949
|
+
var el = ev.target && ev.target.closest ? ev.target.closest('[data-mon]') : null;
|
|
950
|
+
if (!el || S.gmoved) return;
|
|
951
|
+
// 这一下已经由 pointerup 处理过了 (按下时的那颗 chip): 别再切一次, pushNav 会多压一层历史。
|
|
952
|
+
if (Date.now() - (S.gchipAt || 0) < 500) return;
|
|
953
|
+
ev.stopPropagation();
|
|
954
|
+
goRole(el.getAttribute('data-mon')); // 与点击图里那个 monitor 节点同一个动作
|
|
955
|
+
};
|
|
920
956
|
});
|
|
921
957
|
Object.keys(dom.nodes).forEach(function (id) { if (!ids[id]) { dom.nodes[id].remove(); delete dom.nodes[id]; } });
|
|
922
958
|
Object.keys(dom.edges).forEach(function (k) {
|
|
@@ -972,6 +1008,17 @@
|
|
|
972
1008
|
};
|
|
973
1009
|
var start = null;
|
|
974
1010
|
svg.onpointerdown = function (e) {
|
|
1011
|
+
// 频道框标题里的 👁 chip 只认「点」, 不从它起手拖动: 以前它走通用路径, 手抖 4px 就被判成拖背景 (S.gmoved),
|
|
1012
|
+
// 随后的 click 被吞掉 —— 真人点 chip 手都会抖几像素, 看着就是「点不动」。这里直接不起拖, click 照常触发。
|
|
1013
|
+
var chipEl = e.target.closest ? e.target.closest('[data-mon]') : null;
|
|
1014
|
+
if (chipEl) {
|
|
1015
|
+
// 记下按下时的那颗 chip: 图很可能还在收敛 (坐标在动), 到 pointerup 时 chip 已经挪开、click 落空 ——
|
|
1016
|
+
// 所以判定放在 pointerup, 按「按下的那颗 chip」走, 不按抬起处命中的元素走。
|
|
1017
|
+
start = null; S.gmoved = false; S.gdrag = '';
|
|
1018
|
+
S.gchip = { mon: chipEl.getAttribute('data-mon'), x: e.clientX, y: e.clientY };
|
|
1019
|
+
return;
|
|
1020
|
+
}
|
|
1021
|
+
S.gchip = null;
|
|
975
1022
|
var el = e.target.closest ? e.target.closest('[data-node],[data-room]') : null;
|
|
976
1023
|
var node = el && el.getAttribute('data-node'), room = el && el.getAttribute('data-room');
|
|
977
1024
|
start = { id: node ? 'p:' + node : room ? 'r:' + room : '', el: el,
|
|
@@ -1008,6 +1055,15 @@
|
|
|
1008
1055
|
}
|
|
1009
1056
|
};
|
|
1010
1057
|
var stop = function (e) {
|
|
1058
|
+
// 按下的是一颗 👁 chip: 抬起时离按下处 24px 以内就算点它 (图在动也点得中)。
|
|
1059
|
+
if (S.gchip) {
|
|
1060
|
+
var ch = S.gchip; S.gchip = null;
|
|
1061
|
+
var cdx = (e.clientX || 0) - ch.x, cdy = (e.clientY || 0) - ch.y;
|
|
1062
|
+
if (e.type !== 'pointercancel' && cdx * cdx + cdy * cdy < 576) {
|
|
1063
|
+
S.gchipAt = Date.now();
|
|
1064
|
+
goRole(ch.mon);
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1011
1067
|
var held = start && start.id && S.gnodes && S.gnodes[start.id];
|
|
1012
1068
|
start = null;
|
|
1013
1069
|
S.gdrag = '';
|
|
@@ -1034,25 +1090,48 @@
|
|
|
1034
1090
|
};
|
|
1035
1091
|
// 视野: svg 的 viewBox 恒等于它的像素尺寸 (1 单位 = 1 像素), 节点半径 / 名字字号 / 线宽 / 箭头都是固定像素;
|
|
1036
1092
|
// 视野缩放 (k) 与平移只作用在节点中心的坐标上 —— 屏幕坐标 = (布局坐标 − 中心) × k + 画布中点 + 平移。
|
|
1037
|
-
//
|
|
1093
|
+
// 取景只在首次出图 / 双击重排 / 画布尺寸变化时算一次, 之后不再跟着内容跑 (否则谁动一下整张图就重新居中, 看着像自己往左滑)。
|
|
1094
|
+
// k 夹在 0.95~1: 不放大, 也几乎不缩 ——
|
|
1038
1095
|
// 节点和字是固定像素, 再缩只会把名字压到一起; 画布实在放不下 (手机上三十几个节点) 就溢出, 拖背景平移看其余部分;
|
|
1039
1096
|
// 例外: 有频道框时下限放到 0.8 —— 一个框刚好比画布宽一点时宁可按比例缩进画布, 也别把虚线框切在画布边上 (框是频道边界, 切一半看着像少个频道);
|
|
1040
1097
|
|
|
1041
|
-
//
|
|
1098
|
+
// 视野 = 取景 (v0) 叠加用户的缩放 (S.gzoom) 与平移 (S.gpx / S.gpy, 像素): 平移永远由用户拖背景决定, 图不会自己滑。
|
|
1099
|
+
// 以前是「没缩放/平移过就每帧按内容重算」: 布局还在收敛时包围盒每帧都变 → 中心与缩放跟着变, 整张图自己在滑。
|
|
1100
|
+
var gViewFit = function (f, pn, frames, rescue) {
|
|
1101
|
+
// 窄屏 (手机 / 左栏) 上的频道框: 宁可缩到 0.8 也要整个框进画布 (不让虚线框被画布边切掉); 宽屏不变。
|
|
1102
|
+
// rescue = 兜底修正 (见 gRescueView): 内容确实放不下时允许再缩一些, 也要让框 (和它的标题条) 整个进画布。
|
|
1103
|
+
var kmin = rescue ? 0.55 : ((frames || []).length && pn.w < 420 ? 0.8 : 0.95);
|
|
1104
|
+
return { k: Math.max(kmin, Math.min(1, f.k)), cx: f.cx, cy: f.cy };
|
|
1105
|
+
};
|
|
1106
|
+
// 取景只做一次 (首次出图 / 双击重排 / 画布尺寸变了): 不再按内容每帧重算 —— 以前谁动一下 (拖节点、来一条新消息)
|
|
1107
|
+
// 整张图就跟着重新居中/缩放, 看起来就是自己在往左滑。现在视野由用户拖背景平移 (S.gpx / S.gpy) 与滚轮缩放控制。
|
|
1042
1108
|
var gView = function (g) {
|
|
1043
1109
|
var pn = gPanel();
|
|
1044
|
-
if (!S.gv0
|
|
1045
|
-
var f = gFitK(g, pn);
|
|
1046
|
-
// 窄屏 (手机 / 左栏) 上的频道框: 宁可缩到 0.8 也要整个框进画布 (不让虚线框被画布边切掉); 宽屏不变。
|
|
1047
|
-
var kmin = (g.frames || []).length && pn.w < 420 ? 0.8 : 0.95;
|
|
1048
|
-
S.gv0 = { k: Math.max(kmin, Math.min(1, f.k)), cx: f.cx, cy: f.cy };
|
|
1049
|
-
}
|
|
1110
|
+
if (!S.gv0) S.gv0 = gViewFit(gFitK(g, pn), pn, g.frames);
|
|
1050
1111
|
var v0 = S.gv0;
|
|
1051
1112
|
return { w: pn.w, h: pn.h, k: v0.k * (S.gzoom || 1), cx: v0.cx, cy: v0.cy, ox: pn.w / 2 + (S.gpx || 0), oy: pn.h / 2 + (S.gpy || 0) };
|
|
1052
1113
|
};
|
|
1114
|
+
// 取景兜底: 首帧取的景是那一刻的包围盒, 之后布局还在收敛 / 又来了 room 或频道框, 内容就长出了画布 ——
|
|
1115
|
+
// 最上面那个框的标题条 (连着 👁 chip) 被推到画布上边界之外, 既看不见也点不到。
|
|
1116
|
+
// 这里只做一次性修正: 发现框出了画布就按当前内容重新取一次景; 用户自己平移 / 缩放过就完全不动 (视野归用户)。
|
|
1117
|
+
// 不动「每帧按内容重算视野」—— 那会让整张图自己在滑 (见 gViewFit 上面的注释)。
|
|
1118
|
+
var gRescueView = function (g) {
|
|
1119
|
+
if (S.gpx || S.gpy || (S.gzoom || 1) !== 1) return false;
|
|
1120
|
+
var pn = gPanel(), v = gView(g);
|
|
1121
|
+
var X = function (p) { return (p.x - v.cx) * v.k + v.ox; }, Y = function (p) { return (p.y - v.cy) * v.k + v.oy; };
|
|
1122
|
+
var cut = false;
|
|
1123
|
+
(g.frames || []).forEach(function (f) {
|
|
1124
|
+
var b = gFrameBox(f, X, Y);
|
|
1125
|
+
if (b.x0 < -1 || b.y0 < -1 || b.x1 > v.w + 1 || b.y1 > v.h + 1) cut = true;
|
|
1126
|
+
});
|
|
1127
|
+
if (!cut) return false;
|
|
1128
|
+
S.gv0 = gViewFit(gFitK(g, pn), pn, g.frames, true);
|
|
1129
|
+
return true;
|
|
1130
|
+
};
|
|
1053
1131
|
var drawPos = function (g) {
|
|
1054
1132
|
var dom = S.gdom, svg = convsEl.querySelector('.rv-graph');
|
|
1055
1133
|
if (!dom || !svg) return;
|
|
1134
|
+
if (!S.gdrag) gRescueView(g); // 正在拖节点时不动视野
|
|
1056
1135
|
var v = gView(g), box = '0 0 ' + v.w + ' ' + v.h;
|
|
1057
1136
|
if (svg.getAttribute('width') !== String(v.w)) svg.setAttribute('width', v.w);
|
|
1058
1137
|
if (svg.getAttribute('height') !== String(v.h)) svg.setAttribute('height', v.h);
|
|
@@ -1089,6 +1168,7 @@
|
|
|
1089
1168
|
if (S.gpanel === key) return false;
|
|
1090
1169
|
var had = !!S.gpanel;
|
|
1091
1170
|
S.gpanel = key;
|
|
1171
|
+
S.gv0 = null; // 画布尺寸变了: 取景重算一次 (唯一的「自己动」的合法时机之外, 视野不跟着内容跑)
|
|
1092
1172
|
if (had && gFitScale(g)) gKick(0.2);
|
|
1093
1173
|
return true;
|
|
1094
1174
|
};
|
|
@@ -1096,7 +1176,7 @@
|
|
|
1096
1176
|
'<span><i class="lg wz working"></i>工作中</span><span title="停在审批框 / 弹窗上等人点"><i class="lg wz blocked"></i>等审批</span>' +
|
|
1097
1177
|
'<span><i class="lg wz idle"></i>空闲</span><span title="pane 不在, 下一句话会重新拉起"><i class="lg wz asleep"></i>休眠</span>' +
|
|
1098
1178
|
'<span title="叠加属性: 提示缓存已超 TTL, 下一句要重写缓存。空闲 / 休眠的节点都会变白 (休眠的服务端不报缓存, 按最近动静超过 5 分钟估); 工作中 / 等审批不受影响"><i class="lg wz cold"></i>缓存冷</span>' +
|
|
1099
|
-
'<span><span class="lgemo">👤</span>用户</span><span title="room 图标: 多人群聊 (企微群 / 多人 room, 有人参与)"><span class="lgemo">👥</span>群聊</span><span title="room 图标: 人与 wizard 的单聊 (绑定的企微单聊)"><span class="lgemo">💬</span>单聊</span><span title="虚线框 = 一个频道: 框住它名下的 room (帖子 room / 存档频道 room); 标题 = 频道名 + 🎩 host 身份 (频道没有自己的 room, 只绑一个 host 身份)"><i class="lg frm"></i>频道</span><span title="room 图标: 帖子 (频道下某个 topic 帖的评论区, 一帖一个 room)"><span class="lgemo"
|
|
1179
|
+
'<span><span class="lgemo">👤</span>用户</span><span title="room 图标: 多人群聊 (企微群 / 多人 room, 有人参与)"><span class="lgemo">👥</span>群聊</span><span title="room 图标: 人与 wizard 的单聊 (绑定的企微单聊)"><span class="lgemo">💬</span>单聊</span><span title="虚线框 = 一个频道: 框住它名下的 room (帖子 room / 存档频道 room); 标题 = 频道名 + 🎩 host 身份 (频道没有自己的 room, 只绑一个 host 身份)"><i class="lg frm"></i>频道</span><span title="room 图标: 帖子 (频道下某个 topic 帖的评论区, 一帖一个 room)"><span class="lgemo">' + POST_ICON + '</span>帖子</span><span title="旧频道 room: 改造前的频道 room, 现为只读存档 (淡色虚线胶囊), 画在频道框里"><span class="lgemo">#️⃣</span>存档</span><span title="room 图标: 只有 wizard 的 room (dm / 临时多人)"><span class="lgemo">🧙</span>wizard room</span><span title="room 的 host: 本 room 里加入序最小的 wizard"><svg class="lghost" viewBox="-6 -5 12 10" width="13" height="11" aria-hidden="true"><path d="M-3.3 2L-3.3 -3.9L3.3 -3.9L3.3 2Z"/><path class="hb" d="M-3.3 .4L3.3 .4L3.3 2L-3.3 2Z"/><path d="M-5.2 3.6L-5.2 2L5.2 2L5.2 3.6Z"/></svg>host</span>' +
|
|
1100
1180
|
'<span title="被派来领一件复杂活的 lead (daemon 在 lead 派活时记下, 不能自封)"><svg class="lglead" viewBox="-5 -5 10 10" width="11" height="11" aria-hidden="true"><path d="M-4.6 3.6L-4.6 -2.4L-2.3 0L0 -3.9L2.3 0L4.6 -2.4L4.6 3.6Z"/></svg>lead</span>' +
|
|
1101
1181
|
'<span title="聪明程度 = 档位 (tier): 三角形 🧒小学生 mini · 四边形 🎒初中生 light · 五边形 🎓大学生 standard · 六边形 🔬研究生 hard · 圆 👨🏫专家教授 ultra; 档位记在名册里 (出生时按 spawn 的档位, set_model 换模型后按档位表反查更新), 实际模型只作附注; 没有档位 = 五边形"><svg class="lgpoly" viewBox="-6 -6 12 12" width="12" height="12" aria-hidden="true">'+polyEl(3,5.2)+'</svg><svg class="lgpoly" viewBox="-6 -6 12 12" width="12" height="12" aria-hidden="true">'+polyEl(0,5.2)+'</svg>边数 = 聪明程度</span>' +
|
|
1102
1182
|
'</div>';
|
|
@@ -1131,7 +1211,9 @@
|
|
|
1131
1211
|
var first = !svg || !S.gdom;
|
|
1132
1212
|
if (first) {
|
|
1133
1213
|
convsEl.innerHTML = head +
|
|
1134
|
-
|
|
1214
|
+
// 层序 (下 → 上): 框 < 边 < 命中线 < 节点 < 标题。标题必须在节点之上 —— 标题里的 👁 monitor chip 是唯一可点的,
|
|
1215
|
+
// 节点层在上时, 挨着的节点名 / 透明命中圆会盖住它, 点下去命中的是节点 (看着就是 chip 点不动)。
|
|
1216
|
+
'<svg class="rv-graph"><g class="rv-gframes"></g><g class="rv-gedges"></g><g class="rv-ghits"></g><g class="rv-gnodes"></g><g class="rv-gftl"></g></svg>' + GRAPH_LEGEND;
|
|
1135
1217
|
convsEl._html = ''; convsEl._gh = head;
|
|
1136
1218
|
svg = convsEl.querySelector('.rv-graph');
|
|
1137
1219
|
S.gdom = { nodes: {}, edges: {}, frames: {} };
|
|
@@ -3022,7 +3104,7 @@
|
|
|
3022
3104
|
inner.innerHTML = '<div class="rv-none">还没有 room —— 说一句话, 或者在群里 .name 点名一个 wizard。</div>';
|
|
3023
3105
|
};
|
|
3024
3106
|
// ── 样式: 本页新加的 DOM 只在 chat.js 里, 样式也一并带上 (不改 web/chat.css, 无构建) ──
|
|
3025
|
-
var CSS = ".side-body { flex: 1; min-height: 0; display: flex }\n.convs { flex: 1; min-width: 0; overflow: auto; padding: 0 }\n.rv-list { padding: 2px 8px 16px }\n.convs-h { padding: 2px 8px 0 }\n.convs-h h2 { margin-top: 6px }\n.convs h2 > span:nth-of-type(2) { flex: none }\n.convs h2 .vt + .vt { margin-left: 0 }\n.convs h2 .vt.on { color: var(--accent) }\n.convs h2 .vt svg { flex: none }\n@media (min-width: 761px) { .app.side-list .side { width: max(332px, 25vw) } }\n/* 滚动条: 支持 ::-webkit-scrollbar 的 (Chrome / Safari) 走伪元素; 其余 (Firefox) 走标准属性。不能两套并设: Chrome 121+ / Safari 18.2+ 见到 scrollbar-width / scrollbar-color 就让 ::-webkit-scrollbar 整个失效。 */\n@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: thin; scrollbar-color: var(--line) transparent } }\n::-webkit-scrollbar { width: 8px; height: 8px }\n::-webkit-scrollbar-track { background: transparent }\n::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box }\n::-webkit-scrollbar-thumb:hover { background-color: var(--faint) }\n::-webkit-scrollbar-corner { background: transparent }\n.thread-in, .gside, .rolebar, .rv-mh { overflow-wrap: anywhere }\n.rv-bub { min-width: 0; overflow-wrap: anywhere }\n.rv-files { min-width: 0 }\n.rv-files .rv-chip { white-space: normal; overflow-wrap: anywhere; max-width: 100%; line-height: 1.45; padding: 1px 7px }\n.rv-mh > * { min-width: 0 }\n.gs-mem .nm { white-space: normal; overflow-wrap: anywhere }\n.gs-cls { min-width: 0; overflow-wrap: anywhere }\n.rv-list .ci .l2 .rv-chip { flex: none }\n.rv-msg.hit .rv-bub { animation: hit 1.6s ease-out }\n.rv-graph { display: block; font: 11.5px/1 -apple-system, BlinkMacSystemFont, sans-serif; cursor: grab; touch-action: none; user-select: none }\n.rv-edge { stroke: #c9d2df; stroke-width: 1 }\n.rv-edge.unread { stroke: #f2a7ad; stroke-width: 1.6 }\n.rv-edge.on { stroke: var(--accent); stroke-width: 1.6 }\n.rv-hit { stroke: transparent; stroke-width: 12; cursor: pointer }\n.rv-node { cursor: grab }\n.rv-room rect { fill: var(--them); stroke: var(--line) }\n.rv-room text { fill: var(--ink) }\n.rv-room.on > text { fill: var(--accent); font-weight: 700 }\n.rv-person .sh, .smi .sh { fill: var(--card); stroke: var(--mute); stroke-width: 1.6 }\n.rv-person .rv-emo { font-size: 17px; fill: initial }\n.rv-person.human .rv-nm { fill: var(--human); font-weight: 600 }\n.rv-person.wizard.st-working .sh, .smi.st-working .sh { fill: #2da44e; stroke: #1a7f37 }\n.rv-body { transform-box: fill-box; transform-origin: center }\n.rv-person.wizard.st-working .rv-body { animation: rvbreath 1.8s ease-in-out infinite }\n@keyframes rvbreath { 0%, 100% { transform: scale(.88) } 50% { transform: scale(1.14) } }\n.rv-person.wizard.st-blocked .sh, .smi.st-blocked .sh { fill: #e8336d; stroke: #b3124a }\n.rv-person.wizard.st-idle .sh, .smi.st-idle .sh { fill: #e4e7ec; stroke: #7d8795 }\n.rv-person.wizard.st-asleep .sh, .smi.st-asleep .sh { fill: #f6f7f9; stroke: #b9c0ca; stroke-dasharray: 3 2.5 }\n.rv-person.wizard.cold .sh, .smi.cold .sh { fill: #fff; stroke: #c9d0da; stroke-width: 1 }\n.rv-person.wizard.st-asleep text { fill: var(--faint) }\n.rv-hosthat .hh, .rv-legend .lghost path { fill: #7c4dcc; stroke: #2d1a5e; stroke-width: .9; stroke-linejoin: round }\n.rv-hosthat .hb, .rv-legend .lghost .hb { fill: #d9c8ff; stroke: #2d1a5e; stroke-width: .6 }\n.rv-hosthat { pointer-events: none }\n.rv-legend .lghost { flex: none }\n.rv-room .rv-un circle { fill: #cf222e }\n.rv-room .rv-un text { fill: #fff; font-size: 9px; font-weight: 600 }\n.rv-edge.direct { stroke: #9aa7ba; stroke-width: 1.4 }\n.rv-edge.mon { stroke-dasharray: 4 3; stroke: #b3a7d6 }\n.rv-frame rect { fill: var(--cf, #7c4dcc10); stroke: var(--cs, #b9a6e0); stroke-width: 1.1; stroke-dasharray: 6 4 }\n.rv-ftl { font-size: 12px; font-weight: 600; fill: #5b3f8f; pointer-events: none; paint-order: stroke; stroke: #f7f4fd; stroke-width: 3.5px; stroke-linejoin: round }\n.rv-ftl .fh { font-weight: 400; fill: #7c6aa6 }\n.rv-ftl .fh.none { fill: var(--faint); font-style: italic }\n.rv-room.arch { opacity: .6 }\n.rv-room.arch rect { stroke-dasharray: 3 2.5; fill: var(--card) }\n.rv-legend .lg.frm { width: 13px; height: 9px; border: 1.2px dashed #b9a6e0; background: #7c4dcc10; border-radius: 3px }\n.rv-person.wizard.mon .sh { stroke-dasharray: 4 3 }\n.rv-edge.sel { stroke: var(--accent); stroke-width: 3 }\n.rv-person.wizard.on .rv-nm, .rv-person.human.on .rv-nm { fill: var(--accent); font-weight: 700 }\n.rv-legend { display: flex; flex-wrap: wrap; gap: 3px 10px; padding: 4px 10px 8px; font-size: 11px; color: var(--faint) }\n.rv-legend span { display: inline-flex; align-items: center; gap: 4px }\n.rv-legend .lg { display: inline-block; width: 9px; height: 9px; border: 1.6px solid var(--mute); box-sizing: border-box }\n.rv-legend .wz { border-radius: 50% }\n.rv-legend .wz.working { background: #2da44e; border-color: #1a7f37 }\n.rv-legend .wz.idle { background: #e4e7ec; border-color: #7d8795 }\n.rv-legend .wz.blocked { background: #e8336d; border-color: #b3124a }\n.rv-legend .wz.cold { background: #fff; border: 1px solid #c9d0da }\n.rv-legend .wz.asleep { background: #f6f7f9; border-style: dashed; border-color: #b9c0ca }\n.rv-legend .lgemo { font-size: 11px; line-height: 1 }\n.rv-lead { fill: #f5b301; stroke: #6b4a00; stroke-width: .9; stroke-linejoin: round; pointer-events: none }\n.rv-legend .lglead { fill: #f5b301; stroke: #6b4a00; stroke-width: .9 }\n.rv-legend .lgpoly { flex: none }\n.rv-legend .lgpoly polygon, .rv-legend .lgpoly circle { fill: #e4e7ec; stroke: #7d8795; stroke-width: 1.4; stroke-linejoin: round }\n.smi { flex: none; vertical-align: -4px }\n.smi:not([class*=st-]) .sh { fill: #e4e7ec; stroke: #8a93a0 }\n.rolebar .facts .fx-smi { display: inline-flex; align-items: center; cursor: help }\n.rolebar .facts .lead { color: #b07d00 }\n.rv-person text { fill: var(--ink); font-size: 12px }\n.rv-person text.rv-nm { font-size: 12px; paint-order: stroke; stroke: var(--card); stroke-width: 3.5px; stroke-linejoin: round }\n.rv-room text { font-size: 13px }\n.rv-person.ghost .sh { fill: #f6f7f9; stroke: #c9d0da; stroke-dasharray: 3 2.5 }\n.rv-person.ghost text { fill: var(--faint) }\n.rv-ttl { font-size: 15.5px; line-height: 22px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }\n.rv-sub { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-top: 3px; font-size: 11.5px; color: var(--mute) }\n.rv-lb { font-size: 15px }\n.rv-chip { display: inline-flex; align-items: center; padding: 0 6px; border-radius: 999px; background: var(--them); color: var(--mute); font-size: 11px; line-height: 17px; white-space: nowrap }\n.rv-chip.ok { background: #e8f5ee; color: #1a7f3c }\n.rv-chip.warn { background: #fdf1e3; color: #9a5b10 }\n.rv-chip.ask, .rv-chip.bad { background: #fdecec; color: #b42318 }\n.rv-chip.go { background: var(--mine); color: var(--accent) }\n.rv-chip.file { background: var(--them-soft) }\n.rv-chip.re { background: transparent; color: var(--faint); border: 1px solid var(--line) }\n.rv-act { border: 1px solid var(--line); background: var(--card); border-radius: 7px; padding: 2px 9px; font-size: 12px; cursor: pointer; color: var(--mute) }\n.rv-act:hover, .rv-act.on { color: var(--accent); border-color: var(--accent) }\n/* 图右侧的成员列: 点开一个 room 才有, 看 wizard 时收起。 */\n.gside { flex: none; width: 252px; min-height: 0; overflow: auto; border-left: 1px solid var(--line); background: var(--card); padding: 8px }\n.gs-host { flex: none; font-size: 11px; line-height: 1 }\n.gside[hidden] { display: none }\n.gs-head { display: flex; align-items: center; gap: 8px; padding: 0 2px 4px; color: var(--faint); font-size: 12px; line-height: 20px }\n.gs-hl { min-width: 0 }\n.gs-hn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: auto }\n.gs-x { display: none; flex: none; margin-left: auto; width: 32px; height: 32px; border: 0; background: none; color: var(--mute); font-size: 15px; cursor: pointer }\n.gs-hn + .gs-x { margin-left: 0 }\n.gs-meta { display: flex; flex-wrap: wrap; gap: 0 8px; padding: 0 2px 4px; color: var(--faint); font-size: 11px; line-height: 1.6 }\n.gs-notice { display: flex; align-items: flex-start; gap: 5px; width: 100%; margin: 0 0 6px; padding: 5px 8px; border: 0; border-radius: 8px; background: #fff8e1; color: #6b4a00; font: inherit; font-size: 11.5px; line-height: 1.5; text-align: left; cursor: pointer }\n.gs-notice:hover { background: #fff3cd }\n.gs-np { flex: none; font-size: 11px }\n.gs-nt { min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical }\n.gs-notice.on .gs-nt { display: block; -webkit-line-clamp: unset; overflow: visible }\n.gs-srcs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 0 6px; padding: 4px 6px; border-radius: 8px; background: var(--paper); font-size: 11.5px; line-height: 1.5 }\n.gs-sbt { flex: none; color: var(--faint); font-size: 10.5px }\n.gs-src { display: inline-flex; align-items: center; gap: 3px; max-width: 100%; border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; background: var(--card); color: var(--mute); font: inherit; font-size: 11px; line-height: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }\n.gs-src.post { border-color: #cbb7ea; color: #5b3f8f; background: #f6f1fd }\nbutton.gs-src { cursor: pointer }\nbutton.gs-src:hover { color: var(--accent); border-color: var(--accent) }\n.gs-head b { color: var(--mute); font-weight: 600 }\n.gs-duty { color: #b42318; font-weight: 600 }\n.gs-list { padding-top: 2px }\n.gs-item { border-radius: 6px }\n.gs-item.grp { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--paper) }\n.gs-row { display: flex; align-items: center; gap: 4px; min-width: 0; border-radius: 6px; padding-right: 6px }\n.gs-row:hover { background: var(--paper) }\n.gs-ago { flex: none; min-width: 2.6em; text-align: right; color: var(--faint); font-size: 10.5px; white-space: nowrap; cursor: pointer }\n.gs-ago.none { opacity: .6 }\n.gs-role { flex: none; font-size: 11px; line-height: 1; width: 10px; text-align: center; opacity: .8 }\n.gs-host, .gs-lead { flex: none; font-size: 11px; line-height: 1 }\n.gs-blk { margin-left: -2px; font-weight: 600; font-size: 10.5px; color: #b3124a }\n.gs-due.on { background: #b42318; color: #fff }\n.gs-ch { width: 0; height: 0; border-left: 3.5px solid currentColor; border-top: 3px solid transparent; border-bottom: 3px solid transparent; transition: transform .12s }\n.gs-due.on .gs-ch { transform: rotate(90deg) }\n.gs-duties { display: flex; flex-direction: column; gap: 2px; margin: 2px 4px 4px 10px; padding-left: 6px; border-left: 2px solid #f3c6c6 }\n.gs-dt { display: flex; flex-direction: column; gap: 0; text-align: left; border: 0; border-radius: 5px; padding: 2px 6px; background: none; cursor: pointer; font: inherit; color: inherit }\n.gs-dt:hover { background: var(--paper) }\n.gs-dq { font-size: 10.5px; color: var(--mute) }\n.gs-dq b { color: #b42318; font-weight: 600 }\n.gs-ds { font-size: 11px; line-height: 1.45; color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical }\n.gs-open { display: none }\n.gs-pip { display: inline-block; width: 6px; height: 6px; margin-left: 4px; border-radius: 50%; background: #cf222e; vertical-align: 2px }\n.gs-list { display: flex; flex-direction: column; gap: 2px }\n.gs-mem { display: flex; align-items: center; gap: 5px; flex: 1; min-width: 0; padding: 5px 6px; border: 0; border-radius: 6px; background: none; color: var(--ink); text-align: left; cursor: pointer }\n.gs-mem .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px }\n.gs-mem.human .nm { color: var(--human) }\n.gs-mem.busy .nm { color: var(--accent) }\n.gs-cls { flex: none; color: var(--faint); font-size: 10.5px }\n.gs-row:has(.gs-mem.me), .gs-row:has(.gs-mem.me):hover { background: var(--mine) }\n.gs-item.out .gs-mem .nm, .gs-item.out .gs-mem.human .nm, .gs-item.out .gs-mem.busy .nm { color: var(--faint) }\n.gs-item.out .gs-ago, .gs-item.out .gs-role, .gs-item.out .gs-host, .gs-item.out .gs-lead, .gs-item.out .smi { opacity: .6 }\n.gs-pov { flex: none; font-size: 11px; line-height: 1 }\n.gs-due { flex: none; display: inline-flex; align-items: center; gap: 3px; border: 0; border-radius: 999px; padding: 0 6px; background: #fdecec; color: #b42318; font-size: 10.5px; line-height: 17px; cursor: pointer }\n@media (max-width: 760px) { .gside { display: none } .gs-open { display: inline-flex; align-items: center } .gside.sheet:not([hidden]) { display: block; position: fixed; left: 0; right: 0; bottom: 0; width: auto; max-height: 72vh; z-index: 30; border-left: 0; border-top: 1px solid var(--line); border-radius: 14px 14px 0 0; box-shadow: 0 -10px 32px #0003; padding: 8px 12px calc(10px + env(safe-area-inset-bottom)) } .gside.sheet .gs-x { display: inline-block } .gside.sheet .gs-mem { padding: 10px 6px } .gside.sheet .gs-dt { padding: 5px 6px } .gside.sheet .gs-due { padding: 3px 10px } .gside.sheet .gs-ago { font-size: 11.5px } .gside.sheet .gs-row { gap: 8px } }\n.rv-older { display: block; margin: 8px auto; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 2px 12px; font-size: 12px; color: var(--mute); cursor: pointer }\n/* 一条消息: 头在气泡外 (谁 → 谁 · room · 时刻), 气泡只装正文。 */\n.rv-msg { display: flex; flex-direction: column; gap: 3px; margin: 10px 0; min-width: 0 }\n.rv-msg > .rv-mh { padding: 0 2px }\n.rv-bub { align-self: flex-start; max-width: min(88%, 720px); padding: 8px 13px; background: var(--them); border: 0; border-radius: 14px }\n.rv-msg.me .rv-bub { align-self: flex-end; background: var(--mine) }\n.rv-msg.k-system .rv-bub { background: var(--them-soft, var(--them)) }\n.rv-msg.me .rv-turn .bubbles > .say { align-self: flex-end }\n.rv-mh { display: flex; flex-wrap: wrap; gap: 3px 8px; align-items: center; font-size: 11.5px; color: var(--mute) }\n.rv-path { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 5px; min-width: 0 }\n.rv-arr { color: var(--faint); white-space: nowrap }\n.rv-arr::before { content: '→' }\n.rv-via::before { content: '—' }\n.rv-via::after { content: '→' }\n.rv-msg.me > .rv-mh, .rv-msg.me .rv-spk > .rv-mh { flex-direction: row-reverse }\n.rv-msg.me .rv-path { flex-direction: row-reverse }\n.rv-msg.me .rv-arr::before { content: '←' }\n.rv-msg.me .rv-via::before { content: '←' }\n.rv-msg.me .rv-via::after { content: '—' }\n.rv-msg.me .rv-rawbtn { margin-left: 0 }\n.rv-au { font-weight: 600; color: var(--ink); cursor: pointer }\n.rv-au:hover { text-decoration: underline dotted var(--faint); text-underline-offset: 3px }\n.rv-au.human { color: var(--human) }\n.rv-au.daemon { color: var(--wezard) }\n.rv-tag { color: var(--accent); cursor: pointer }\n.rv-roomtag { color: var(--chat); cursor: pointer; font-size: 11px; margin: 0 1px }\n.rv-roomtag:hover { text-decoration: underline dotted; text-underline-offset: 3px }\n.rv-mh time { color: var(--faint) }\n.rv-open { border: 1px solid var(--line); background: transparent; border-radius: 6px; padding: 0 6px; font-size: 11px; color: var(--faint); cursor: pointer }\n.rv-open:hover { color: var(--accent); border-color: var(--accent) }\n.rv-quote { margin: 0 0 6px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px; min-width: 0 }\n.rv-quote .rq-it { flex: 1; min-width: 0; max-width: 100%; box-sizing: border-box; overflow: hidden; display: flex; flex-direction: column; gap: 1px; text-align: left; border: 0; border-radius: 8px; padding: 4px 8px; background: #0000000a; font: inherit; cursor: pointer; color: inherit }\n.rv-quote .rq-it:hover { background: #00000012 }\n.rv-quote .rq-who { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; font-weight: 600; color: var(--accent) }\n.rv-quote .rq-who.human { color: var(--human) }\n.rv-quote .rq-tx { display: block; min-width: 0; max-width: 100%; font-size: 12px; line-height: 1.45; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }\n.rv-quote .rq-gone { font-style: italic; color: var(--faint); cursor: default }\n.rv-quote .rq-more { flex: none; align-self: center; border: 0; border-radius: 999px; padding: 0 7px; font-size: 11px; line-height: 18px; background: #0000000a; color: var(--mute); cursor: pointer }\n.rv-quote .rq-more.on { color: var(--accent); background: var(--mine) }\n.rv-quote .rq-rest { flex-basis: 100%; display: flex; flex-direction: column; gap: 4px }\n.rv-quote .rq-rest[hidden] { display: none }\n.rv-open { display: inline-flex; align-items: center; gap: 4px }\n.rv-och { width: 0; height: 0; border-left: 4px solid currentColor; border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent; transition: transform .12s }\n.rv-open.on { background: var(--mine); color: var(--accent); border-color: var(--accent); font-weight: 600 }\n.rv-open.on .rv-och { transform: rotate(90deg) }\n.rv-tx { font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; color: #1f2328 }\n.rv-tx > :first-child { margin-top: 0 }\n.rv-tx > :last-child { margin-bottom: 0 }\n.rv-tx p { margin: .6em 0 }\n.rv-tx h1, .rv-tx h2, .rv-tx h3, .rv-tx h4 { margin: 1em 0 .4em; font-weight: 600; line-height: 1.35 }\n.rv-tx h1 { font-size: 1.4em }\n.rv-tx h2 { font-size: 1.2em }\n.rv-tx h3 { font-size: 1.05em }\n.rv-tx h4 { font-size: 1em }\n.rv-tx ul, .rv-tx ol { margin: .6em 0; padding-left: 1.6em }\n.rv-tx li { margin: .2em 0 }\n.rv-tx li > p { margin: .2em 0 }\n.rv-tx code { background: #0000000d; border-radius: 4px; padding: 1px 5px; font-size: .9em; font-family: ui-monospace, Menlo, monospace }\n.rv-tx pre { background: #ffffffb3; border-radius: 8px; padding: 8px 10px; margin: .6em 0; overflow: auto; font-size: 12.5px; line-height: 1.5 }\n.rv-tx pre code { background: transparent; padding: 0; font-size: inherit }\n.rv-tx blockquote { margin: .6em 0; padding: .1em 1em; border-left: 3px solid #0000001f; color: #656d76 }\n.rv-tx table { border-collapse: collapse; margin: .7em 0; display: block; overflow: auto; max-width: 100% }\n.rv-tx th, .rv-tx td { border: 1px solid #0000001a; padding: 5px 10px }\n.rv-tx th { background: #0000000a; font-weight: 600 }\n.rv-tx hr { border: 0; border-top: 1px solid #0000001a; margin: .9em 0 }\n.rv-tx a { color: #0969da; text-decoration: none }\n.rv-tx a:hover { text-decoration: underline }\n.rv-empty { color: var(--faint); font-size: 12px; margin: 0 }\n.rv-box { margin-top: 4px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 10px; background: var(--card) }\n.rv-box[hidden] { display: none }\n.rv-turn { margin: 0; padding: 0; border: 0; background: none }\n.rv-turn .turn-group { margin: 0 }\n.rv-mark { margin: 10px 12px; display: flex; justify-content: center }\n.rv-box .turn-group { margin: 0 }\n.rv-none { padding: 14px; color: var(--faint); font-size: 12.5px }\n.rv-note { margin: 8px 12px; padding: 7px 10px; border-radius: 8px; background: #fdf1e3; color: #9a5b10; font-size: 12px }\n.rv-charter { margin: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 12px }\n.rv-charter h4 { margin: 6px 0 2px; font-size: 11.5px; color: var(--faint); font-weight: 600 }\n.rv-charter h5 { margin: 8px 0 2px; font-size: 11.5px; color: var(--faint) }\n.rv-charter pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11.5px; color: var(--mute) }\n/* 一轮写进账本的气泡: 过程框下面, 靠自己那一侧; 多颗时各带一行小头 (去处 / 定论)。 */\n.rv-spk { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; min-width: 0 }\n.rv-msg.me .rv-spk { align-items: flex-end }\n.rv-smh { font-size: 11px }\n.rv-smh time { margin-left: 6px }\n.rv-files { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px }\n/* reminder 标签收在气泡底: 默认只露种类, 点开看原文。 */\n.rv-bub .rems { padding: 4px 0 0 }\n.rv-bub .rem-raw { max-height: 360px; overflow: auto }\n.rv-mh .mstat { display: inline-flex; gap: 6px; align-items: center; color: var(--faint) }\n.ho-who[data-node], .ho-line[data-node] { cursor: pointer }\n/* 标题行: room 名 × 👁 role 名 —— ×「取消选择 room」夹在两者之间, 消除的是前者。× 触控区 32px (窄屏不挤标题: 标题先让位 min-width:0), 字形 14px, 与返回键 chevron 同一套线描。 */\n.rv-trow { display: flex; align-items: center; gap: 2px; min-width: 0 }\n.rv-trow .rv-ttl { min-width: 0; flex: 0 1 auto }\n.rv-pov-tag { flex: 0 1 auto; min-width: 4.2em; max-width: 45%; margin-left: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 400; color: var(--faint) }\n.rv-clr { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin: -5px 0; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--mute); cursor: pointer }\n.rv-clr:hover, .rv-clr:focus-visible { color: var(--ink); background: var(--paper) }\n.rv-clr svg { display: block }\n.rv-sys { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 8px; margin: 8px 12px; padding: 0 4px; min-width: 0; color: var(--faint); font-size: 11.5px; line-height: 1.6; text-align: center; overflow-wrap: anywhere }\n.rv-sys time { flex: none; font-size: 10.5px; opacity: .8 }\n.rv-sys.remove > span { color: var(--mute) }";
|
|
3107
|
+
var CSS = ".side-body { flex: 1; min-height: 0; display: flex }\n.convs { flex: 1; min-width: 0; overflow: auto; padding: 0 }\n.rv-list { padding: 2px 8px 16px }\n.convs-h { padding: 2px 8px 0 }\n.convs-h h2 { margin-top: 6px }\n.convs h2 > span:nth-of-type(2) { flex: none }\n.convs h2 .vt + .vt { margin-left: 0 }\n.convs h2 .vt.on { color: var(--accent) }\n.convs h2 .vt svg { flex: none }\n@media (min-width: 761px) { .app.side-list .side { width: max(332px, 25vw) } }\n/* 滚动条: 支持 ::-webkit-scrollbar 的 (Chrome / Safari) 走伪元素; 其余 (Firefox) 走标准属性。不能两套并设: Chrome 121+ / Safari 18.2+ 见到 scrollbar-width / scrollbar-color 就让 ::-webkit-scrollbar 整个失效。 */\n@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: thin; scrollbar-color: var(--line) transparent } }\n::-webkit-scrollbar { width: 8px; height: 8px }\n::-webkit-scrollbar-track { background: transparent }\n::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box }\n::-webkit-scrollbar-thumb:hover { background-color: var(--faint) }\n::-webkit-scrollbar-corner { background: transparent }\n.thread-in, .gside, .rolebar, .rv-mh { overflow-wrap: anywhere }\n.rv-bub { min-width: 0; overflow-wrap: anywhere }\n.rv-files { min-width: 0 }\n.rv-files .rv-chip { white-space: normal; overflow-wrap: anywhere; max-width: 100%; line-height: 1.45; padding: 1px 7px }\n.rv-mh > * { min-width: 0 }\n.gs-mem .nm { white-space: normal; overflow-wrap: anywhere }\n.gs-cls { min-width: 0; overflow-wrap: anywhere }\n.rv-list .ci .l2 .rv-chip { flex: none }\n.rv-msg.hit .rv-bub { animation: hit 1.6s ease-out }\n.rv-graph { display: block; font: 11.5px/1 -apple-system, BlinkMacSystemFont, sans-serif; cursor: grab; touch-action: none; user-select: none }\n.rv-edge { stroke: #c9d2df; stroke-width: 1 }\n.rv-edge.unread { stroke: #f2a7ad; stroke-width: 1.6 }\n.rv-edge.on { stroke: var(--accent); stroke-width: 1.6 }\n.rv-hit { stroke: transparent; stroke-width: 12; cursor: pointer }\n.rv-node { cursor: grab }\n.rv-tap { fill: transparent; stroke: none; pointer-events: all }\n.rv-room rect { fill: var(--them); stroke: var(--line) }\n.rv-room text { fill: var(--ink) }\n.rv-room.on > text { fill: var(--accent); font-weight: 700 }\n.rv-person .sh, .smi .sh { fill: var(--card); stroke: var(--mute); stroke-width: 1.6 }\n.rv-person .rv-emo { font-size: 17px; fill: initial }\n.rv-person.human .rv-nm { fill: var(--human); font-weight: 600 }\n.rv-person.wizard.st-working .sh, .smi.st-working .sh { fill: #2da44e; stroke: #1a7f37 }\n.rv-body { transform-box: fill-box; transform-origin: center }\n.rv-person.wizard.st-working .rv-body { animation: rvbreath 1.8s ease-in-out infinite }\n@keyframes rvbreath { 0%, 100% { transform: scale(.88) } 50% { transform: scale(1.14) } }\n.rv-person.wizard.st-blocked .sh, .smi.st-blocked .sh { fill: #e8336d; stroke: #b3124a }\n.rv-person.wizard.st-idle .sh, .smi.st-idle .sh { fill: #e4e7ec; stroke: #7d8795 }\n.rv-person.wizard.st-asleep .sh, .smi.st-asleep .sh { fill: #f6f7f9; stroke: #b9c0ca; stroke-dasharray: 3 2.5 }\n.rv-person.wizard.cold .sh, .smi.cold .sh { fill: #fff; stroke: #c9d0da; stroke-width: 1 }\n.rv-person.wizard.st-asleep text { fill: var(--faint) }\n.rv-hosthat .hh, .rv-legend .lghost path { fill: #7c4dcc; stroke: #2d1a5e; stroke-width: .9; stroke-linejoin: round }\n.rv-hosthat .hb, .rv-legend .lghost .hb { fill: #d9c8ff; stroke: #2d1a5e; stroke-width: .6 }\n.rv-hosthat { pointer-events: none }\n.rv-legend .lghost { flex: none }\n.rv-room .rv-un circle { fill: #cf222e }\n.rv-room .rv-un text { fill: #fff; font-size: 9px; font-weight: 600 }\n.rv-edge.direct { stroke: #9aa7ba; stroke-width: 1.4 }\n.rv-frame rect { fill: var(--cf, #7c4dcc10); stroke: var(--cs, #b9a6e0); stroke-width: 1.1; stroke-dasharray: 6 4 }\n.rv-ftl { font-size: 12px; font-weight: 600; fill: #5b3f8f; pointer-events: none; paint-order: stroke; stroke: #f7f4fd; stroke-width: 3.5px; stroke-linejoin: round }\n.rv-ftl .fh { font-weight: 400; fill: #7c6aa6 }\n.rv-ftl .fh.none { fill: var(--faint); font-style: italic }\n.rv-ftl .fm { pointer-events: all; cursor: pointer; fill: var(--accent) }\n.rv-ftl .fm:hover { text-decoration: underline; text-underline-offset: 2px }\n.rv-room.arch { opacity: .6 }\n.rv-room.arch rect { stroke-dasharray: 3 2.5; fill: var(--card) }\n.rv-legend .lg.frm { width: 13px; height: 9px; border: 1.2px dashed #b9a6e0; background: #7c4dcc10; border-radius: 3px }\n.rv-edge.sel { stroke: var(--accent); stroke-width: 3 }\n.rv-person.wizard.on .rv-nm, .rv-person.human.on .rv-nm { fill: var(--accent); font-weight: 700 }\n.rv-legend { display: flex; flex-wrap: wrap; gap: 3px 10px; padding: 4px 10px 8px; font-size: 11px; color: var(--faint) }\n.rv-legend span { display: inline-flex; align-items: center; gap: 4px }\n.rv-legend .lg { display: inline-block; width: 9px; height: 9px; border: 1.6px solid var(--mute); box-sizing: border-box }\n.rv-legend .wz { border-radius: 50% }\n.rv-legend .wz.working { background: #2da44e; border-color: #1a7f37 }\n.rv-legend .wz.idle { background: #e4e7ec; border-color: #7d8795 }\n.rv-legend .wz.blocked { background: #e8336d; border-color: #b3124a }\n.rv-legend .wz.cold { background: #fff; border: 1px solid #c9d0da }\n.rv-legend .wz.asleep { background: #f6f7f9; border-style: dashed; border-color: #b9c0ca }\n.rv-legend .lgemo { font-size: 11px; line-height: 1 }\n.rv-lead { fill: #f5b301; stroke: #6b4a00; stroke-width: .9; stroke-linejoin: round; pointer-events: none }\n.rv-legend .lglead { fill: #f5b301; stroke: #6b4a00; stroke-width: .9 }\n.rv-legend .lgpoly { flex: none }\n.rv-legend .lgpoly polygon, .rv-legend .lgpoly circle { fill: #e4e7ec; stroke: #7d8795; stroke-width: 1.4; stroke-linejoin: round }\n.smi { flex: none; vertical-align: -4px }\n.smi:not([class*=st-]) .sh { fill: #e4e7ec; stroke: #8a93a0 }\n.rolebar .facts .fx-smi { display: inline-flex; align-items: center; cursor: help }\n.rolebar .facts .lead { color: #b07d00 }\n.rv-person text { fill: var(--ink); font-size: 12px }\n.rv-person text.rv-nm { font-size: 12px; paint-order: stroke; stroke: var(--card); stroke-width: 3.5px; stroke-linejoin: round }\n.rv-room text { font-size: 13px }\n.rv-person.ghost .sh { fill: #f6f7f9; stroke: #c9d0da; stroke-dasharray: 3 2.5 }\n.rv-person.ghost text { fill: var(--faint) }\n.rv-ttl { font-size: 15.5px; line-height: 22px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }\n.rv-sub { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-top: 3px; font-size: 11.5px; color: var(--mute) }\n.rv-lb { font-size: 15px }\n.rv-chip { display: inline-flex; align-items: center; padding: 0 6px; border-radius: 999px; background: var(--them); color: var(--mute); font-size: 11px; line-height: 17px; white-space: nowrap }\n.rv-chip.ok { background: #e8f5ee; color: #1a7f3c }\n.rv-chip.warn { background: #fdf1e3; color: #9a5b10 }\n.rv-chip.ask, .rv-chip.bad { background: #fdecec; color: #b42318 }\n.rv-chip.go { background: var(--mine); color: var(--accent) }\n.rv-chip.file { background: var(--them-soft) }\n.rv-chip.re { background: transparent; color: var(--faint); border: 1px solid var(--line) }\n.rv-act { border: 1px solid var(--line); background: var(--card); border-radius: 7px; padding: 2px 9px; font-size: 12px; cursor: pointer; color: var(--mute) }\n.rv-act:hover, .rv-act.on { color: var(--accent); border-color: var(--accent) }\n/* 图右侧的成员列: 点开一个 room 才有, 看 wizard 时收起。 */\n.gside { flex: none; width: 252px; min-height: 0; overflow: auto; border-left: 1px solid var(--line); background: var(--card); padding: 8px }\n.gs-host { flex: none; font-size: 11px; line-height: 1 }\n.gside[hidden] { display: none }\n.gs-head { display: flex; align-items: center; gap: 8px; padding: 0 2px 4px; color: var(--faint); font-size: 12px; line-height: 20px }\n.gs-hl { min-width: 0 }\n.gs-hn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: auto }\n.gs-x { display: none; flex: none; margin-left: auto; width: 32px; height: 32px; border: 0; background: none; color: var(--mute); font-size: 15px; cursor: pointer }\n.gs-hn + .gs-x { margin-left: 0 }\n.gs-meta { display: flex; flex-wrap: wrap; gap: 0 8px; padding: 0 2px 4px; color: var(--faint); font-size: 11px; line-height: 1.6 }\n.gs-notice { display: flex; align-items: flex-start; gap: 5px; width: 100%; margin: 0 0 6px; padding: 5px 8px; border: 0; border-radius: 8px; background: #fff8e1; color: #6b4a00; font: inherit; font-size: 11.5px; line-height: 1.5; text-align: left; cursor: pointer }\n.gs-notice:hover { background: #fff3cd }\n.gs-np { flex: none; font-size: 11px }\n.gs-nt { min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical }\n.gs-notice.on .gs-nt { display: block; -webkit-line-clamp: unset; overflow: visible }\n.gs-srcs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 0 6px; padding: 4px 6px; border-radius: 8px; background: var(--paper); font-size: 11.5px; line-height: 1.5 }\n.gs-sbt { flex: none; color: var(--faint); font-size: 10.5px }\n.gs-src { display: inline-flex; align-items: center; gap: 3px; max-width: 100%; border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; background: var(--card); color: var(--mute); font: inherit; font-size: 11px; line-height: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }\n.gs-src.post { border-color: #cbb7ea; color: #5b3f8f; background: #f6f1fd }\nbutton.gs-src { cursor: pointer }\nbutton.gs-src:hover { color: var(--accent); border-color: var(--accent) }\n.gs-head b { color: var(--mute); font-weight: 600 }\n.gs-duty { color: #b42318; font-weight: 600 }\n.gs-list { padding-top: 2px }\n.gs-item { border-radius: 6px }\n.gs-item.grp { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--paper) }\n.gs-row { display: flex; align-items: center; gap: 4px; min-width: 0; border-radius: 6px; padding-right: 6px }\n.gs-row:hover { background: var(--paper) }\n.gs-ago { flex: none; min-width: 2.6em; text-align: right; color: var(--faint); font-size: 10.5px; white-space: nowrap; cursor: pointer }\n.gs-ago.none { opacity: .6 }\n.gs-role { flex: none; font-size: 11px; line-height: 1; width: 10px; text-align: center; opacity: .8 }\n.gs-host, .gs-lead { flex: none; font-size: 11px; line-height: 1 }\n.gs-blk { margin-left: -2px; font-weight: 600; font-size: 10.5px; color: #b3124a }\n.gs-due.on { background: #b42318; color: #fff }\n.gs-ch { width: 0; height: 0; border-left: 3.5px solid currentColor; border-top: 3px solid transparent; border-bottom: 3px solid transparent; transition: transform .12s }\n.gs-due.on .gs-ch { transform: rotate(90deg) }\n.gs-duties { display: flex; flex-direction: column; gap: 2px; margin: 2px 4px 4px 10px; padding-left: 6px; border-left: 2px solid #f3c6c6 }\n.gs-dt { display: flex; flex-direction: column; gap: 0; text-align: left; border: 0; border-radius: 5px; padding: 2px 6px; background: none; cursor: pointer; font: inherit; color: inherit }\n.gs-dt:hover { background: var(--paper) }\n.gs-dq { font-size: 10.5px; color: var(--mute) }\n.gs-dq b { color: #b42318; font-weight: 600 }\n.gs-ds { font-size: 11px; line-height: 1.45; color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical }\n.gs-open { display: none }\n.gs-pip { display: inline-block; width: 6px; height: 6px; margin-left: 4px; border-radius: 50%; background: #cf222e; vertical-align: 2px }\n.gs-list { display: flex; flex-direction: column; gap: 2px }\n.gs-mem { display: flex; align-items: center; gap: 5px; flex: 1; min-width: 0; padding: 5px 6px; border: 0; border-radius: 6px; background: none; color: var(--ink); text-align: left; cursor: pointer }\n.gs-mem .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px }\n.gs-mem.human .nm { color: var(--human) }\n.gs-mem.busy .nm { color: var(--accent) }\n.gs-cls { flex: none; color: var(--faint); font-size: 10.5px }\n.gs-row:has(.gs-mem.me), .gs-row:has(.gs-mem.me):hover { background: var(--mine) }\n.gs-item.out .gs-mem .nm, .gs-item.out .gs-mem.human .nm, .gs-item.out .gs-mem.busy .nm { color: var(--faint) }\n.gs-item.out .gs-ago, .gs-item.out .gs-role, .gs-item.out .gs-host, .gs-item.out .gs-lead, .gs-item.out .smi { opacity: .6 }\n.gs-pov { flex: none; font-size: 11px; line-height: 1 }\n.gs-due { flex: none; display: inline-flex; align-items: center; gap: 3px; border: 0; border-radius: 999px; padding: 0 6px; background: #fdecec; color: #b42318; font-size: 10.5px; line-height: 17px; cursor: pointer }\n@media (max-width: 760px) { .gside { display: none } .gs-open { display: inline-flex; align-items: center } .gside.sheet:not([hidden]) { display: block; position: fixed; left: 0; right: 0; bottom: 0; width: auto; max-height: 72vh; z-index: 30; border-left: 0; border-top: 1px solid var(--line); border-radius: 14px 14px 0 0; box-shadow: 0 -10px 32px #0003; padding: 8px 12px calc(10px + env(safe-area-inset-bottom)) } .gside.sheet .gs-x { display: inline-block } .gside.sheet .gs-mem { padding: 10px 6px } .gside.sheet .gs-dt { padding: 5px 6px } .gside.sheet .gs-due { padding: 3px 10px } .gside.sheet .gs-ago { font-size: 11.5px } .gside.sheet .gs-row { gap: 8px } }\n.rv-older { display: block; margin: 8px auto; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 2px 12px; font-size: 12px; color: var(--mute); cursor: pointer }\n/* 一条消息: 头在气泡外 (谁 → 谁 · room · 时刻), 气泡只装正文。 */\n.rv-msg { display: flex; flex-direction: column; gap: 3px; margin: 10px 0; min-width: 0 }\n.rv-msg > .rv-mh { padding: 0 2px }\n.rv-bub { align-self: flex-start; max-width: min(88%, 720px); padding: 8px 13px; background: var(--them); border: 0; border-radius: 14px }\n.rv-msg.me .rv-bub { align-self: flex-end; background: var(--mine) }\n.rv-msg.k-system .rv-bub { background: var(--them-soft, var(--them)) }\n.rv-msg.me .rv-turn .bubbles > .say { align-self: flex-end }\n.rv-mh { display: flex; flex-wrap: wrap; gap: 3px 8px; align-items: center; font-size: 11.5px; color: var(--mute) }\n.rv-path { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 5px; min-width: 0 }\n.rv-arr { color: var(--faint); white-space: nowrap }\n.rv-arr::before { content: '→' }\n.rv-via::before { content: '—' }\n.rv-via::after { content: '→' }\n.rv-msg.me > .rv-mh, .rv-msg.me .rv-spk > .rv-mh { flex-direction: row-reverse }\n.rv-msg.me .rv-path { flex-direction: row-reverse }\n.rv-msg.me .rv-arr::before { content: '←' }\n.rv-msg.me .rv-via::before { content: '←' }\n.rv-msg.me .rv-via::after { content: '—' }\n.rv-msg.me .rv-rawbtn { margin-left: 0 }\n.rv-au { font-weight: 600; color: var(--ink); cursor: pointer }\n.rv-au:hover { text-decoration: underline dotted var(--faint); text-underline-offset: 3px }\n.rv-au.human { color: var(--human) }\n.rv-au.daemon { color: var(--wezard) }\n.rv-tag { color: var(--accent); cursor: pointer }\n.rv-roomtag { color: var(--chat); cursor: pointer; font-size: 11px; margin: 0 1px }\n.rv-roomtag:hover { text-decoration: underline dotted; text-underline-offset: 3px }\n.rv-mh time { color: var(--faint) }\n.rv-open { border: 1px solid var(--line); background: transparent; border-radius: 6px; padding: 0 6px; font-size: 11px; color: var(--faint); cursor: pointer }\n.rv-open:hover { color: var(--accent); border-color: var(--accent) }\n.rv-quote { margin: 0 0 6px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px; min-width: 0 }\n.rv-quote .rq-it { flex: 1; min-width: 0; max-width: 100%; box-sizing: border-box; overflow: hidden; display: flex; flex-direction: column; gap: 1px; text-align: left; border: 0; border-radius: 8px; padding: 4px 8px; background: #0000000a; font: inherit; cursor: pointer; color: inherit }\n.rv-quote .rq-it:hover { background: #00000012 }\n.rv-quote .rq-who { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; font-weight: 600; color: var(--accent) }\n.rv-quote .rq-who.human { color: var(--human) }\n.rv-quote .rq-tx { display: block; min-width: 0; max-width: 100%; font-size: 12px; line-height: 1.45; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }\n.rv-quote .rq-gone { font-style: italic; color: var(--faint); cursor: default }\n.rv-quote .rq-more { flex: none; align-self: center; border: 0; border-radius: 999px; padding: 0 7px; font-size: 11px; line-height: 18px; background: #0000000a; color: var(--mute); cursor: pointer }\n.rv-quote .rq-more.on { color: var(--accent); background: var(--mine) }\n.rv-quote .rq-rest { flex-basis: 100%; display: flex; flex-direction: column; gap: 4px }\n.rv-quote .rq-rest[hidden] { display: none }\n.rv-open { display: inline-flex; align-items: center; gap: 4px }\n.rv-och { width: 0; height: 0; border-left: 4px solid currentColor; border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent; transition: transform .12s }\n.rv-open.on { background: var(--mine); color: var(--accent); border-color: var(--accent); font-weight: 600 }\n.rv-open.on .rv-och { transform: rotate(90deg) }\n.rv-tx { font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; color: #1f2328 }\n.rv-tx > :first-child { margin-top: 0 }\n.rv-tx > :last-child { margin-bottom: 0 }\n.rv-tx p { margin: .6em 0 }\n.rv-tx h1, .rv-tx h2, .rv-tx h3, .rv-tx h4 { margin: 1em 0 .4em; font-weight: 600; line-height: 1.35 }\n.rv-tx h1 { font-size: 1.4em }\n.rv-tx h2 { font-size: 1.2em }\n.rv-tx h3 { font-size: 1.05em }\n.rv-tx h4 { font-size: 1em }\n.rv-tx ul, .rv-tx ol { margin: .6em 0; padding-left: 1.6em }\n.rv-tx li { margin: .2em 0 }\n.rv-tx li > p { margin: .2em 0 }\n.rv-tx code { background: #0000000d; border-radius: 4px; padding: 1px 5px; font-size: .9em; font-family: ui-monospace, Menlo, monospace }\n.rv-tx pre { background: #ffffffb3; border-radius: 8px; padding: 8px 10px; margin: .6em 0; overflow: auto; font-size: 12.5px; line-height: 1.5 }\n.rv-tx pre code { background: transparent; padding: 0; font-size: inherit }\n.rv-tx blockquote { margin: .6em 0; padding: .1em 1em; border-left: 3px solid #0000001f; color: #656d76 }\n.rv-tx table { border-collapse: collapse; margin: .7em 0; display: block; overflow: auto; max-width: 100% }\n.rv-tx th, .rv-tx td { border: 1px solid #0000001a; padding: 5px 10px }\n.rv-tx th { background: #0000000a; font-weight: 600 }\n.rv-tx hr { border: 0; border-top: 1px solid #0000001a; margin: .9em 0 }\n.rv-tx a { color: #0969da; text-decoration: none }\n.rv-tx a:hover { text-decoration: underline }\n.rv-empty { color: var(--faint); font-size: 12px; margin: 0 }\n.rv-box { margin-top: 4px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 10px; background: var(--card) }\n.rv-box[hidden] { display: none }\n.rv-turn { margin: 0; padding: 0; border: 0; background: none }\n.rv-turn .turn-group { margin: 0 }\n.rv-mark { margin: 10px 12px; display: flex; justify-content: center }\n.rv-box .turn-group { margin: 0 }\n.rv-none { padding: 14px; color: var(--faint); font-size: 12.5px }\n.rv-note { margin: 8px 12px; padding: 7px 10px; border-radius: 8px; background: #fdf1e3; color: #9a5b10; font-size: 12px }\n.rv-charter { margin: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 12px }\n.rv-charter h4 { margin: 6px 0 2px; font-size: 11.5px; color: var(--faint); font-weight: 600 }\n.rv-charter h5 { margin: 8px 0 2px; font-size: 11.5px; color: var(--faint) }\n.rv-charter pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11.5px; color: var(--mute) }\n/* 一轮写进账本的气泡: 过程框下面, 靠自己那一侧; 多颗时各带一行小头 (去处 / 定论)。 */\n.rv-spk { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; min-width: 0 }\n.rv-msg.me .rv-spk { align-items: flex-end }\n.rv-smh { font-size: 11px }\n.rv-smh time { margin-left: 6px }\n.rv-files { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px }\n/* reminder 标签收在气泡底: 默认只露种类, 点开看原文。 */\n.rv-bub .rems { padding: 4px 0 0 }\n.rv-bub .rem-raw { max-height: 360px; overflow: auto }\n.rv-mh .mstat { display: inline-flex; gap: 6px; align-items: center; color: var(--faint) }\n.ho-who[data-node], .ho-line[data-node] { cursor: pointer }\n/* 标题行: room 名 × 👁 role 名 —— ×「取消选择 room」夹在两者之间, 消除的是前者。× 触控区 32px (窄屏不挤标题: 标题先让位 min-width:0), 字形 14px, 与返回键 chevron 同一套线描。 */\n.rv-trow { display: flex; align-items: center; gap: 2px; min-width: 0 }\n.rv-trow .rv-ttl { min-width: 0; flex: 0 1 auto }\n.rv-pov-tag { flex: 0 1 auto; min-width: 4.2em; max-width: 45%; margin-left: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 400; color: var(--faint) }\n.rv-clr { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin: -5px 0; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--mute); cursor: pointer }\n.rv-clr:hover, .rv-clr:focus-visible { color: var(--ink); background: var(--paper) }\n.rv-clr svg { display: block }\n.rv-sys { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 8px; margin: 8px 12px; padding: 0 4px; min-width: 0; color: var(--faint); font-size: 11.5px; line-height: 1.6; text-align: center; overflow-wrap: anywhere }\n.rv-sys time { flex: none; font-size: 10.5px; opacity: .8 }\n.rv-sys.remove > span { color: var(--mute) }";
|
|
3026
3108
|
var injectStyle = function () {
|
|
3027
3109
|
if (document.getElementById('rv-style')) return;
|
|
3028
3110
|
var s = document.createElement('style');
|