skillmkt 0.3.8 → 0.3.9
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/client/commands/serve.js +1 -5
- package/package.json +1 -1
package/client/commands/serve.js
CHANGED
|
@@ -49,15 +49,11 @@ export async function startServer(ctx, { quiet = false, port = 0 } = {}) {
|
|
|
49
49
|
};
|
|
50
50
|
const body = (req) => new Promise((r) => { let b = ''; req.on('data', (c) => b += c); req.on('end', () => r(b || '{}')); });
|
|
51
51
|
|
|
52
|
-
//
|
|
52
|
+
// 只记关键事件:打开网页 + 真正落盘的写操作;点击/读取/静态资源一律不打扰
|
|
53
53
|
const action = (req, u) => {
|
|
54
54
|
const p = u.pathname;
|
|
55
55
|
if (req.method === 'GET' && (p === '/' || p === '/index.html')) return '打开了网页';
|
|
56
|
-
if (req.method === 'GET' && p === '/api/state') return '刷新了页面数据';
|
|
57
|
-
if (req.method === 'GET' && p === '/api/probe') return '点了「扫描本机模型服务」';
|
|
58
56
|
if (req.method === 'POST' && p === '/api/config') return '保存了设置';
|
|
59
|
-
if (req.method === 'POST' && p === '/api/llm-smoke') return '点了「测试连接」';
|
|
60
|
-
if (req.method === 'POST' && p === '/api/models') return '验证密钥 / 读取模型列表';
|
|
61
57
|
if (req.method === 'POST' && p === '/api/targets') return '修改了 skill 的安装位置';
|
|
62
58
|
return null;
|
|
63
59
|
};
|