autocrew 0.3.9 → 0.3.10
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/src/tools/review.ts +5 -1
package/package.json
CHANGED
package/src/tools/review.ts
CHANGED
|
@@ -212,10 +212,14 @@ export async function executeReview(params: Record<string, unknown>) {
|
|
|
212
212
|
const scanResult = await scanText(fullText, platform, dataDir);
|
|
213
213
|
let fixedText = scanResult.autoFixedText || fullText;
|
|
214
214
|
|
|
215
|
-
// 2. Humanizer pass
|
|
215
|
+
// 2. Humanizer pass (substitution + deletion only, never insertion)
|
|
216
216
|
const humanResult = humanizeZh({ text: fixedText });
|
|
217
217
|
fixedText = humanResult.humanizedText;
|
|
218
218
|
|
|
219
|
+
// 3. Safety guard — strip any hardcoded phrases that old humanizer versions
|
|
220
|
+
// may have inserted. This is a belt-and-suspenders defense.
|
|
221
|
+
fixedText = fixedText.replace(/\n*说白了,这件事拼的不是工具数量,而是表达和执行。\n*/g, "\n\n");
|
|
222
|
+
|
|
219
223
|
// Save back if content_id provided
|
|
220
224
|
if (contentId) {
|
|
221
225
|
await updateContent(contentId, { body: fixedText }, dataDir);
|