@wendongfly/myhi 1.3.115 → 1.3.116

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/chat.html CHANGED
@@ -450,8 +450,8 @@
450
450
  </div>
451
451
  <div class="fp-path" id="fp-path"></div>
452
452
  <div id="fp-tools" style="display:flex;gap:0.4rem;align-items:center;padding:0.3rem 0.75rem;flex-wrap:wrap">
453
- <button class="fp-btn" onclick="fpOpenFolder()" title="在服务端机器打开系统文件夹(你就坐在跑 myhi 的机器时有效)">📂 打开文件夹</button>
454
- <button class="fp-btn" onclick="fpOpenEditor()" title=" VS Code 打开项目(本机、装了 code 命令时有效)">VS Code</button>
453
+ <button class="fp-btn" onclick="fpOpenFolder()" title="在【myhi 服务端那台机器】的桌面打开系统文件夹——只有你就坐在跑 myhi 的机器前才看得到;远程访问就用下方列表浏览/下载">📂 服务端本机打开</button>
454
+ <button class="fp-btn" onclick="fpOpenEditor()" title="在服务端本机用 VS Code 打开(需装 code 命令)">VS Code(服务端)</button>
455
455
  <span style="flex:1"></span>
456
456
  <button class="fp-btn" id="fp-sort-btn" onclick="fpToggleSort()" title="切换排序">排序: 名称</button>
457
457
  </div>
@@ -1597,6 +1597,12 @@
1597
1597
  try { window.parent.postMessage({ type: 'myhi-status', sessionId: SESSION_ID, state }, '*'); } catch {}
1598
1598
  }
1599
1599
  }
1600
+ // 接收外层 grid 的命令(分屏里顶栏被 embed 隐藏,靠外层按钮驱动本页功能)
1601
+ window.addEventListener('message', (e) => {
1602
+ const m = e.data;
1603
+ if (!m || m.type !== 'myhi-cmd') return;
1604
+ if (m.cmd === 'open-files' && typeof openFilePanel === 'function') openFilePanel();
1605
+ });
1600
1606
 
1601
1607
  function updateShortcutBar() {
1602
1608
  if (!currentSession) { shortcutBar.style.display = 'none'; return; }
package/dist/grid.html CHANGED
@@ -183,9 +183,14 @@
183
183
  const head = document.createElement('div'); head.className = 'pane-head';
184
184
  const dot = document.createElement('span'); dot.className = 'pane-dot'; dot.title = '任务状态';
185
185
  const picker = document.createElement('button'); picker.className = 'pane-picker';
186
+ const files = document.createElement('button'); files.textContent='📁'; files.title='查看该任务的文件(在本格内浏览/下载,远程也能用)';
187
+ files.addEventListener('click', () => {
188
+ if (pane._iframe && pane._iframe.contentWindow) pane._iframe.contentWindow.postMessage({ type:'myhi-cmd', cmd:'open-files' }, '*');
189
+ else alert('先给这个格子选一个任务');
190
+ });
186
191
  const full = document.createElement('button'); full.textContent='↗'; full.title='在新标签页打开';
187
192
  const close = document.createElement('button'); close.textContent='✕'; close.title='关闭此格'; close.style.color='var(--red)';
188
- head.appendChild(dot); head.appendChild(picker); head.appendChild(full); head.appendChild(close);
193
+ head.appendChild(dot); head.appendChild(picker); head.appendChild(files); head.appendChild(full); head.appendChild(close);
189
194
  pane._dot = dot; pane._head = head;
190
195
  const body = document.createElement('div'); body.className = 'pane-body';
191
196
  const empty = document.createElement('div'); empty.className='pane-empty'; empty.textContent='点上方「选择任务」挑一个(可搜索/分组/按标签)'; body.appendChild(empty);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wendongfly/myhi",
3
- "version": "1.3.115",
3
+ "version": "1.3.116",
4
4
  "description": "Web-based terminal sharing with chat UI — control your terminal from phone via LAN/Tailscale",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",