@wendongfly/myhi 1.3.174 → 1.3.179

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/index.html CHANGED
@@ -10,6 +10,7 @@
10
10
  <link rel="manifest" href="/manifest.json">
11
11
  <link rel="apple-touch-icon" href="/icon.png">
12
12
  <title>myhi</title>
13
+ <script src="/lib/machine.js"></script>
13
14
  <script src="/sio-client/socket.io.min.js"></script>
14
15
  <script>
15
16
  (function(){try{var t=localStorage.getItem('myhi_theme')||'dark',f=localStorage.getItem('myhi_font')||'medium',r=document.documentElement;if(t&&t!=='dark')r.setAttribute('data-theme',t);r.setAttribute('data-font',f);}catch(e){}})();
@@ -482,6 +483,7 @@
482
483
  <span id="user-name" style="font-size:0.8rem;color:var(--muted)"></span>
483
484
  <button id="grid-btn" class="hd-btn" onclick="location.href='/grid'" title="分屏工作台(多任务并排)">▦ 分屏</button>
484
485
  <button id="appearance-btn" class="hd-btn" onclick="openAppearance()" title="外观">🎨</button>
486
+ <button id="help-btn" class="hd-btn" onclick="openHelpSheet()" title="使用说明 / 快速上手">❓<span class="hd-txt"> 帮助</span></button>
485
487
  <button id="doctor-btn" class="hd-btn" onclick="openDoctor()" title="会话体检">🩺<span class="hd-txt"> 体检</span></button>
486
488
  <button id="usage-btn" class="hd-btn" onclick="showUsage()" title="用量">📊<span class="hd-txt"> 用量</span></button>
487
489
  <button id="passwd-btn" class="hd-btn" onclick="openPasswdSheet()" title="修改我的密码" style="display:none">🔑<span class="hd-txt"> 改密码</span></button>
@@ -523,6 +525,34 @@
523
525
  <button id="fab" onclick="openSheet()">+</button>
524
526
  <button id="fab-note" onclick="openNoteSheet()" title="随手记:把想法先记进某个任务的草稿箱">📥</button>
525
527
 
528
+ <!-- 使用说明 / 快速上手(首次访问自动弹出,之后从顶栏 ❓ 打开) -->
529
+ <div id="help-backdrop" onclick="closeHelpSheet()" style="display:none;position:fixed;inset:0;background:rgba(0,0,0,0.55);z-index:30"></div>
530
+ <div id="help-sheet" style="display:none;position:fixed;left:0;right:0;bottom:0;z-index:31;background:var(--surface);border-radius:16px 16px 0 0;padding:1rem 1rem calc(1rem + env(safe-area-inset-bottom));max-height:88vh;overflow-y:auto">
531
+ <div class="sheet-handle"></div>
532
+ <div class="sheet-title">🚀 快速上手</div>
533
+ <div style="font-size:0.82rem;color:var(--text);line-height:1.7">
534
+ <b>① 建一个任务</b>:点右下角 <b>+</b>,选「默认」预设、起个任务名(目录会自动拼好),点创建。<br>
535
+ <b>② 进去说话</b>:任务卡片点进去就是对话界面,像发微信一样把需求发给 AI,它会自己读文件、改代码、跑命令。<br>
536
+ <b>③ 让它读文件</b>:消息里打 <b>@</b> 会弹出文件搜索(也搜你在设置里配的「@ 引用范围」),选中即插入路径。<br>
537
+ <b>④ AI 忙时</b>:输入框会变成「存草稿」,想法先存着,干完自动提醒取回;或点 📥 草稿抽屉查看。<br>
538
+ <b>⑤ 文件</b>:会话里点 📂 看任务文件——引用 / 编辑 / 下载 / 在本机打开文件夹。
539
+ </div>
540
+ <div class="sheet-title" style="margin-top:1rem;font-size:0.9rem">常用功能</div>
541
+ <div style="font-size:0.78rem;color:var(--text2);line-height:1.8">
542
+ • <b>📥 随手记</b>(首页右下角):不在任务里也能记一条想法,指定归属任务,干完再发;勾「自动接力」可自动发出。<br>
543
+ • <b>▦ 分屏</b>:电脑上多任务并排(/grid)。<br>
544
+ • <b>🩺 体检</b>:查看各任务会话健康度。<br>
545
+ • <b>⚙️ 会话内设置</b>:快捷栏普通/专家模式、消息默认折叠、主题字号、@ 引用范围。<br>
546
+ • <b>🔄 恢复</b>(会话内):翻历史对话分支继续聊;<b>🛡 护栏 / 🔑 密钥</b>:敏感信息保护(详见各自抽屉里的说明)。
547
+ </div>
548
+ <div class="sheet-title" style="margin-top:1rem;font-size:0.9rem">手机 / 远程访问</div>
549
+ <div style="font-size:0.78rem;color:var(--text2);line-height:1.8">
550
+ 同一地址在手机浏览器打开即可(局域网或 Tailscale 内网)。建议「添加到主屏幕」当 App 用。触屏下回车是换行、用发送键发送。
551
+ </div>
552
+ <button onclick="closeHelpSheet(); openSheet();" style="width:100%;background:var(--accent,#2f81f7);color:#fff;border:none;border-radius:10px;padding:0.75rem;font-size:0.9rem;font-weight:700;cursor:pointer;margin-top:1rem">+ 新建我的第一个任务</button>
553
+ <button onclick="closeHelpSheet()" style="width:100%;background:var(--bg);color:var(--muted);border:1px solid var(--border);border-radius:10px;padding:0.65rem;font-size:0.85rem;cursor:pointer;margin-top:0.5rem">我知道了</button>
554
+ </div>
555
+
526
556
  <!-- 随手记:不进会话也能记一条草稿,但必须指定归属任务 -->
527
557
  <div id="note-backdrop" onclick="closeNoteSheet()" style="display:none;position:fixed;inset:0;background:rgba(0,0,0,0.55);z-index:30"></div>
528
558
  <div id="note-sheet" style="display:none;position:fixed;left:0;right:0;bottom:0;z-index:31;background:var(--surface,var(--surface));border-radius:16px 16px 0 0;padding:1rem 1rem calc(1rem + env(safe-area-inset-bottom));max-height:88vh;overflow-y:auto">
@@ -1133,8 +1163,22 @@
1133
1163
  // ── 随手记:不在会话页也能记一条草稿 ──────────────────────────
1134
1164
  let _notePendingImage = null; // { path }
1135
1165
 
1136
- window.openNoteSheet = function() {
1137
- const sel = document.getElementById('note-session');
1166
+ // ── 使用说明 / 首次引导 ─────────────────────────
1167
+ window.openHelpSheet = function() {
1168
+ document.getElementById('help-backdrop').style.display = 'block';
1169
+ document.getElementById('help-sheet').style.display = 'block';
1170
+ };
1171
+ window.closeHelpSheet = function() {
1172
+ document.getElementById('help-backdrop').style.display = 'none';
1173
+ document.getElementById('help-sheet').style.display = 'none';
1174
+ localStorage.setItem('myhi_onboarded', '1'); // 看过一次就不再自动弹
1175
+ };
1176
+ // 首次访问:自动弹快速上手,带着建第一个任务
1177
+ if (!localStorage.getItem('myhi_onboarded') && !new URLSearchParams(location.search).get('embed')) {
1178
+ setTimeout(openHelpSheet, 600);
1179
+ }
1180
+
1181
+ window.openNoteSheet = function() { const sel = document.getElementById('note-session');
1138
1182
  // AI 会话排前面(草稿最终是发给 AI 的),同项目的按最近活跃排
1139
1183
  const items = [..._allSessions].sort((a, b) =>
1140
1184
  (b.mode === 'agent') - (a.mode === 'agent') || sessionTime(b) - sessionTime(a));