mingdao-harness 0.6.26 → 0.6.28
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/src/agent.js +5 -2
- package/src/web/app.js +31 -2
- package/src/web/index.html +60 -46
package/package.json
CHANGED
package/src/agent.js
CHANGED
|
@@ -1575,8 +1575,11 @@ export function createAgent({ provider, permission, io, modelName, workingDir, c
|
|
|
1575
1575
|
turnProgress.lastTtftMs = ttft;
|
|
1576
1576
|
if (turnProgress.ttftMs == null) turnProgress.ttftMs = ttft;
|
|
1577
1577
|
turnProgress.phase = '解码中(收到增量)';
|
|
1578
|
-
// TTFT
|
|
1579
|
-
|
|
1578
|
+
// v0.6.28 §3.96:TTFT 每回合只在**第 1 次模型请求**时打印一行;后续请求静默
|
|
1579
|
+
// (状态条/右栏已有首帧值)。长审计里本地模型会有十几次请求,重复打印只会刷屏。
|
|
1580
|
+
// 可选的"后续明显劣化警告"本轮未实现:现有 firstTokenAt 是回合级的,
|
|
1581
|
+
// 不能用来量后续请求的 TTFT(否则会得到负值),不为一条提示去改测量口径。
|
|
1582
|
+
if (turnProgress.llmCalls === 1) {
|
|
1580
1583
|
try {
|
|
1581
1584
|
io.print(style(`⏱ 首帧 ${(ttft / 1000).toFixed(1)}s(第 ${turnProgress.llmCalls} 次模型请求;本地模型这一项直接反映 prefill 快慢)`, C.dim));
|
|
1582
1585
|
} catch {}
|
package/src/web/app.js
CHANGED
|
@@ -498,6 +498,10 @@ function initSideNav() {
|
|
|
498
498
|
if (collapse) collapse.onclick = toggleSideNav;
|
|
499
499
|
const recentToggle = $('#sideNavRecentToggle');
|
|
500
500
|
if (recentToggle) recentToggle.onclick = toggleRecentSessions;
|
|
501
|
+
// v0.6.27 §3.94:会话管理入口从左栏标题右侧进入,复用既有的 openSessModal(能力不新增、不丢失)。
|
|
502
|
+
const sideSessMgr = $('#sideNavSessMgr');
|
|
503
|
+
if (sideSessMgr) sideSessMgr.onclick = openSessModal;
|
|
504
|
+
// §3.96:抽屉开关现在在顶栏(#sideNavRailBtn),仍走同一个 toggleSideNav。
|
|
501
505
|
const rail = $('#sideNavRailBtn');
|
|
502
506
|
if (rail) rail.onclick = toggleSideNav;
|
|
503
507
|
const ws = $('#sideNavWs');
|
|
@@ -1558,8 +1562,32 @@ function syncRunPanel() {
|
|
|
1558
1562
|
}
|
|
1559
1563
|
function setRunPanel(open) { runPanelOpen = Boolean(open); syncRunPanel(); }
|
|
1560
1564
|
function toggleRunPanel() { setRunPanel(!runPanelOpen); }
|
|
1565
|
+
/**
|
|
1566
|
+
* §3.96:把顶栏**实测高度**写进 --hdr-h,所有固定面板的 top 都用 var(--hdr-h,56px)。
|
|
1567
|
+
* 顶栏高度不是常数(padding + min-height + 横向滚动条/字体),所以不写死 52/56;
|
|
1568
|
+
* 页面加载、窗口 resize、以及顶栏自身尺寸变化(ResizeObserver)时都重新测量。
|
|
1569
|
+
* @returns {number} 本次量到的像素高度
|
|
1570
|
+
*/
|
|
1571
|
+
function syncHeaderHeight() {
|
|
1572
|
+
const hd = document.querySelector('header');
|
|
1573
|
+
if (!hd) return 0;
|
|
1574
|
+
const h = Math.round(hd.getBoundingClientRect().height || hd.offsetHeight || 0);
|
|
1575
|
+
if (h > 0) document.documentElement.style.setProperty('--hdr-h', h + 'px');
|
|
1576
|
+
return h;
|
|
1577
|
+
}
|
|
1578
|
+
let headerHeightObserver = null;
|
|
1579
|
+
function watchHeaderHeight() {
|
|
1580
|
+
try {
|
|
1581
|
+
if (typeof ResizeObserver !== 'function' || headerHeightObserver) return;
|
|
1582
|
+
const hd = document.querySelector('header');
|
|
1583
|
+
if (!hd) return;
|
|
1584
|
+
headerHeightObserver = new ResizeObserver(() => syncHeaderHeight());
|
|
1585
|
+
headerHeightObserver.observe(hd);
|
|
1586
|
+
} catch { /* 老浏览器没有 ResizeObserver:加载/resize 两次测量已覆盖 */ }
|
|
1587
|
+
}
|
|
1561
1588
|
function applyResponsiveLayout(width) {
|
|
1562
1589
|
const w = width == null ? (Number(window.innerWidth) || 0) : Number(width) || 0;
|
|
1590
|
+
syncHeaderHeight();
|
|
1563
1591
|
const cls = layoutClassesFor(w);
|
|
1564
1592
|
document.body.classList.toggle('narrow-side', cls.narrow);
|
|
1565
1593
|
document.body.classList.toggle('narrow-run', cls.narrowRun);
|
|
@@ -1572,6 +1600,7 @@ function initResponsive() {
|
|
|
1572
1600
|
responsiveInitialized = true;
|
|
1573
1601
|
}
|
|
1574
1602
|
applyResponsiveLayout();
|
|
1603
|
+
watchHeaderHeight();
|
|
1575
1604
|
window.addEventListener('resize', () => applyResponsiveLayout());
|
|
1576
1605
|
const chip = $('#runChip'); if (chip) chip.onclick = toggleRunPanel;
|
|
1577
1606
|
const col = $('#rpCollapse'); if (col) col.onclick = () => setRunPanel(false);
|
|
@@ -2567,8 +2596,8 @@ async function refreshCostBadge(){
|
|
|
2567
2596
|
}
|
|
2568
2597
|
refreshCostBadge(); setInterval(refreshCostBadge, 15000);
|
|
2569
2598
|
// §3.82:顶栏费用徽标 = 打开右栏「仪表盘」标签(原有 📊 内容仍在 #dashPanel 里;关闭用 ✕/收起)。
|
|
2599
|
+
// v0.6.27 §3.94:旧的左侧窄条按钮已删除,不再在这里清它们的 on 态(否则空引用抛错、标签切不动)。
|
|
2570
2600
|
$('#costBadge').onclick=()=>{
|
|
2571
|
-
$('#trajRailBtn').classList.remove('on'); $('#subRailBtn').classList.remove('on');
|
|
2572
2601
|
activateRailTab('dash');
|
|
2573
2602
|
};
|
|
2574
2603
|
$('#dashClose').onclick=()=>{ setRunPanel(false); };
|
|
@@ -2584,8 +2613,8 @@ async function refreshStatusBar(){
|
|
|
2584
2613
|
}
|
|
2585
2614
|
refreshStatusBar(); setInterval(refreshStatusBar, 15000);
|
|
2586
2615
|
// §3.82:顶栏「任务」= 打开右栏「任务」标签(右栏收起时也会展开;关闭用 ✕/收起)。
|
|
2616
|
+
// v0.6.27 §3.94:同上,旧窄条按钮已删除,不再清其 on 态。
|
|
2587
2617
|
$('#tasksBtn').onclick=()=>{
|
|
2588
|
-
$('#trajRailBtn').classList.remove('on'); $('#subRailBtn').classList.remove('on');
|
|
2589
2618
|
activateRailTab('tasks');
|
|
2590
2619
|
};
|
|
2591
2620
|
$('#tpClose').onclick=()=>{ setRunPanel(false); };
|
package/src/web/index.html
CHANGED
|
@@ -58,10 +58,18 @@ body.dash-open{padding-right:400px}
|
|
|
58
58
|
}
|
|
59
59
|
@media (max-width:560px){
|
|
60
60
|
body.traj-open,body.sub-open,body.tasks-open,body.dash-open{padding:0}
|
|
61
|
-
#trajPanel{width:
|
|
61
|
+
#trajPanel{width:100vw;left:0}
|
|
62
62
|
#subPanel,#tasksPanel,#dashPanel{width:100vw}
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
/* v0.6.28 §3.96:顶栏是**所有固定面板的上界**——position:relative + z-index:70(高于右栏抽屉 60、
|
|
65
|
+
任务/子Agent/轨迹 40、仪表盘 45)。面板 top 统一用 --hdr-h(app.js 在加载/resize 时实测
|
|
66
|
+
header.offsetHeight 写入;默认回落 56px),不再靠"再多加几 px"的猜测。 */
|
|
67
|
+
header{min-height:52px;display:flex;align-items:center;gap:10px;padding:8px 12px;border-bottom:1px solid var(--border);background:var(--bg2);flex:none;flex-wrap:nowrap;white-space:nowrap;overflow-x:auto;position:relative;z-index:70}
|
|
68
|
+
/* §3.96:<900 左栏是覆盖式抽屉,开关放在顶栏(仅抽屉档可见)。旧空窄条已删除:
|
|
69
|
+
它不再占列、不再压正文左缘,也不再有任何 rail 按钮/徽标样式。 */
|
|
70
|
+
#sideNavRailBtn{display:none;align-items:center;justify-content:center;padding:6px 10px;font-size:14px;line-height:1}
|
|
71
|
+
body.side-drawer #sideNavRailBtn{display:inline-flex}
|
|
72
|
+
body.side-drawer.side-drawer-open #sideNavRailBtn{border-color:var(--accent2);color:var(--accent2)}
|
|
65
73
|
header .logo{font-weight:700;font-size:16px;color:var(--accent);letter-spacing:.5px;flex:none}
|
|
66
74
|
header .logo span{color:var(--text)}
|
|
67
75
|
header .badge{font-size:12px;color:var(--dim);background:var(--bg3);border:1px solid var(--border);padding:2px 10px;border-radius:20px;flex:none;overflow:hidden;text-overflow:ellipsis;max-width:180px}
|
|
@@ -96,7 +104,8 @@ header .hdr-right::-webkit-scrollbar-track{background:transparent}
|
|
|
96
104
|
}
|
|
97
105
|
@media (max-width:860px){main{padding:14px 0 8px}#chat{padding:0 10px}#envBadge{display:none!important}#sessionSearch{max-width:110px}#modelSel{max-width:110px}#permSel{max-width:120px}#sessions{max-width:110px}#wsSel{max-width:96px}header{gap:6px;padding:8px 8px}header .logo span{display:none}}
|
|
98
106
|
#sessionSearch:focus{outline:none;border-color:var(--accent2)}
|
|
99
|
-
|
|
107
|
+
/* §3.96:所有左右固定面板的 top 都跟随 --hdr-h(顶栏实测高度),面板永不压住顶栏。 */
|
|
108
|
+
#tasksPanel{position:fixed;right:0;top:var(--hdr-h,56px);bottom:0;width:280px;background:var(--bg2);border-left:1px solid var(--border);z-index:40;display:flex;flex-direction:column}
|
|
100
109
|
/* P0-1 常驻运行状态条(v0.6.18 §3.68):对话区/输入区上方**唯一**一行运行信息。
|
|
101
110
|
六个字段:阶段 · 首帧 · tokens/s · 上下文 · 工具步数 · 本轮费用。
|
|
102
111
|
窄窗口允许换行成两行(flex-wrap),不横贯聊天窗口、不新增轮询——由既有 progress 事件驱动。 */
|
|
@@ -113,14 +122,9 @@ header .hdr-right::-webkit-scrollbar-track{background:transparent}
|
|
|
113
122
|
#runStrip .rs-bg{cursor:pointer;color:var(--warn);white-space:nowrap}
|
|
114
123
|
#runStrip .rs-bg:hover{color:var(--text)}
|
|
115
124
|
@media (max-width:860px){#runStrip{gap:3px 8px;padding:5px 8px;font-size:11.5px}}
|
|
116
|
-
/*
|
|
117
|
-
#
|
|
118
|
-
#
|
|
119
|
-
#trajRail .rail-btn:hover{border-color:var(--accent2);color:var(--accent2)}
|
|
120
|
-
#trajRail .rail-btn.on{background:linear-gradient(135deg,var(--accent),var(--accent2));color:#06121a;border:none}
|
|
121
|
-
#trajRail .rail-btn{position:relative}
|
|
122
|
-
#trajRail .rail-badge{position:absolute;top:-4px;right:-4px;min-width:14px;height:14px;padding:0 3px;border-radius:8px;background:var(--err);color:#fff;font-size:9.5px;line-height:14px;text-align:center;font-weight:700}
|
|
123
|
-
#subPanel{position:fixed;right:0;top:52px;bottom:0;width:320px;background:var(--bg2);border-left:1px solid var(--border);z-index:40;display:flex;flex-direction:column}
|
|
125
|
+
/* §3.96:左侧空窄条已整体删除(含其按钮/徽标样式)。
|
|
126
|
+
左栏 #sideNav 直接贴 left:0;<900 抽屉开关 #sideNavRailBtn 在顶栏(见上)。 */
|
|
127
|
+
#subPanel{position:fixed;right:0;top:var(--hdr-h,56px);bottom:0;width:320px;background:var(--bg2);border-left:1px solid var(--border);z-index:40;display:flex;flex-direction:column}
|
|
124
128
|
.sb-head{padding:12px 14px;font-size:14px;font-weight:600;border-bottom:1px solid var(--border);color:var(--accent2);display:flex;align-items:center;gap:8px}
|
|
125
129
|
.sb-head button{margin-left:auto}
|
|
126
130
|
#sbList{flex:1;overflow-y:auto;padding:8px}
|
|
@@ -135,8 +139,9 @@ header .hdr-right::-webkit-scrollbar-track{background:transparent}
|
|
|
135
139
|
.msg-meta{display:flex;gap:8px;align-items:center;font-size:11.5px;color:var(--faint);padding:0 2px 4px}
|
|
136
140
|
.trajBtn{cursor:pointer;background:var(--bg3);border:1px solid var(--border);color:var(--dim);border-radius:20px;padding:2px 10px;font-size:11.5px}
|
|
137
141
|
.trajBtn:hover{color:var(--text);border-color:var(--accent2)}
|
|
138
|
-
/*
|
|
139
|
-
|
|
142
|
+
/* 轨迹面板(与任务面板互斥展示):保留给 openTraj()/#tjClose(仍写 #tjList),默认 display:none;
|
|
143
|
+
已无窄条,故 left:0;top 同样跟随 --hdr-h。 */
|
|
144
|
+
#trajPanel{position:fixed;left:0;top:var(--hdr-h,56px);bottom:0;width:252px;background:var(--bg2);border-right:1px solid var(--border);z-index:40;display:flex;flex-direction:column;box-shadow:4px 0 24px rgba(0,0,0,.35)}
|
|
140
145
|
.tj-head{padding:12px 14px;font-size:14px;font-weight:600;border-bottom:1px solid var(--border);color:var(--accent2);display:flex;align-items:center;gap:8px}
|
|
141
146
|
.tj-head button{margin-left:auto}
|
|
142
147
|
#tjClose,#sbClose{font-size:12px;white-space:nowrap;padding:3px 10px}
|
|
@@ -275,7 +280,8 @@ footer{flex:none;border-top:1px solid var(--border);background:var(--bg2);paddin
|
|
|
275
280
|
#hint{font-size:11.5px;color:var(--faint);margin-top:6px;max-width:860px;margin-left:auto;margin-right:auto}
|
|
276
281
|
#statusBar{font-size:11.5px;color:var(--faint);margin-top:2px;max-width:860px;margin-left:auto;margin-right:auto;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
277
282
|
@media (max-width:560px){footer{padding:10px 8px}#composer{gap:6px}#composer #permSel{min-width:52px;padding:8px 4px}#composer #reasoningSel{min-width:44px;padding:8px 4px}#composer #modelSel{min-width:72px;padding:8px 4px}#composer #presetSel{min-width:64px;max-width:88px;padding:8px 4px}#attachBtn{padding:10px 9px}}
|
|
278
|
-
.
|
|
283
|
+
/* §3.96:header 抬到 70 后,模态遮罩必须仍在 header 之上(模态期间顶栏不可点)——50 → 90。 */
|
|
284
|
+
.modal-mask{position:fixed;inset:0;background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;z-index:90}
|
|
279
285
|
.modal{background:var(--panel);border:1px solid var(--border);border-radius:14px;width:min(520px,92vw);padding:18px;max-height:88vh;overflow-y:auto}
|
|
280
286
|
/* 设置多级菜单(审计:一拉到底改为左侧分组导航 + 右侧面板) */
|
|
281
287
|
.cfg-modal{width:min(880px,94vw);display:flex;flex-direction:column;overflow:hidden}
|
|
@@ -383,7 +389,7 @@ footer{flex:none;border-top:1px solid var(--border);background:var(--bg2);paddin
|
|
|
383
389
|
.shortcut-note{grid-column:1/-1;font-size:11.5px;color:var(--faint);border-top:1px solid var(--border);padding-top:9px}
|
|
384
390
|
|
|
385
391
|
/* —— 右侧「本轮运行」面板 —— */
|
|
386
|
-
#runPanel{position:fixed;right:0;top:
|
|
392
|
+
#runPanel{position:fixed;right:0;top:var(--hdr-h,56px);bottom:0;width:300px;background:var(--bg2);border-left:1px solid var(--border);z-index:36;display:flex;flex-direction:column;box-shadow:-8px 0 24px rgba(0,0,0,.18)}
|
|
387
393
|
body.run-open{padding-right:300px}
|
|
388
394
|
body.run-open #scrollBottomBtn{right:326px}
|
|
389
395
|
.rp-head{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--border);font-size:13px;font-weight:600;color:var(--text);flex:none}
|
|
@@ -477,7 +483,7 @@ body.run-open #scrollBottomBtn{right:326px}
|
|
|
477
483
|
@media (max-width:1100px){
|
|
478
484
|
body.narrow-run.run-open{padding-right:0}
|
|
479
485
|
body.narrow-run #runPanel{display:none}
|
|
480
|
-
body.narrow-run.run-drawer #runPanel{display:flex;top:
|
|
486
|
+
body.narrow-run.run-drawer #runPanel{display:flex;top:var(--hdr-h,56px);width:300px;max-width:92vw;z-index:60;box-shadow:-12px 0 32px rgba(0,0,0,.4)}
|
|
481
487
|
}
|
|
482
488
|
|
|
483
489
|
/* —— 会话设置弹层(收编模型 / 预设 / 权限三件套)——
|
|
@@ -562,7 +568,6 @@ body.run-open #sessSheet{right:318px}
|
|
|
562
568
|
body.narrow-side #sessionSearch,body.narrow-side #envBadge,body.narrow-side #costBadge{display:none!important}
|
|
563
569
|
body.narrow-side #paletteBtn span.palette-label{display:none}
|
|
564
570
|
body.narrow-side #sessions{max-width:110px}
|
|
565
|
-
body.narrow-side #trajRail{width:44px}
|
|
566
571
|
body.narrow-side #runChip{padding:6px 8px}
|
|
567
572
|
body.narrow-side #emptyState{padding:0 12px}
|
|
568
573
|
#emptyState h2{font-size:18px}
|
|
@@ -573,7 +578,7 @@ body.run-open #sessSheet{right:318px}
|
|
|
573
578
|
/* 自绘悬浮气泡 tooltip(替换原生 title):暗色悬浮层 + 阴影,跟随锚点居中,越界自动回弹 */
|
|
574
579
|
.mdtip{position:fixed;z-index:1000;max-width:320px;background:var(--bg3);color:var(--text);border:1px solid var(--border);border-radius:8px;padding:7px 11px;font-size:12px;line-height:1.6;box-shadow:0 8px 24px rgba(0,0,0,.55);pointer-events:none;white-space:pre-line;word-break:break-word;display:none}
|
|
575
580
|
/* —— 省钱仪表盘(v0.3.1 顶部入口,真·仪表盘) —— */
|
|
576
|
-
#dashPanel{position:fixed;right:0;top:
|
|
581
|
+
#dashPanel{position:fixed;right:0;top:var(--hdr-h,56px);bottom:0;width:400px;max-width:94vw;background:var(--bg2);border-left:1px solid var(--border);z-index:45;display:flex;flex-direction:column;box-shadow:-8px 0 32px rgba(0,0,0,.4)}
|
|
577
582
|
.dash-head{padding:12px 14px;font-size:14px;font-weight:700;color:var(--accent);border-bottom:1px solid var(--border);display:flex;align-items:center;gap:8px}
|
|
578
583
|
.dash-head .dash-sub{font-size:11.5px;color:var(--faint);font-weight:400}
|
|
579
584
|
.dash-head button{margin-left:auto;padding:2px 8px;font-size:12px}
|
|
@@ -667,9 +672,9 @@ body.run-open #sessSheet{right:318px}
|
|
|
667
672
|
/* ============================================================================
|
|
668
673
|
v0.6.24 §3.88 左侧栏(设计稿三栏的标志性部分)
|
|
669
674
|
——只新增左栏自己的样式,复用既有 token;不改顶栏高度、#runPanel 宽度、
|
|
670
|
-
|
|
675
|
+
既有断点与字号阶。§3.96 起布局:左栏(240/48) 贴 left:0 → 主区 → 右栏(空窄条已删)。
|
|
671
676
|
============================================================================ */
|
|
672
|
-
#sideNav{position:fixed;left:
|
|
677
|
+
#sideNav{position:fixed;left:0;top:var(--hdr-h,56px);bottom:0;width:240px;min-width:0;background:var(--bg2);border-right:1px solid var(--border);z-index:34;display:flex;flex-direction:column;overflow:hidden;transition:width .16s ease}
|
|
673
678
|
#sideNav .sn-head{flex:none;display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--border)}
|
|
674
679
|
#sideNav .sn-title{flex:1;min-width:0;font-size:12px;font-weight:600;color:var(--dim);letter-spacing:.03em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
675
680
|
#sideNavCollapse{flex:none;width:26px;height:26px;padding:0;border-radius:7px;background:var(--bg3);font-size:13px;line-height:1;display:inline-flex;align-items:center;justify-content:center}
|
|
@@ -682,6 +687,11 @@ body.run-open #sessSheet{right:318px}
|
|
|
682
687
|
#sideNavWs{flex:1;min-width:0;max-width:none;background:var(--bg3);border:1px solid var(--border);border-radius:8px;padding:5px 6px;font-size:12px}
|
|
683
688
|
#sideNavWsIcon{display:none;align-items:center;justify-content:center;width:36px;height:30px;padding:0;border-radius:8px;background:var(--bg3);font-size:14px;line-height:1}
|
|
684
689
|
#sideNav .sn-sec-title{flex:none;font-size:10.5px;color:var(--dim);letter-spacing:.05em;padding:2px 6px;white-space:nowrap}
|
|
690
|
+
/* §3.94:「最近会话」标题右侧的会话管理入口(从顶栏移入;复用 openSessModal,不新增能力)。 */
|
|
691
|
+
.sn-sec-row{display:flex;align-items:center;gap:2px;min-width:0}
|
|
692
|
+
.sn-sec-row #sideNavRecentToggle{flex:1 1 auto;min-width:0}
|
|
693
|
+
#sideNavSessMgr{flex:none;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--dim);font-size:12px;line-height:1;cursor:pointer}
|
|
694
|
+
#sideNavSessMgr:hover{background:var(--bg3);color:var(--text)}
|
|
685
695
|
/* §3.90:「最近会话」标题变成折叠开关;折叠后标题与计数仍在,只藏列表项。 */
|
|
686
696
|
#sideNav button.sn-sec-title{display:flex;align-items:center;gap:6px;width:100%;min-width:0;border:0;border-radius:6px;background:transparent;font-family:inherit;font-weight:600;cursor:pointer;text-align:left}
|
|
687
697
|
#sideNav button.sn-sec-title:hover{color:var(--text);background:var(--bg3)}
|
|
@@ -701,22 +711,19 @@ body.side-mid #sideNav #sideNavRecentToggle{display:none}
|
|
|
701
711
|
#sideNavSessions .sn-item-ico{flex:none;width:16px;text-align:center;font-size:13px}
|
|
702
712
|
#sideNavSessions .sn-item-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
703
713
|
#sideNavSessions .sn-empty{font-size:11.5px;color:var(--dim);padding:8px 6px;white-space:nowrap}
|
|
704
|
-
#trajRail #sideNavRailBtn{display:none}
|
|
705
714
|
/* —— 三档断点:≥1180 展开(240) / 900–1180 自动折叠(48) / <900 抽屉(默认收起) —— */
|
|
706
715
|
body.side-wide #sideNav{width:240px}
|
|
707
716
|
body.side-wide.side-collapsed #sideNav{width:48px}
|
|
708
717
|
body.side-mid #sideNav{width:48px}
|
|
709
718
|
body.side-drawer #sideNav{display:none;width:240px}
|
|
710
719
|
body.side-drawer.side-drawer-open #sideNav{display:flex;z-index:55;box-shadow:12px 0 32px rgba(0,0,0,.45)}
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
body.side-wide
|
|
715
|
-
body.side-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
窄条本身仍是 position:fixed,不参与文档流。 */
|
|
719
|
-
body.side-drawer main,body.side-drawer footer{margin-left:48px}
|
|
720
|
+
/* 主区/输入区右移,左栏不遮正文;顶栏保持整条横贯(高度/入口不动)。
|
|
721
|
+
§3.96:右移量 = 左栏宽度本身(240 / 48),不再含已删的空窄条;
|
|
722
|
+
<900 左栏是覆盖式抽屉、默认不占列,正文左缘回到 0(不得再补偿 48px)。 */
|
|
723
|
+
body.side-wide main,body.side-wide footer{margin-left:240px}
|
|
724
|
+
body.side-wide.side-collapsed main,body.side-wide.side-collapsed footer{margin-left:48px}
|
|
725
|
+
body.side-mid main,body.side-mid footer{margin-left:48px}
|
|
726
|
+
body.side-drawer main,body.side-drawer footer{margin-left:0px}
|
|
720
727
|
/* 折叠态:只留图标 + tooltip(label/分组标题隐藏;折叠按钮本身是图标,保留用于展开) */
|
|
721
728
|
body.side-collapsed .sn-title,
|
|
722
729
|
body.side-mid .sn-title,
|
|
@@ -737,12 +744,16 @@ body.side-mid #sideNavWsIcon{display:inline-flex}
|
|
|
737
744
|
body.side-collapsed .sn-head,body.side-mid .sn-head{padding:10px 6px;justify-content:center}
|
|
738
745
|
body.side-collapsed #sideNav .sn-body,body.side-mid #sideNav .sn-body{padding:10px 6px;align-items:center}
|
|
739
746
|
body.side-collapsed #sideNavNew,body.side-mid #sideNavNew{width:36px;padding:8px 0;gap:0}
|
|
747
|
+
body.side-collapsed .sn-sec-row,body.side-mid .sn-sec-row{justify-content:center}
|
|
740
748
|
body.side-collapsed #sideNavSessions .sn-item,body.side-mid #sideNavSessions .sn-item{width:36px;justify-content:center;padding:6px 0;gap:0}
|
|
741
749
|
body.side-collapsed #sideNavSessions .sn-item.on,body.side-mid #sideNavSessions .sn-item.on{box-shadow:inset 0 0 0 1px var(--accent)}
|
|
742
750
|
</style>
|
|
743
751
|
</head>
|
|
744
752
|
<body class="side-wide">
|
|
745
753
|
<header>
|
|
754
|
+
<!-- §3.96:空窄条已删除。左栏在 <900 收成覆盖式抽屉,这个开关只在 drawer 档可见
|
|
755
|
+
(wide/mid 由 left:0 的左栏自带折叠按钮),不再占任何一列。 -->
|
|
756
|
+
<button id="sideNavRailBtn" title="会话侧栏(打开/关闭)">☰</button>
|
|
746
757
|
<div class="logo">MingDao <span>Harness</span></div>
|
|
747
758
|
<!-- v0.6.21 小步重排(§3.81):顶栏只保留「我在哪」的当前位置;模型/预设/权限只在 #sessSheet 里改。 -->
|
|
748
759
|
<span id="crumb" class="badge" title="当前工作空间 › 当前会话"><span id="crumbWs">工作空间</span><span aria-hidden="true"> › </span><b id="crumbSession">新对话</b></span>
|
|
@@ -757,21 +768,20 @@ body.side-collapsed #sideNavSessions .sn-item.on,body.side-mid #sideNavSessions
|
|
|
757
768
|
<div class="spacer"></div>
|
|
758
769
|
<span class="badge badge-btn" id="costBadge" title="省钱仪表盘(点击展开)" style="cursor:pointer">📊 —</span>
|
|
759
770
|
<input id="sessionSearch" placeholder="搜索会话…" title="关键词检索历史会话">
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
771
|
+
<!-- v0.6.27 §3.94:「历史会话」与左栏会话列表重复——保留 hidden 兼容节点(§158 仍钉顶栏入口),
|
|
772
|
+
计划下一轮连同断言一起移除。切换仍走 #sessions 的 change(左栏点击也写回这里)。 -->
|
|
773
|
+
<select id="sessions" title="历史会话" hidden><option value="">历史会话</option></select>
|
|
774
|
+
<button id="tasksBtn" title="任务面板">任务</button>
|
|
775
|
+
<!-- v0.6.27 §3.94:会话管理入口移入左栏「最近会话」标题右侧(#sideNavSessMgr,复用 openSessModal);
|
|
776
|
+
原 #sessMgrBtn 只保留 hidden 兼容节点(§153/§155/§158 仍钉其在 header)。 -->
|
|
777
|
+
<button id="sessMgrBtn" title="管理会话(重命名/删除)" hidden>✎</button>
|
|
778
|
+
<!-- v0.6.27 §3.94:#newChatCompat 包裹层已删除;#newChat 直接以 hidden 保留,
|
|
779
|
+
左侧 #sideNavNew 与 ⌘K 继续复用同一个 handler(§153/§155/§158 仍钉其 id)。 -->
|
|
780
|
+
<button id="newChat" hidden>新对话</button>
|
|
765
781
|
</div>
|
|
766
782
|
</header>
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
<button class="rail-btn" id="sideNavRailBtn" title="会话侧栏(打开/关闭)">☰</button>
|
|
770
|
-
</div>
|
|
771
|
-
<!-- v0.6.25 §3.90:旧窄条 🧭/🤖 与右栏四标签重复,已从可见窄条移除;轨迹/子Agent 只在
|
|
772
|
-
右栏「轨迹」「子Agent」标签可达。下面两个隐藏兼容节点不渲染、不绑定点击,仅让既有
|
|
773
|
-
class 清理与历史回归脚本保持空引用安全(#newChatCompat 同理)。 -->
|
|
774
|
-
<span id="legacyRailCompat" hidden aria-hidden="true"><span id="trajRailBtn"></span><span id="subRailBtn"></span></span>
|
|
783
|
+
<!-- v0.6.28 §3.96:左侧空窄条已整体删除;抽屉开关移入顶栏 #sideNavRailBtn。 -->
|
|
784
|
+
<!-- v0.6.27 §3.94:#legacyRailCompat 隐藏兼容节点已删除;轨迹/子Agent 由右栏四标签唯一承接。 -->
|
|
775
785
|
<!-- v0.6.24 §3.88 左侧栏:设计稿三栏的会话列。只新增;顶栏既有入口一个不删。
|
|
776
786
|
数据复用 refreshSessions() 的 sessionsGroupedCache;切换走 #sessions change;
|
|
777
787
|
工作空间镜像 #wsSel(原控件保留在顶栏原位);新建对话复用 #newChat handler。 -->
|
|
@@ -787,9 +797,13 @@ body.side-collapsed #sideNavSessions .sn-item.on,body.side-mid #sideNavSessions
|
|
|
787
797
|
<select id="sideNavWs" title="工作空间(与顶栏 #wsSel 同源,切换走同一个 handler)"></select>
|
|
788
798
|
</div>
|
|
789
799
|
<button id="sideNavWsIcon" type="button" title="工作空间" aria-label="工作空间">📁</button>
|
|
790
|
-
<
|
|
791
|
-
<
|
|
792
|
-
|
|
800
|
+
<div class="sn-sec-row">
|
|
801
|
+
<button id="sideNavRecentToggle" type="button" class="sn-sec-title" aria-expanded="true" aria-controls="sideNavSessions" title="折叠最近会话">
|
|
802
|
+
<span class="sn-sec-chev" aria-hidden="true">▾</span><span class="sn-sec-label">最近会话</span><span class="sn-sec-count" id="sideNavRecentCount" title="当前会话数">0</span>
|
|
803
|
+
</button>
|
|
804
|
+
<!-- v0.6.27 §3.94:会话管理(重命名/删除)入口,从顶栏移入「最近会话」标题右侧,复用 openSessModal。 -->
|
|
805
|
+
<button id="sideNavSessMgr" type="button" title="管理会话(重命名/删除)" aria-label="管理会话">✎</button>
|
|
806
|
+
</div>
|
|
793
807
|
<div id="sideNavSessions" role="list" aria-label="会话列表"></div>
|
|
794
808
|
</div>
|
|
795
809
|
</aside>
|