@cloud411716/fancy-webnovel 4.30.3 → 4.30.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
CHANGED
|
@@ -555,12 +555,14 @@ async function detectCapabilities(ctx, invocation, session, taskList, root, runD
|
|
|
555
555
|
return { ok: false, error: 'LLM 没有返回可解析的能力自检结果' };
|
|
556
556
|
}
|
|
557
557
|
|
|
558
|
-
async function finalizeMaterialFile({ root, target, materialTools }) {
|
|
558
|
+
export async function finalizeMaterialFile({ root, target, materialTools }) {
|
|
559
559
|
const skip = readSkipMarker(target);
|
|
560
560
|
if (skip) {
|
|
561
561
|
return {
|
|
562
562
|
ok: true,
|
|
563
|
-
skipped
|
|
563
|
+
// 注意:skip 是“显式无关标记”,skipped 是“导入时重复跳过的条数”。
|
|
564
|
+
// 两者不能共用字段,否则 skipped 数字会被误判成无关作品。
|
|
565
|
+
skip: true,
|
|
564
566
|
reason: skip.reason,
|
|
565
567
|
inserted: 0,
|
|
566
568
|
skipped: 0,
|
|
@@ -830,6 +832,14 @@ function fileHasContent(file) {
|
|
|
830
832
|
}
|
|
831
833
|
}
|
|
832
834
|
|
|
835
|
+
/**
|
|
836
|
+
* 只有显式的 `{skip:true}` 标记才算无关作品。
|
|
837
|
+
* `skipped` 是导入时重复跳过的条数,0 也是合法值,不能拿它判断作品是否无关。
|
|
838
|
+
*/
|
|
839
|
+
export function isExplicitSkip(analyzed) {
|
|
840
|
+
return Boolean(analyzed && analyzed.skip === true);
|
|
841
|
+
}
|
|
842
|
+
|
|
833
843
|
export async function runSubagentAnalysisJob({
|
|
834
844
|
subagents, provider, invocation, job, root, materialTools, signal,
|
|
835
845
|
timeoutMs = ANALYSIS_TIMEOUT_MS,
|
|
@@ -1256,7 +1266,7 @@ async function runCrawl(ctx, invocation, session, taskList) {
|
|
|
1256
1266
|
refreshProgress();
|
|
1257
1267
|
return;
|
|
1258
1268
|
}
|
|
1259
|
-
if (analyzed
|
|
1269
|
+
if (isExplicitSkip(analyzed)) {
|
|
1260
1270
|
skippedIrrelevant += 1;
|
|
1261
1271
|
if (job.jobKey) {
|
|
1262
1272
|
await updateJob(jobStore.db, job.jobKey, {
|
|
@@ -1270,7 +1280,7 @@ async function runCrawl(ctx, invocation, session, taskList) {
|
|
|
1270
1280
|
}
|
|
1271
1281
|
} else {
|
|
1272
1282
|
inserted += analyzed.inserted || 0;
|
|
1273
|
-
skippedMaterials += analyzed.skipped || 0;
|
|
1283
|
+
skippedMaterials += Number(analyzed.skipped) || 0;
|
|
1274
1284
|
if (wasPartial) salvaged += 1;
|
|
1275
1285
|
if (job.accountUrl) styleAccounts.set(job.accountUrl, (styleAccounts.get(job.accountUrl) || 0) + Math.max(1, analyzed.inserted || 0));
|
|
1276
1286
|
if (job.jobKey) {
|
|
@@ -260,7 +260,7 @@ export function summaryText({
|
|
|
260
260
|
subagentWorkers = 0,
|
|
261
261
|
stylesUpdated = [],
|
|
262
262
|
}) {
|
|
263
|
-
const hasIssues = failures.length > 0 || retryableFailures.length > 0;
|
|
263
|
+
const hasIssues = failures.length > 0 || retryableFailures.length > 0 || salvaged > 0;
|
|
264
264
|
const lines = [
|
|
265
265
|
aborted
|
|
266
266
|
? '⚠️ 抖音采集已中断'
|