@cloud411716/fancy-webnovel 0.1.72 → 0.1.74

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.72",
3
+ "version": "0.1.74",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "exports": {
@@ -109,25 +109,10 @@ 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 结束 ───────────────────────────────────────────────────────
112
+ // 采集过程中更新 status bar
113
+ const tick = setInterval(() => {
114
+ session.append('turn/start', { source: 'fancy-scan' });
115
+ }, 2000);
131
116
 
132
117
  const scriptResult = await spawnScript(
133
118
  'node',
@@ -136,6 +121,7 @@ export async function apply(ctx) {
136
121
  { timeout: 120000 }
137
122
  );
138
123
 
124
+ clearInterval(tick);
139
125
  if (!scriptResult.ok) {
140
126
  const err = (typeof scriptResult.error === 'object' && scriptResult.error !== null)
141
127
  ? (scriptResult.error.message || JSON.stringify(scriptResult.error))