@cloud411716/fancy-webnovel 0.3.4 → 0.3.5
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 +20 -12
package/package.json
CHANGED
|
@@ -79,6 +79,7 @@ export async function apply(ctx) {
|
|
|
79
79
|
// ---------- 串行采集 ----------
|
|
80
80
|
let allFiles = [];
|
|
81
81
|
let failed = 0;
|
|
82
|
+
let lastReceipt = null;
|
|
82
83
|
|
|
83
84
|
for (const rank of unique) {
|
|
84
85
|
const stop = startActivity(session);
|
|
@@ -119,20 +120,27 @@ export async function apply(ctx) {
|
|
|
119
120
|
failed++;
|
|
120
121
|
continue;
|
|
121
122
|
}
|
|
122
|
-
|
|
123
|
-
allFiles = allFiles.concat(
|
|
124
|
-
|
|
125
|
-
// 逐个文件追加到 topic_decision
|
|
126
|
-
const topicFile = receipt.topic_decision || '';
|
|
127
|
-
if (topicFile) {
|
|
128
|
-
notify(session, scan.notify({ type: 'handover', platform, files, topicFile, projectRoot }));
|
|
129
|
-
const prompt = scan.llmAnalysisPrompt({ platform, date: receipt.date || '', files, topicFile, projectRoot });
|
|
130
|
-
llmFollowup(invocation, prompt);
|
|
131
|
-
}
|
|
123
|
+
lastReceipt = receipt;
|
|
124
|
+
allFiles = allFiles.concat(receipt.scan_files || []);
|
|
132
125
|
}
|
|
133
126
|
|
|
134
|
-
|
|
135
|
-
|
|
127
|
+
// ---------- 全部采集完成后统一输出 ----------
|
|
128
|
+
if (allFiles.length > 0 && lastReceipt) {
|
|
129
|
+
notify(session, scan.notify({
|
|
130
|
+
type: 'handover',
|
|
131
|
+
platform,
|
|
132
|
+
files: allFiles,
|
|
133
|
+
topicFile: lastReceipt.topic_decision || '',
|
|
134
|
+
projectRoot,
|
|
135
|
+
}));
|
|
136
|
+
const prompt = scan.llmAnalysisPrompt({
|
|
137
|
+
platform,
|
|
138
|
+
date: lastReceipt.date || '',
|
|
139
|
+
files: allFiles,
|
|
140
|
+
topicFile: lastReceipt.topic_decision || '',
|
|
141
|
+
projectRoot,
|
|
142
|
+
});
|
|
143
|
+
llmFollowup(invocation, prompt);
|
|
136
144
|
}
|
|
137
145
|
|
|
138
146
|
return { kind: 'success', text: '' };
|