@wendongfly/myhi 1.3.219 → 1.3.221
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/build-info.json +5 -0
- package/dist/index.html +75 -4
- package/dist/index.html.gz +0 -0
- package/dist/index.js +10 -10
- package/dist/index.min.js +242 -186
- package/dist/minutes.html +335 -0
- package/dist/minutes.html.gz +0 -0
- package/dist/studio.html +378 -0
- package/dist/studio.html.gz +0 -0
- package/package.json +2 -1
package/dist/index.html
CHANGED
|
@@ -233,7 +233,12 @@
|
|
|
233
233
|
body.ws .hd-actions > :not(#conn-dot) { display: none !important; }
|
|
234
234
|
body.ws #ws-collapse { display: block; }
|
|
235
235
|
body.ws #view-controls { position: static; background: var(--surface); padding-top: 0 !important; }
|
|
236
|
-
body.ws #view-controls >
|
|
236
|
+
body.ws #view-controls > #search-row { flex-direction: column-reverse; align-items: stretch; }
|
|
237
|
+
#main-nav { display: flex; gap: 3px; padding: 3px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; }
|
|
238
|
+
#main-nav button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 0.15rem; background: none; border: none; border-radius: 7px; color: var(--text2); font-size: 0.8rem; padding: 0.42rem 0.2rem; cursor: pointer; white-space: nowrap; }
|
|
239
|
+
#main-nav button:hover { color: var(--text); }
|
|
240
|
+
#main-nav button.on { background: var(--accent); color: #fff; font-weight: 600; }
|
|
241
|
+
body.ws #main-nav { background: var(--surface); }
|
|
237
242
|
body.ws #new-btn { display: block !important; width: 100%; padding: 0.55rem; }
|
|
238
243
|
body.ws #search-count { display: none; }
|
|
239
244
|
body.ws #sess-search { flex: none; width: 100%; }
|
|
@@ -278,12 +283,16 @@
|
|
|
278
283
|
原来收起后只剩左下角一个小「» 任务」,还压在快捷栏上,普通用户根本发现不了 */
|
|
279
284
|
body.ws.ws-collapsed #app { display: none; }
|
|
280
285
|
body.ws.ws-collapsed #ws-main { left: 56px; }
|
|
286
|
+
/* 出图 / 语音处理:任务栏整个让出来,功能页自己的左栏(导航 + 填写区 + 历史)+ 右侧结果铺满屏幕 */
|
|
287
|
+
body.ws.tool-mode #app, body.ws.tool-mode #ws-rail { display: none !important; }
|
|
288
|
+
body.ws.tool-mode #ws-main { left: 0; }
|
|
281
289
|
body.ws.ws-collapsed #ws-rail { display: flex; position: fixed; left: 0; top: 0; bottom: 0; width: 56px; flex-direction: column; align-items: center;
|
|
282
290
|
gap: 0.35rem; padding: 0.7rem 0 0.6rem; background: var(--surface); border-right: 1px solid var(--border); z-index: 20; }
|
|
283
291
|
#ws-rail .rb { position: relative; width: 38px; height: 38px; border-radius: 10px; border: none; background: none; color: var(--text2); font-size: 1.05rem;
|
|
284
292
|
cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
|
|
285
293
|
#ws-rail .rb:hover { background: var(--bg); color: var(--text); }
|
|
286
294
|
#ws-rail .rb.new { background: var(--accent); color: #fff; font-size: 1.3rem; }
|
|
295
|
+
#ws-rail .rb.on { background: var(--bg); color: var(--accent); }
|
|
287
296
|
#ws-rail .rb.has-dot::after { content: ''; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
|
|
288
297
|
#ws-rail .rail-sep { width: 28px; border-top: 1px solid var(--border); margin: 0.2rem 0; flex-shrink: 0; }
|
|
289
298
|
#ws-rail .rail-list { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; align-items: center; gap: 0.35rem; padding: 0.1rem 0; }
|
|
@@ -798,8 +807,14 @@
|
|
|
798
807
|
<div id="ai-banner" class="ai-banner" style="display:none"></div>
|
|
799
808
|
|
|
800
809
|
<div id="view-controls" style="display:flex;flex-direction:column;gap:0.5rem;padding:0.75rem 0.75rem 0">
|
|
810
|
+
<!-- 一级导航:任务(AI 对话任务)/ 出图 / 语音处理。电脑在右侧打开,手机进对应页面 -->
|
|
811
|
+
<div id="main-nav">
|
|
812
|
+
<button data-nav="tasks" class="on" onclick="mainNav('tasks')">💬 任务</button>
|
|
813
|
+
<button data-nav="studio" onclick="mainNav('studio')">🖼 出图</button>
|
|
814
|
+
<button data-nav="voice" onclick="mainNav('voice')">🎤 语音处理</button>
|
|
815
|
+
</div>
|
|
801
816
|
<!-- 会话搜索:任务多了光看标题认不出,连首条消息/目录/标签一起搜 -->
|
|
802
|
-
<div style="display:flex;align-items:center;gap:0.4rem">
|
|
817
|
+
<div id="search-row" style="display:flex;align-items:center;gap:0.4rem">
|
|
803
818
|
<input id="sess-search" type="search" placeholder="搜任务:标题 / 首条需求 / 目录 / 标签"
|
|
804
819
|
autocomplete="off" spellcheck="false"
|
|
805
820
|
style="flex:1;background:var(--bg,var(--bg));border:1px solid var(--border,var(--border));border-radius:8px;color:var(--text,var(--text));font-size:0.8rem;padding:0.4rem 0.7rem;outline:none">
|
|
@@ -842,6 +857,8 @@
|
|
|
842
857
|
<div id="ws-rail">
|
|
843
858
|
<button class="rb" onclick="wsSetCollapsed(false)" data-tip="展开任务栏">☰</button>
|
|
844
859
|
<button class="rb new" onclick="openSheet()" data-tip="新建任务">+</button>
|
|
860
|
+
<button class="rb" data-nav="studio" onclick="mainNav('studio')" data-tip="出图">🖼</button>
|
|
861
|
+
<button class="rb" data-nav="voice" onclick="mainNav('voice')" data-tip="语音处理">🎤</button>
|
|
845
862
|
<div class="rail-sep"></div>
|
|
846
863
|
<div class="rail-list" id="rail-list"></div>
|
|
847
864
|
<div class="rail-sep"></div>
|
|
@@ -1474,7 +1491,8 @@
|
|
|
1474
1491
|
_homeVer = await r.json();
|
|
1475
1492
|
const sub = document.getElementById('set-ver-sub'), btn = document.getElementById('set-up-btn');
|
|
1476
1493
|
if (!sub) return;
|
|
1477
|
-
sub.textContent = `当前 v${_homeVer.current}` + (_homeVer.updateAvailable ? ` · 有新版 v${_homeVer.latest}` : ' · 已是最新');
|
|
1494
|
+
sub.textContent = `当前 v${_homeVer.current}${_homeVer.build?.commit ? '(' + _homeVer.build.commit + ')' : ''}` + (_homeVer.updateAvailable ? ` · 有新版 v${_homeVer.latest}` : ' · 已是最新');
|
|
1495
|
+
if (_homeVer.build?.stale) { sub.textContent += `。⚠ 程序文件其实是 v${_homeVer.build.version} 的(发布时没重新构建),新功能不会生效,请发布方重新构建后发布`; sub.style.color = 'var(--red)'; }
|
|
1478
1496
|
btn.style.display = _homeVer.updateAvailable ? '' : 'none';
|
|
1479
1497
|
btn.textContent = '升级到 v' + _homeVer.latest;
|
|
1480
1498
|
document.getElementById('settings-btn').classList.toggle('has-dot', !!_homeVer.updateAvailable);
|
|
@@ -1541,6 +1559,8 @@
|
|
|
1541
1559
|
ask: '「问一问」和解释,建议选便宜快速的;留空 = sonnet',
|
|
1542
1560
|
voice: '语音转成书面文字,建议选便宜的;留空 = 同问一问',
|
|
1543
1561
|
vision: '配了就用:聊天框发的图片先用它转成文字再交给主模型(多花几秒,聊天里可点开核对);主模型看不了图时一定要配,如本地的 m1-vision。留空 = 图片直接发给主模型。提示用户:截图标注尽量配文字,红框 / 箭头的指向看图模型常认错',
|
|
1562
|
+
minutes: '整理会议纪要用的模型(逐字稿长,选上下文大、中文好的);留空 = 跟主任务一样',
|
|
1563
|
+
image: '「出图」页默认用的出图模型(如 glm-image、cogview-4、image-01);留空 = 网关上的第一个出图模型',
|
|
1544
1564
|
visionPro: '可选:重要截图(复杂标注的 bug 单、设计稿评审)发送时点「🔍 高精度」改用它,如网关上的 Claude 等云端多模态模型;留空 = 不显示这个开关',
|
|
1545
1565
|
};
|
|
1546
1566
|
// ── 大模型网关 ────────────────────────────────────────────
|
|
@@ -1664,9 +1684,11 @@
|
|
|
1664
1684
|
tools: ms.filter(m => !m.fit?.main).map(item),
|
|
1665
1685
|
all: cheapFirst.map(item),
|
|
1666
1686
|
vision: cheapFirst.filter(m => (m.caps || []).includes('vision')).map(item),
|
|
1687
|
+
// 出图模型:网关标了 image_generation,或名字像出图模型(旧网关没标能力时)
|
|
1688
|
+
image: ms.filter(m => (m.caps || []).includes('image_generation') || m.image || (/(^|[-_/.])(image|cogview|seedream|wanx|flux|jimeng)/i.test(m.id) && !/vision|[-_]vl\b|ocr/i.test(m.id))).map(item),
|
|
1667
1689
|
};
|
|
1668
1690
|
const TOOL_SCENES = { main: 1, plan: 1, subagent: 1, vision: 1, visionPro: 1 };
|
|
1669
|
-
const DL = (k) => k === 'vision' || k === 'visionPro' ? 'vision' : TOOL_SCENES[k] ? 'tools' : 'all';
|
|
1691
|
+
const DL = (k) => k === 'image' ? 'image' : k === 'vision' || k === 'visionPro' ? 'vision' : TOOL_SCENES[k] ? 'tools' : 'all';
|
|
1670
1692
|
document.getElementById('set-models-rows').innerHTML = Object.entries(d.sceneLabels || {}).map(([k, label]) =>
|
|
1671
1693
|
`<div class="set-item inp"><div class="set-lbl">${esc(label)}<small>${esc(SCENE_HINT[k] || '')}</small></div>
|
|
1672
1694
|
<div class="set-ctl"><div class="mp-wrap"><input class="set-inp" data-scene="${esc(k)}" data-mp="${DL(k)}" value="${esc(d.scenes?.[k] || '')}" placeholder="默认" autocomplete="off" spellcheck="false"><button type="button" class="mp-caret" tabindex="-1" data-mp-caret aria-label="选择模型">▾</button></div></div>
|
|
@@ -2372,7 +2394,53 @@
|
|
|
2372
2394
|
const WS_MQ = matchMedia('(min-width: 1024px)');
|
|
2373
2395
|
const WS_KEEP = 5;
|
|
2374
2396
|
function wsOn() { return document.body.classList.contains('ws'); }
|
|
2397
|
+
// ── 一级导航:出图 / 语音处理 在工作台右侧打开(和任务一样留在后台,来回切不重载);手机直接进页面 ──
|
|
2398
|
+
const TOOL_URL = { studio: '/studio', voice: '/minutes' };
|
|
2399
|
+
const TOOL_TITLE = { studio: '出图', voice: '语音处理' };
|
|
2400
|
+
const _toolFrames = new Map();
|
|
2401
|
+
let _tool = null, _lastTask = null;
|
|
2402
|
+
let _toolPending = new URLSearchParams(location.search).get('tool'); // 刷新后回到上次的工具页
|
|
2403
|
+
function setNavActive(k) {
|
|
2404
|
+
document.querySelectorAll('#main-nav [data-nav]').forEach(b => b.classList.toggle('on', b.dataset.nav === k));
|
|
2405
|
+
document.querySelectorAll('#ws-rail [data-nav]').forEach(b => b.classList.toggle('on', b.dataset.nav === k));
|
|
2406
|
+
}
|
|
2407
|
+
function hideTools() { for (const f of _toolFrames.values()) f.style.display = 'none'; _tool = null; document.body.classList.remove('tool-mode'); setNavActive('tasks'); }
|
|
2408
|
+
// 功能页(同源 iframe)左栏里的导航 / ⚙:发消息回首页切换
|
|
2409
|
+
window.addEventListener('message', (e) => {
|
|
2410
|
+
if (e.origin !== location.origin || e.data?.type !== 'myhi-nav') return;
|
|
2411
|
+
if (e.data.to === 'settings') { window.focus(); openSettings(); document.getElementById('set-sheet')?.focus?.(); return; } // 焦点拿回首页:Esc 能关设置
|
|
2412
|
+
mainNav(e.data.to);
|
|
2413
|
+
});
|
|
2414
|
+
window.mainNav = function(k) {
|
|
2415
|
+
if (k === 'tasks') {
|
|
2416
|
+
if (!_tool) return;
|
|
2417
|
+
const back = _lastTask && _allSessions.some(x => x.id === _lastTask) ? _lastTask : null;
|
|
2418
|
+
hideTools();
|
|
2419
|
+
return back ? wsOpen(back) : wsShowWelcome();
|
|
2420
|
+
}
|
|
2421
|
+
if (!TOOL_URL[k]) return;
|
|
2422
|
+
if (!wsOn()) { location.href = TOOL_URL[k]; return; }
|
|
2423
|
+
if (_wsCur) _lastTask = _wsCur;
|
|
2424
|
+
let f = _toolFrames.get(k);
|
|
2425
|
+
if (!f) {
|
|
2426
|
+
f = document.createElement('iframe');
|
|
2427
|
+
f.src = TOOL_URL[k] + '?embed=ws';
|
|
2428
|
+
f.setAttribute('allow', 'microphone; clipboard-read; clipboard-write');
|
|
2429
|
+
document.getElementById('ws-main').appendChild(f);
|
|
2430
|
+
_toolFrames.set(k, f);
|
|
2431
|
+
}
|
|
2432
|
+
for (const fr of _wsFrames.values()) fr.style.display = 'none';
|
|
2433
|
+
for (const [n, fr] of _toolFrames) fr.style.display = n === k ? '' : 'none';
|
|
2434
|
+
document.getElementById('ws-welcome').style.display = 'none';
|
|
2435
|
+
_wsCur = null; _tool = k;
|
|
2436
|
+
document.body.classList.add('tool-mode');
|
|
2437
|
+
history.replaceState(null, '', '/?tool=' + k);
|
|
2438
|
+
document.title = TOOL_TITLE[k] + ' — myhi';
|
|
2439
|
+
setNavActive(k);
|
|
2440
|
+
wsMarkActive();
|
|
2441
|
+
};
|
|
2375
2442
|
function wsOpen(id) {
|
|
2443
|
+
if (_tool) hideTools();
|
|
2376
2444
|
_wsCur = id;
|
|
2377
2445
|
let f = _wsFrames.get(id);
|
|
2378
2446
|
if (f) _wsFrames.delete(id);
|
|
@@ -2393,6 +2461,7 @@
|
|
|
2393
2461
|
setTimeout(() => f.contentWindow?.focus(), 50);
|
|
2394
2462
|
}
|
|
2395
2463
|
function wsShowWelcome() {
|
|
2464
|
+
if (_tool) hideTools();
|
|
2396
2465
|
_wsCur = null;
|
|
2397
2466
|
for (const fr of _wsFrames.values()) fr.style.display = 'none';
|
|
2398
2467
|
document.getElementById('ws-welcome').style.display = '';
|
|
@@ -2428,6 +2497,7 @@
|
|
|
2428
2497
|
// 每次列表重绘后:刷新前打开的任务等列表到了再打开;当前任务被删了就回欢迎页、回收它的会话页
|
|
2429
2498
|
function wsAfterRender() {
|
|
2430
2499
|
if (!wsOn()) return;
|
|
2500
|
+
if (_toolPending) { const k = _toolPending; _toolPending = null; mainNav(k); }
|
|
2431
2501
|
if (_wsPending && _allSessions.some(x => x.id === _wsPending)) { const id = _wsPending; _wsPending = null; wsOpen(id); return; }
|
|
2432
2502
|
for (const [k, fr] of _wsFrames) if (!_allSessions.some(x => x.id === k)) { fr.remove(); _wsFrames.delete(k); if (k === _wsCur) wsShowWelcome(); }
|
|
2433
2503
|
renderRail();
|
|
@@ -2464,6 +2534,7 @@
|
|
|
2464
2534
|
const banner = document.getElementById('ai-banner');
|
|
2465
2535
|
const target = on ? document.getElementById('ws-welcome') : document.getElementById('view-controls');
|
|
2466
2536
|
if (on) target.appendChild(banner); else target.parentNode.insertBefore(banner, target);
|
|
2537
|
+
if (!on && _tool) { location.href = TOOL_URL[_tool]; return; } // 窗口拉窄:进工具的独立页面
|
|
2467
2538
|
if (!on && _wsCur) { location.href = '/terminal/' + encodeURIComponent(_wsCur); return; } // 窗口拉窄:直接进当前任务的会话页
|
|
2468
2539
|
fitHeader();
|
|
2469
2540
|
}
|
package/dist/index.html.gz
CHANGED
|
Binary file
|