ec-web 0.0.4 → 0.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/dist/server.js +47 -5
- package/dist/sources/msg.js +187 -5
- package/dist/sources/session-codex.js +43 -29
- package/dist/sources/session-origin.js +195 -0
- package/dist/sources/session.js +211 -33
- package/dist/static/app.js +285 -43
- package/dist/static/index.html +4 -5
- package/dist/static/style.css +55 -1
- package/dist/static/vendor/echarts-5.6.0.min.js +45 -0
- package/package.json +2 -2
package/dist/static/index.html
CHANGED
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
})();
|
|
17
17
|
</script>
|
|
18
18
|
<link rel="stylesheet" href="style.css">
|
|
19
|
-
<script src="
|
|
19
|
+
<script defer src="vendor/echarts-5.6.0.min.js"></script>
|
|
20
|
+
<script defer src="app.js"></script>
|
|
20
21
|
</head>
|
|
21
22
|
<body>
|
|
22
23
|
<!-- 配对页 -->
|
|
@@ -47,7 +48,7 @@
|
|
|
47
48
|
|
|
48
49
|
</nav>
|
|
49
50
|
<span style="flex:1"></span>
|
|
50
|
-
2026-07-
|
|
51
|
+
2026-07-30 05:24
|
|
51
52
|
<span id="conn-status" class="conn-status" data-i18n="status.connecting">连接中…</span>
|
|
52
53
|
<button id="lang-btn" class="theme-btn" data-i18n-title="language.buttonTitle" title="切换语言">🌐</button>
|
|
53
54
|
<button id="theme-btn" class="theme-btn" data-i18n-title="theme.buttonTitle" title="主题">🌗</button>
|
|
@@ -183,7 +184,7 @@
|
|
|
183
184
|
</select>
|
|
184
185
|
</label>
|
|
185
186
|
</div>
|
|
186
|
-
<div id="detail-result" style="margin-top:12px;
|
|
187
|
+
<div id="detail-result" style="margin-top:12px;">
|
|
187
188
|
<table id="detail-table" class="usage-table"></table>
|
|
188
189
|
</div>
|
|
189
190
|
<div class="detail-pagination">
|
|
@@ -251,7 +252,6 @@
|
|
|
251
252
|
<option value="month" data-i18n="usage.explorer.filter.granularity.month">Month</option>
|
|
252
253
|
</select>
|
|
253
254
|
</label>
|
|
254
|
-
<button id="exp-query-btn" data-i18n="action.query">Query</button>
|
|
255
255
|
</div>
|
|
256
256
|
|
|
257
257
|
<div id="usage-explorer-chart" class="usage-chart" style="height:260px"></div>
|
|
@@ -381,6 +381,5 @@
|
|
|
381
381
|
</main>
|
|
382
382
|
</div>
|
|
383
383
|
|
|
384
|
-
<script src="app.js"></script>
|
|
385
384
|
</body>
|
|
386
385
|
</html>
|
package/dist/static/style.css
CHANGED
|
@@ -359,6 +359,28 @@ tr:hover td { background: var(--bg2); }
|
|
|
359
359
|
.bubble.in .body { background: var(--user-bubble-bg); border-left: 2px solid var(--green); }
|
|
360
360
|
.bubble.out .body { border-left: 2px solid var(--blue); }
|
|
361
361
|
.msg-tag { display: inline-block; padding: 0 5px; border-radius: 3px; font-size: 10px; margin-left: 4px; background: var(--bg3); color: var(--magenta); font-weight: 400; line-height: 1.4; vertical-align: baseline; }
|
|
362
|
+
.msg-tag.msg-channel {
|
|
363
|
+
color: var(--msg-channel-color);
|
|
364
|
+
background: color-mix(in srgb, var(--msg-channel-color) 12%, transparent);
|
|
365
|
+
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--msg-channel-color) 20%, transparent);
|
|
366
|
+
font-weight: 500;
|
|
367
|
+
}
|
|
368
|
+
.msg-channel-aun { --msg-channel-color: #7655a6; }
|
|
369
|
+
.msg-channel-wechat { --msg-channel-color: #277a58; }
|
|
370
|
+
.msg-channel-wecom { --msg-channel-color: #1c7582; }
|
|
371
|
+
.msg-channel-feishu { --msg-channel-color: #376aa4; }
|
|
372
|
+
.msg-channel-dingtalk { --msg-channel-color: #2f7392; }
|
|
373
|
+
.msg-channel-qqbot { --msg-channel-color: #8b681f; }
|
|
374
|
+
.msg-channel-daemon,
|
|
375
|
+
.msg-channel-other { --msg-channel-color: #5f6f82; }
|
|
376
|
+
[data-theme="dark"] .msg-channel-aun { --msg-channel-color: #c3a6ea; }
|
|
377
|
+
[data-theme="dark"] .msg-channel-wechat { --msg-channel-color: #6bc99a; }
|
|
378
|
+
[data-theme="dark"] .msg-channel-wecom { --msg-channel-color: #63c4ce; }
|
|
379
|
+
[data-theme="dark"] .msg-channel-feishu { --msg-channel-color: #82b4e8; }
|
|
380
|
+
[data-theme="dark"] .msg-channel-dingtalk { --msg-channel-color: #79b9d6; }
|
|
381
|
+
[data-theme="dark"] .msg-channel-qqbot { --msg-channel-color: #d6b65f; }
|
|
382
|
+
[data-theme="dark"] .msg-channel-daemon,
|
|
383
|
+
[data-theme="dark"] .msg-channel-other { --msg-channel-color: #a8b6c6; }
|
|
362
384
|
|
|
363
385
|
.msg-session-header { height: 44px; min-height: 44px; padding: 12px 16px; box-sizing: border-box; z-index: 2; }
|
|
364
386
|
.msg-session-header .sh-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
@@ -379,7 +401,7 @@ tr:hover td { background: var(--bg2); }
|
|
|
379
401
|
/* ── Sessions ── */
|
|
380
402
|
.sess-list { width: 360px; border-right: 1px solid var(--border); flex-shrink: 0; display: flex; flex-direction: column; overflow: hidden; }
|
|
381
403
|
.sess-filter { padding: 10px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
|
|
382
|
-
.sess-select-row { display: grid; grid-template-columns:
|
|
404
|
+
.sess-select-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
|
|
383
405
|
.sess-filter-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 24px; }
|
|
384
406
|
.sess-filter select {
|
|
385
407
|
width: 100%; padding: 6px 8px; background: var(--bg); color: var(--fg);
|
|
@@ -402,6 +424,12 @@ tr:hover td { background: var(--bg2); }
|
|
|
402
424
|
.bind-badge { display: inline-flex; align-items: center; gap: 3px; padding: 0 5px; border-radius: 3px; background: var(--bg3); color: var(--accent); font-size: 10px; }
|
|
403
425
|
.bind-badge .dot { width: 6px; height: 6px; margin: 0; }
|
|
404
426
|
.msg-count { color: var(--dim); }
|
|
427
|
+
.session-source-badge { display: inline-flex; align-items: center; min-height: 16px; padding: 0 5px; border-radius: 3px; background: var(--bg3); font-size: 10px; font-weight: 600; }
|
|
428
|
+
.session-source-badge.source-trigger { color: var(--orange); }
|
|
429
|
+
.session-source-badge.source-agent { color: var(--green); }
|
|
430
|
+
.session-source-badge.source-cli { color: var(--fg); }
|
|
431
|
+
.session-source-badge.source-user { color: var(--blue); }
|
|
432
|
+
.session-source-badge.source-unknown { color: var(--dim); }
|
|
405
433
|
|
|
406
434
|
.sess-detail { flex: 1; padding: 0; overflow-y: auto; }
|
|
407
435
|
|
|
@@ -426,6 +454,7 @@ tr:hover td { background: var(--bg2); }
|
|
|
426
454
|
.cat-chip.cat-tool_call .cat-swatch { background: var(--magenta); }
|
|
427
455
|
.cat-chip.cat-tool_result .cat-swatch { background: var(--orange); }
|
|
428
456
|
.cat-chip.cat-msg_send .cat-swatch { background: var(--cyan, #22d3a8); }
|
|
457
|
+
.cat-chip.cat-subtask .cat-swatch { background: var(--accent); }
|
|
429
458
|
|
|
430
459
|
/* 视图切换位于会话信息栏内,不额外占用纵向空间 */
|
|
431
460
|
.view-toggle { height: 26px; padding: 2px 11px; border-radius: 13px; border: 1px solid var(--border); background: var(--bg3); color: var(--fg); cursor: pointer; font-size: 12px; line-height: 1; font-family: inherit; white-space: nowrap; transition: background .16s ease, border-color .16s ease, color .16s ease; }
|
|
@@ -467,6 +496,7 @@ tr:hover td { background: var(--bg2); }
|
|
|
467
496
|
.turn.cat-model_output { border-left-color: var(--blue); }
|
|
468
497
|
.turn.cat-tool_call { border-left-color: var(--magenta); }
|
|
469
498
|
.turn.cat-tool_result { border-left-color: var(--orange); }
|
|
499
|
+
.turn.cat-subtask { border-left-color: var(--accent); }
|
|
470
500
|
.turn.cat-system { border-left-color: var(--dim); }
|
|
471
501
|
|
|
472
502
|
.turn-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
|
|
@@ -475,6 +505,7 @@ tr:hover td { background: var(--bg2); }
|
|
|
475
505
|
.turn.cat-model_output .turn-role { color: var(--blue); }
|
|
476
506
|
.turn.cat-tool_call .turn-role { color: var(--magenta); }
|
|
477
507
|
.turn.cat-tool_result .turn-role { color: var(--orange); }
|
|
508
|
+
.turn.cat-subtask .turn-role { color: var(--accent); }
|
|
478
509
|
.turn.cat-system .turn-role { color: var(--dim); }
|
|
479
510
|
.turn-time { font-size: 11px; color: var(--dim); }
|
|
480
511
|
.turn-usage { font-size: 11px; color: var(--dim); margin-left: auto; }
|
|
@@ -513,6 +544,19 @@ tr:hover td { background: var(--bg2); }
|
|
|
513
544
|
}
|
|
514
545
|
.blk-result.err .result-body { border-color: var(--red); }
|
|
515
546
|
|
|
547
|
+
/* Runner 子任务:每个 task 聚合成一个实时更新的生命周期条目 */
|
|
548
|
+
.blk-subtask { padding: 9px 11px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg2); }
|
|
549
|
+
.subtask-main { display: grid; grid-template-columns: 8px max-content minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; }
|
|
550
|
+
.subtask-status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
|
|
551
|
+
.status-completed .subtask-status-dot { background: var(--green); }
|
|
552
|
+
.status-failed .subtask-status-dot,
|
|
553
|
+
.status-killed .subtask-status-dot { background: var(--red); }
|
|
554
|
+
.status-stopped .subtask-status-dot { background: var(--dim); }
|
|
555
|
+
.subtask-status { color: var(--dim); font-size: 11px; white-space: nowrap; }
|
|
556
|
+
.subtask-title { min-width: 0; overflow-wrap: anywhere; color: var(--fg); font-size: 12px; font-weight: 600; }
|
|
557
|
+
.subtask-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 5px 0 0 16px; color: var(--dim); font-size: 11px; }
|
|
558
|
+
.subtask-progress { margin: 6px 0 0 16px; color: var(--dim); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
|
|
559
|
+
|
|
516
560
|
/* ── Cache 视图 ── */
|
|
517
561
|
#view-cache { padding: 16px 18px; }
|
|
518
562
|
.cache-cards {
|
|
@@ -1111,6 +1155,13 @@ tr.ag-disabled .ag-name { color: var(--dim); }
|
|
|
1111
1155
|
border-color: var(--accent);
|
|
1112
1156
|
box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 14%, transparent);
|
|
1113
1157
|
}
|
|
1158
|
+
.trig-baseagent-note {
|
|
1159
|
+
margin: -2px 0 12px;
|
|
1160
|
+
color: #c56600;
|
|
1161
|
+
font-size: 11px;
|
|
1162
|
+
line-height: 1.35;
|
|
1163
|
+
}
|
|
1164
|
+
[data-theme="dark"] .trig-baseagent-note { color: #f0a24a; }
|
|
1114
1165
|
.ag-edit-channel-list {
|
|
1115
1166
|
display: flex;
|
|
1116
1167
|
flex-direction: column;
|
|
@@ -1446,6 +1497,8 @@ tr.ag-disabled .ag-name { color: var(--dim); }
|
|
|
1446
1497
|
.ag-msg .text-out { color: var(--msg-out); font-weight: 500; }
|
|
1447
1498
|
.ag-msg .mtag { display: inline-block; padding: 0 4px; margin: 0 2px; border-radius: 3px; font-size: 10px; background: var(--bg3); color: var(--magenta); vertical-align: middle; }
|
|
1448
1499
|
.ag-msg .mtag-reply { color: var(--green); font-weight: 700; }
|
|
1500
|
+
/* 渠道标:非 AUN 渠道才渲染,用冷色和消息标记区分开 */
|
|
1501
|
+
.ag-msg .mtag-channel { color: var(--blue); font-weight: 600; }
|
|
1449
1502
|
.ag-msg .mtags { color: var(--magenta); font-size: 10.5px; }
|
|
1450
1503
|
.ag-path { font-family: ui-monospace, Consolas, monospace; font-size: 10.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70vw; }
|
|
1451
1504
|
|
|
@@ -1460,6 +1513,7 @@ tr.ag-disabled .ag-name { color: var(--dim); }
|
|
|
1460
1513
|
.tip-kind { margin: 0 2px; font-weight: 600; }
|
|
1461
1514
|
.tip-kind-reply { color: var(--green); font-weight: 700; }
|
|
1462
1515
|
.tip-flag { margin: 0 2px; padding: 0 4px; border-radius: 3px; background: var(--bg3); color: var(--magenta); font-size: 10.5px; }
|
|
1516
|
+
.tip-flag-channel { color: var(--blue); font-weight: 600; }
|
|
1463
1517
|
.tip-row b { color: var(--orange); font-weight: 600; }
|
|
1464
1518
|
|
|
1465
1519
|
|