@cloud411716/fancy-webnovel 0.1.73 → 0.1.75

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.73",
3
+ "version": "0.1.75",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "exports": {
@@ -109,16 +109,8 @@ 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);
112
+ // 开始计时
113
+ session.append('turn/start', { source: 'fancy-scan' });
122
114
 
123
115
  const scriptResult = await spawnScript(
124
116
  'node',
@@ -127,7 +119,8 @@ export async function apply(ctx) {
127
119
  { timeout: 120000 }
128
120
  );
129
121
 
130
- clearInterval(tick);
122
+ session.append('turn/end', { source: 'fancy-scan' });
123
+
131
124
  if (!scriptResult.ok) {
132
125
  const err = (typeof scriptResult.error === 'object' && scriptResult.error !== null)
133
126
  ? (scriptResult.error.message || JSON.stringify(scriptResult.error))