From db4735e54e8f26a3dd8cc7bc1a2baa42e8dca963 Mon Sep 17 00:00:00 2001 From: ywkj Date: Sat, 25 Apr 2026 16:30:01 +0800 Subject: [PATCH] feat: add detect-video command using direct video upload + API analysis - New detect-video / detect-video-and-search commands: upload video to get public URL, analyze via LiteLLM (video_url), generate keyword, search 1688 - New src/video-analyzer.ts: upload via direct HTTP (bypasses auth-rt CLI arg length limit), analyze via Chat Completions with video_url content - Frame-based pipeline robustness: quality pre-filtering (skip black/blurry frames), bounding box normalization/validation, crop failure tolerance, Vision ranking fallback to sharpness-based selection - Improve ranking prompt: force pick one frame, Chinese description - Update docs to recommend detect-video-and-search as primary command Co-Authored-By: Claude Opus 4.7 --- SKILL.md | 28 +++++- scripts/run.ts | 6 ++ src/index.ts | 68 +++++++++++++- src/product-detector.ts | 204 ++++++++++++++++++++++++++++++++-------- src/types.ts | 17 +++- src/video-analyzer.ts | 97 +++++++++++++++++++ 6 files changed, 371 insertions(+), 49 deletions(-) create mode 100644 src/video-analyzer.ts diff --git a/SKILL.md b/SKILL.md index 50dc0f9..7b42e09 100644 --- a/SKILL.md +++ b/SKILL.md @@ -17,12 +17,30 @@ bun dist/run.js [args] [--dry-run] | 命令 | 使用场景 | |------|---------| -| `detect-best-and-search