@wendongfly/myhi 1.3.152 → 1.3.153
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 +10 -3
- package/dist/grid.html +1 -1
- package/dist/index.html +2 -2
- package/package.json +1 -1
package/dist/chat.html
CHANGED
|
@@ -2608,6 +2608,11 @@
|
|
|
2608
2608
|
|
|
2609
2609
|
// ── 输入处理 ──────────────────────────────────
|
|
2610
2610
|
window.sendCommand = sendCommand;
|
|
2611
|
+
// 服务端本地处理的 slash 命令(agent.js 拦截后只回一条 system/info、不 spawn claude、
|
|
2612
|
+
// 永远等不到 result)—— 这些不能进 thinking/working 态,否则没人把它清回来:
|
|
2613
|
+
// 切模型后输入框永远「运行中」(1.3.152 用户实测)。
|
|
2614
|
+
const LOCAL_SLASH_RE = /^\/(clear|rename|model\s|resume\s|plan(\s|$))/;
|
|
2615
|
+
|
|
2611
2616
|
function sendCommand() {
|
|
2612
2617
|
const text = cmdInput.value.trim();
|
|
2613
2618
|
if (!text && !_pendingImage && !_pendingFile) return;
|
|
@@ -2643,7 +2648,8 @@
|
|
|
2643
2648
|
? `用户上传了一个临时文件用于本次分析(不在项目文件树里),路径是 ${filePath}(原文件名 ${fileName}),请用合适的工具(如 Read)读取并分析它。用户的要求是:${userText || '分析这个文件'}`
|
|
2644
2649
|
: text;
|
|
2645
2650
|
socket.emit('agent:query', { prompt });
|
|
2646
|
-
|
|
2651
|
+
// 本地 slash(/model /clear /plan /resume /rename)只回一条 info、无 result,不进 thinking 态
|
|
2652
|
+
if (!LOCAL_SLASH_RE.test(text)) showThinking();
|
|
2647
2653
|
} else {
|
|
2648
2654
|
const attach = imgPath || filePath;
|
|
2649
2655
|
const input = attach
|
|
@@ -3402,7 +3408,7 @@
|
|
|
3402
3408
|
// 用【别名】而非硬编码全名:/model sonnet 永远指向该家族最新版,claude 升级不用改这里。
|
|
3403
3409
|
// 精确版本/冷门模型用面板底部「自定义模型」输入框指定全名(如 claude-sonnet-4-6)。
|
|
3404
3410
|
const MODELS = [
|
|
3405
|
-
{ id: 'default', label: '默认', desc: '
|
|
3411
|
+
{ id: 'default', label: '默认', desc: '跟随账户/订阅设置' },
|
|
3406
3412
|
{ id: 'sonnet', label: 'Sonnet', desc: '速度+智能平衡 · 跟随最新版' },
|
|
3407
3413
|
{ id: 'opus', label: 'Opus', desc: '最强推理 · agentic coding · 跟随最新版' },
|
|
3408
3414
|
{ id: 'haiku', label: 'Haiku', desc: '最快最便宜 · 跟随最新版' },
|
|
@@ -4323,7 +4329,8 @@
|
|
|
4323
4329
|
if (!isController && canTakeControl()) socket.emit('take-control', { sessionId: SESSION_ID });
|
|
4324
4330
|
socket.emit('agent:query', { prompt: prompt_text });
|
|
4325
4331
|
addInputMessage(prompt_text);
|
|
4326
|
-
|
|
4332
|
+
// 本地 slash(/plan /resume /rename)只回一条 info、无 result,不进 thinking 态
|
|
4333
|
+
if (!LOCAL_SLASH_RE.test(prompt_text)) showThinking();
|
|
4327
4334
|
};
|
|
4328
4335
|
// Enter 键提交
|
|
4329
4336
|
document.getElementById('slash-input')?.addEventListener('keydown', (e) => {
|
package/dist/grid.html
CHANGED
|
@@ -312,7 +312,7 @@
|
|
|
312
312
|
// ── 新建任务(和首页「新建终端会话」一致:预设 + 名称 + 命令 + 目录 + 最近目录)──
|
|
313
313
|
const socket = io();
|
|
314
314
|
const NT_PRESETS = [
|
|
315
|
-
{ icon:'🤖', label:'
|
|
315
|
+
{ icon:'🤖', label:'默认', title:'claude', type:'agent', cmd:'' },
|
|
316
316
|
{ icon:'🐚', label:'Shell', title:'shell', type:'pty', cmd:'' },
|
|
317
317
|
];
|
|
318
318
|
let _ntPreset = 0;
|
package/dist/index.html
CHANGED
|
@@ -650,7 +650,7 @@
|
|
|
650
650
|
const H = 'style="font-size:0.9rem;font-weight:700;margin-bottom:0.5rem;color:var(--text)"';
|
|
651
651
|
const T = 'style="font-size:0.82rem;color:var(--text2);line-height:1.6"';
|
|
652
652
|
let html = '<div style="padding:1.5rem">';
|
|
653
|
-
html += '<h3 style="margin:0 0 1.2rem;font-size:1.1rem;color:#fff;text-align:center"
|
|
653
|
+
html += '<h3 style="margin:0 0 1.2rem;font-size:1.1rem;color:#fff;text-align:center">用量</h3>';
|
|
654
654
|
if (data.rateLimit) {
|
|
655
655
|
const rl = data.rateLimit;
|
|
656
656
|
const resetTime = new Date(rl.resetsAt * 1000);
|
|
@@ -1184,7 +1184,7 @@
|
|
|
1184
1184
|
// ── Presets ───────────────────────────────────────────────────
|
|
1185
1185
|
const PRESETS = [
|
|
1186
1186
|
// Agent 模式
|
|
1187
|
-
{ icon: '🤖', label: '
|
|
1187
|
+
{ icon: '🤖', label: '默认', title: 'claude', type: 'agent', cmd: 'claude' },
|
|
1188
1188
|
// PTY 模式(终端)
|
|
1189
1189
|
{ icon: '🐚', label: 'Shell', title: 'shell', type: 'pty', cmd: '' },
|
|
1190
1190
|
];
|
package/package.json
CHANGED