feat(baoyu-post-to-x): add post-composition verification and improve stability

Add automatic check after article images are inserted: verifies remaining
XIMGPH placeholders and expected vs actual image count. Increase CDP timeout
to 60s and add 3s DOM stabilization delay between image insertions.
This commit is contained in:
Jim Liu 宝玉
2026-03-05 00:55:56 -06:00
parent 4c9e57777b
commit 42931d6294
3 changed files with 52 additions and 4 deletions
+6
View File
@@ -172,6 +172,12 @@ npx -y bun ${SKILL_DIR}/scripts/x-article.ts article.md --cover ./cover.jpg
**Note**: Script opens browser with article filled in. User reviews and publishes manually.
**Post-Composition Check**: The script automatically verifies after all images are inserted:
- Remaining `XIMGPH_` placeholders in editor content
- Expected vs actual image count
If the check fails (warnings in output), alert the user with the specific issues before they publish.
---
## Troubleshooting