@wendongfly/myhi 1.3.130 → 1.3.132
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 +64 -0
- package/dist/index.js +1 -1
- package/dist/index.min.js +5 -5
- package/installer/README.md +1 -1
- package/installer/install-myhi.ps1 +14 -0
- package/package.json +1 -1
package/dist/chat.html
CHANGED
|
@@ -447,6 +447,7 @@
|
|
|
447
447
|
<button class="sk sk-claude" onclick="doClear()">清除</button>
|
|
448
448
|
<button class="sk sk-claude" onclick="openSecretsSheet()" style="color:var(--blue2)">🔑 密钥</button>
|
|
449
449
|
<button class="sk sk-claude" onclick="openGuardSheet()" style="color:var(--blue2)">🛡 护栏</button>
|
|
450
|
+
<button class="sk sk-claude" onclick="openFollowUpSheet()" style="color:var(--blue2)">🔄 跟进</button>
|
|
450
451
|
<button class="sk sk-claude" onclick="openGitSheet()" style="color:var(--green)">提交</button>
|
|
451
452
|
<button class="sk sk-claude" onclick="showMemory()">记忆</button>
|
|
452
453
|
<button class="sk sk-claude" onclick="openVaSheet()" style="color:var(--blue2)">语音</button>
|
|
@@ -695,6 +696,33 @@
|
|
|
695
696
|
</div>
|
|
696
697
|
</div>
|
|
697
698
|
|
|
699
|
+
<!-- 自动跟进(会话级):长任务完成后自动汇报进度,免用户反复问 -->
|
|
700
|
+
<div id="followup-sheet" class="action-sheet">
|
|
701
|
+
<div class="action-sheet-backdrop" onclick="closeFollowUpSheet()"></div>
|
|
702
|
+
<div class="action-sheet-box" style="max-height:72vh;display:flex;flex-direction:column">
|
|
703
|
+
<div class="action-sheet-title">🔄 自动跟进 · 本会话</div>
|
|
704
|
+
<div style="font-size:0.68rem;color:var(--muted);padding:0 0.2rem 0.5rem;line-height:1.55">
|
|
705
|
+
交给 AI 的长任务(压缩、导入、批处理…)常要你反复问"好了没"。开启后,AI 说完一轮、会话空闲时,myhi 会<b>每隔一段时间自动替你问一次进度并让 AI 汇报</b>;AI 判断<b>全部完成会自动停</b>。
|
|
706
|
+
<br><span style="color:var(--yellow)">⚠️ 每次自动跟进 = 一轮真实模型调用(花额度),故最多 5 次上限、完成即停。</span>
|
|
707
|
+
</div>
|
|
708
|
+
<label style="display:flex;align-items:center;gap:0.5rem;padding:0.45rem 0.2rem;font-size:0.86rem;cursor:pointer;border-top:1px solid var(--surface2)">
|
|
709
|
+
<input type="checkbox" id="fu-enabled" onchange="saveFollowUp()" style="width:1.15rem;height:1.15rem"> 开启自动跟进
|
|
710
|
+
</label>
|
|
711
|
+
<div style="display:flex;align-items:center;gap:0.5rem;padding:0.3rem 0.2rem;font-size:0.82rem">
|
|
712
|
+
跟进间隔:
|
|
713
|
+
<select id="fu-interval" class="slash-inp" onchange="saveFollowUp()" style="max-width:130px">
|
|
714
|
+
<option value="5">5 分钟</option>
|
|
715
|
+
<option value="10">10 分钟</option>
|
|
716
|
+
<option value="15">15 分钟</option>
|
|
717
|
+
<option value="30">30 分钟</option>
|
|
718
|
+
<option value="60">60 分钟</option>
|
|
719
|
+
</select>
|
|
720
|
+
</div>
|
|
721
|
+
<div id="fu-status" style="font-size:0.72rem;color:var(--muted);padding:0.3rem 0.2rem"></div>
|
|
722
|
+
<button class="action-sheet-cancel" onclick="closeFollowUpSheet()">关闭</button>
|
|
723
|
+
</div>
|
|
724
|
+
</div>
|
|
725
|
+
|
|
698
726
|
<div id="memory-sheet" class="action-sheet">
|
|
699
727
|
<div class="action-sheet-backdrop" onclick="closeMemorySheet()"></div>
|
|
700
728
|
<div class="action-sheet-box" style="height:90vh;max-height:90vh;display:flex;flex-direction:column">
|
|
@@ -3307,6 +3335,42 @@
|
|
|
3307
3335
|
} catch {}
|
|
3308
3336
|
};
|
|
3309
3337
|
|
|
3338
|
+
// ── 自动跟进(会话级):长任务完成后自动汇报进度 ──────────────
|
|
3339
|
+
window.openFollowUpSheet = function() {
|
|
3340
|
+
document.getElementById('followup-sheet').classList.add('open');
|
|
3341
|
+
loadFollowUp();
|
|
3342
|
+
};
|
|
3343
|
+
window.closeFollowUpSheet = function() {
|
|
3344
|
+
document.getElementById('followup-sheet').classList.remove('open');
|
|
3345
|
+
};
|
|
3346
|
+
function _fuStatusText(d) {
|
|
3347
|
+
return d.enabled ? `已开启 · 每 ${d.intervalMinutes} 分钟 · 已跟进 ${d.count}/${d.max} 次` : '未开启';
|
|
3348
|
+
}
|
|
3349
|
+
async function loadFollowUp() {
|
|
3350
|
+
try {
|
|
3351
|
+
const r = await fetch(`/api/session/${SESSION_ID}/followup`);
|
|
3352
|
+
if (!r.ok) { document.getElementById('fu-status').textContent = '(此会话不支持自动跟进)'; return; }
|
|
3353
|
+
const d = await r.json();
|
|
3354
|
+
document.getElementById('fu-enabled').checked = !!d.enabled;
|
|
3355
|
+
document.getElementById('fu-interval').value = String(d.intervalMinutes || 15);
|
|
3356
|
+
document.getElementById('fu-status').textContent = _fuStatusText(d);
|
|
3357
|
+
} catch { document.getElementById('fu-status').textContent = '连接失败'; }
|
|
3358
|
+
}
|
|
3359
|
+
window.saveFollowUp = async function() {
|
|
3360
|
+
const enabled = document.getElementById('fu-enabled').checked;
|
|
3361
|
+
const intervalMinutes = parseInt(document.getElementById('fu-interval').value, 10) || 15;
|
|
3362
|
+
try {
|
|
3363
|
+
const r = await fetch(`/api/session/${SESSION_ID}/followup`, {
|
|
3364
|
+
method: 'PUT', headers: { 'Content-Type': 'application/json' },
|
|
3365
|
+
body: JSON.stringify({ enabled, intervalMinutes }),
|
|
3366
|
+
});
|
|
3367
|
+
const d = await r.json();
|
|
3368
|
+
if (d.error) { addStatusMessage(d.error); return; }
|
|
3369
|
+
document.getElementById('fu-status').textContent = _fuStatusText(d);
|
|
3370
|
+
addStatusMessage(enabled ? `🔄 自动跟进已开启(每 ${intervalMinutes} 分钟)` : '🔄 自动跟进已关闭');
|
|
3371
|
+
} catch { addStatusMessage('设置失败'); }
|
|
3372
|
+
};
|
|
3373
|
+
|
|
3310
3374
|
// ── 隐私护栏(Layer C,去标识化):会话级自助维护 ──────────────
|
|
3311
3375
|
window.openGuardSheet = function() {
|
|
3312
3376
|
document.getElementById('guard-sheet').classList.add('open');
|