@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 +1 -1
- package/plugins/fancy-scan/index.js +4 -11
package/package.json
CHANGED
|
@@ -109,16 +109,8 @@ export async function apply(ctx) {
|
|
|
109
109
|
|
|
110
110
|
notify(session, scan.notify({ type: 'collecting', platform, length }));
|
|
111
111
|
|
|
112
|
-
//
|
|
113
|
-
|
|
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
|
-
|
|
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))
|