@cloud411716/fancy-webnovel 1.0.30 → 1.0.32
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/commands/scan/index.js +11 -5
- package/package.json +1 -1
package/commands/scan/index.js
CHANGED
|
@@ -52,6 +52,7 @@ const scan = {
|
|
|
52
52
|
return {
|
|
53
53
|
id: 'rank',
|
|
54
54
|
question: `${pLabel} 有多个榜单,支持多选。请选择要采集的榜单:`,
|
|
55
|
+
detail: opts.map(o => o.label).join('、'),
|
|
55
56
|
hideCustomInput: true,
|
|
56
57
|
multiSelect: true,
|
|
57
58
|
options: opts,
|
|
@@ -154,11 +155,16 @@ export function apply(ctx) {
|
|
|
154
155
|
const platform = row[1];
|
|
155
156
|
|
|
156
157
|
// ---------- rank selection (multi-select) ----------
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
158
|
+
let rankResult;
|
|
159
|
+
try {
|
|
160
|
+
rankResult = await ctx.userQuestions.ask({
|
|
161
|
+
questions: [scan.askRankList(platform)],
|
|
162
|
+
agent: invocation.agent,
|
|
163
|
+
signal,
|
|
164
|
+
});
|
|
165
|
+
} catch {
|
|
166
|
+
return notify(session, 'error', scan.notify({ type: 'cancelled' }));
|
|
167
|
+
}
|
|
162
168
|
const selected = rankResult.answers[0]?.selected ?? [];
|
|
163
169
|
const custom = rankResult.answers[0]?.custom?.trim();
|
|
164
170
|
|