@cloud411716/fancy-webnovel 0.1.71 → 0.1.72

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloud411716/fancy-webnovel",
3
- "version": "0.1.71",
3
+ "version": "0.1.72",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "exports": {
@@ -109,6 +109,26 @@ export async function apply(ctx) {
109
109
 
110
110
  notify(session, scan.notify({ type: 'collecting', platform, length }));
111
111
 
112
+ // ─── TEST: 在采集过程中持续发送 tool/call 事件 ───────────────────────
113
+ {
114
+ const s = invocation.agent.session;
115
+ let count = 0;
116
+ const timers = [];
117
+ for (let i = 0; i < 5; i++) {
118
+ const t = setTimeout(() => {
119
+ count++;
120
+ s.append('tool/call', {
121
+ callId: `progress-${i}`,
122
+ name: 'fancy-scan/progress',
123
+ arguments: JSON.stringify({ platform, length, step: count }),
124
+ });
125
+ notify(session, `[TEST] tool/call #${count} 发送于采集阶段`);
126
+ }, i * 800);
127
+ timers.push(t);
128
+ }
129
+ }
130
+ // ─── TEST 结束 ───────────────────────────────────────────────────────
131
+
112
132
  const scriptResult = await spawnScript(
113
133
  'node',
114
134
  [join(SCAN_SCRIPTS_DIR, 'run-scan.js'),