@cloud411716/fancy-webnovel 0.1.71 → 0.1.73

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.73",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "exports": {
@@ -109,6 +109,17 @@ export async function apply(ctx) {
109
109
 
110
110
  notify(session, scan.notify({ type: 'collecting', platform, length }));
111
111
 
112
+ // 采集过程中持续更新 status bar
113
+ let step = 0;
114
+ const tick = setInterval(() => {
115
+ step++;
116
+ session.append('tool/call', {
117
+ callId: `progress-${step}`,
118
+ name: 'fancy-scan/progress',
119
+ arguments: JSON.stringify({ platform, length, step }),
120
+ });
121
+ }, 2000);
122
+
112
123
  const scriptResult = await spawnScript(
113
124
  'node',
114
125
  [join(SCAN_SCRIPTS_DIR, 'run-scan.js'),
@@ -116,6 +127,7 @@ export async function apply(ctx) {
116
127
  { timeout: 120000 }
117
128
  );
118
129
 
130
+ clearInterval(tick);
119
131
  if (!scriptResult.ok) {
120
132
  const err = (typeof scriptResult.error === 'object' && scriptResult.error !== null)
121
133
  ? (scriptResult.error.message || JSON.stringify(scriptResult.error))