@cloud411716/fancy-webnovel 0.1.69 → 0.1.71
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/package.json +1 -1
- package/plugins/fancy-scan/index.js +17 -0
package/package.json
CHANGED
|
@@ -20,6 +20,23 @@ export async function apply(ctx) {
|
|
|
20
20
|
const session = invocation.agent.session;
|
|
21
21
|
const rawInput = invocation.rawInput ? invocation.rawInput.trim() : '';
|
|
22
22
|
|
|
23
|
+
// ─── TEST: 验证直接用 invocation.agent.session 追加事件 ─────────────────
|
|
24
|
+
{
|
|
25
|
+
// invocation.agent.session 就是 Session 对象,直接 append
|
|
26
|
+
const s = invocation.agent.session;
|
|
27
|
+
notify(session, `[TEST] session.id = ${s?.id ?? 'UNDEFINED'}`);
|
|
28
|
+
if (s) {
|
|
29
|
+
// 追加一个 fake tool/call,看 status bar 是否出现进度
|
|
30
|
+
s.append('tool/call', {
|
|
31
|
+
callId: 'test-call-1',
|
|
32
|
+
name: 'fancy-scan/progress',
|
|
33
|
+
arguments: JSON.stringify({ platform: 'test', length: 'test' }),
|
|
34
|
+
});
|
|
35
|
+
notify(session, '[TEST] session.append(tool/call) 成功');
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
// ─── TEST 结束 ───────────────────────────────────────────────────────
|
|
39
|
+
|
|
23
40
|
// 获取项目根
|
|
24
41
|
let projectRoot = rawInput ? rawInput.split(/\s+/)[0] : '';
|
|
25
42
|
if (!projectRoot) projectRoot = process.cwd();
|