-
Notifications
You must be signed in to change notification settings - Fork 5
ci: auto lint/format fix in CI + test with bad formatting #172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
47eea8c
7a98c87
ad4840d
b706f85
85a49d1
4e4273a
28532aa
5fbc754
faa2113
d2e72e0
07ce63e
c68d1eb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| --- | ||
| name: video-read | ||
| description: Analyze video files (screen recordings, demos, walkthroughs) using AI vision models. Use when you need to understand, describe, or extract information from video content. Supports local files and Slack-hosted videos. | ||
| allowed-tools: Bash | ||
| model: haiku | ||
| --- | ||
|
|
||
| # Video Read | ||
|
|
||
| Analyze video files using Gemini 2.5 Flash (native video understanding) or GPT-4o (frame extraction fallback). | ||
|
|
||
| ## Usage | ||
|
|
||
| **Local video file:** | ||
|
|
||
| ```bash | ||
| bun ../bot/cli.ts video read -f <video_path> [-m gemini|gpt4o] [-p "custom prompt"] | ||
| ``` | ||
|
|
||
| **Slack file by ID:** | ||
|
|
||
| ```bash | ||
| bun ../bot/cli.ts video read --slack-file <FILE_ID> [-m gemini|gpt4o] [-p "custom prompt"] | ||
| ``` | ||
|
|
||
| **Slack file by URL:** | ||
|
|
||
| ```bash | ||
| bun ../bot/cli.ts video read --slack-url "<SLACK_FILE_URL>" [-m gemini|gpt4o] [-p "custom prompt"] | ||
| ``` | ||
|
|
||
| ## Parameters | ||
|
|
||
| - `-f, --file`: Local video file path (.mp4, .webm, .mov, .avi, .mkv) | ||
| - `--slack-file`: Slack file ID (auto-downloads then analyzes) | ||
| - `--slack-url`: Slack file URL (auto-downloads then analyzes) | ||
| - `-m, --model`: AI model to use (default: `gemini`) | ||
| - `gemini` — Gemini 2.5 Flash with native video understanding (recommended) | ||
| - `gpt4o` — GPT-4o with frame extraction via ffmpeg | ||
| - `-p, --prompt`: Custom analysis prompt (optional) | ||
|
|
||
| **Note**: Exactly one of `--file`, `--slack-file`, or `--slack-url` must be provided. | ||
|
|
||
| ## Examples | ||
|
|
||
| ```bash | ||
| # Analyze a screen recording with Gemini (default) | ||
| bun ../bot/cli.ts video read -f ./recording.mp4 | ||
|
|
||
| # Use GPT-4o fallback | ||
| bun ../bot/cli.ts video read -f ./demo.mp4 -m gpt4o | ||
|
|
||
| # Analyze a Slack-shared video by file ID | ||
| bun ../bot/cli.ts video read --slack-file F0AMXCK3JQ1 | ||
|
|
||
| # Custom prompt for bug analysis | ||
| bun ../bot/cli.ts video read -f ./bug.mp4 -p "What bug is shown? Steps to reproduce?" | ||
| ``` | ||
|
|
||
| ## Output | ||
|
|
||
| Detailed text description of the video content, followed by model and usage metadata. | ||
|
|
||
| ## Notes | ||
|
|
||
| - Gemini sends full video as base64 — best temporal understanding | ||
| - GPT-4o extracts frames at 1fps via ffmpeg, samples every other — requires ffmpeg | ||
| - Supported: .mp4, .webm, .mov, .avi, .mkv, .m4v | ||
| - Env vars: `GEMINI_API_KEY` for Gemini, `OPENAI_API_KEY` for GPT-4o |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| --- | ||
| name: video-read | ||
| description: Analyze video files (screen recordings, demos, walkthroughs) using AI vision models. Use when the user wants to understand, describe, or extract information from video content. Supports local files and Slack-hosted videos. | ||
| allowed-tools: Bash | ||
| model: haiku | ||
| --- | ||
|
|
||
| # Video Read | ||
|
|
||
| Analyze video files using Gemini 2.5 Flash (native video understanding) or GPT-4o (frame extraction fallback). | ||
|
|
||
| ## Usage | ||
|
|
||
| **Local video file:** | ||
|
|
||
| ```bash | ||
| prbot video read -f <video_path> [-m gemini|gpt4o] [-p "custom prompt"] | ||
| ``` | ||
|
|
||
| **Slack file by ID:** | ||
|
|
||
| ```bash | ||
| prbot video read --slack-file <FILE_ID> [-m gemini|gpt4o] [-p "custom prompt"] | ||
| ``` | ||
|
|
||
| **Slack file by URL:** | ||
|
|
||
| ```bash | ||
| prbot video read --slack-url "<SLACK_FILE_URL>" [-m gemini|gpt4o] [-p "custom prompt"] | ||
| ``` | ||
|
|
||
| ## Parameters | ||
|
|
||
| - `-f, --file`: Local video file path (.mp4, .webm, .mov, .avi, .mkv) | ||
| - `--slack-file`: Slack file ID (auto-downloads then analyzes) | ||
| - `--slack-url`: Slack file URL (auto-downloads then analyzes) | ||
| - `-m, --model`: AI model to use (default: `gemini`) | ||
| - `gemini` — Gemini 2.5 Flash with native video understanding (recommended) | ||
| - `gpt4o` — GPT-4o with frame extraction via ffmpeg | ||
| - `-p, --prompt`: Custom analysis prompt (optional, default focuses on step-by-step actions, UI state, errors) | ||
|
|
||
| **Note**: Exactly one of `--file`, `--slack-file`, or `--slack-url` must be provided. | ||
|
|
||
| ## Examples | ||
|
|
||
| ```bash | ||
| # Analyze a screen recording with Gemini (default, best quality) | ||
| prbot video read -f ./recording.mp4 | ||
|
|
||
| # Use GPT-4o fallback | ||
| prbot video read -f ./demo.mp4 -m gpt4o | ||
|
|
||
| # Analyze a video shared in Slack | ||
| prbot video read --slack-file F0AMXCK3JQ1 | ||
|
|
||
| # Custom analysis prompt | ||
| prbot video read -f ./bug-repro.mp4 -p "What bug is being demonstrated? What are the exact steps to reproduce it?" | ||
| ``` | ||
|
|
||
| ## Output | ||
|
|
||
| Outputs a detailed text description of the video content, followed by model and usage metadata. | ||
|
|
||
| ## Notes | ||
|
|
||
| - Gemini path sends the full video as base64 inline data — best for understanding temporal changes | ||
| - GPT-4o path extracts frames at 1fps with ffmpeg, samples every other frame — requires ffmpeg installed | ||
| - Supported formats: .mp4, .webm, .mov, .avi, .mkv, .m4v | ||
| - Requires `GEMINI_API_KEY` env var for Gemini, `OPENAI_API_KEY` for GPT-4o |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,11 +5,15 @@ on: | |
| branches: | ||
| - main | ||
| jobs: | ||
| run_comfy_pr: | ||
| comfy_pr_test: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| timeout-minutes: 10 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
||
| with: | ||
| ref: ${{ github.head_ref }} | ||
| # setup comfy-cli | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
|
|
@@ -30,6 +34,18 @@ jobs: | |
| # setup comfy-pr | ||
| # Run Comfy-PR Tests | ||
| - run: bun i | ||
| - run: bunx oxlint --fix | ||
| - run: bunx oxfmt --write | ||
| - name: Commit lint/format fixes | ||
| if: github.event.pull_request.head.repo.full_name == github.repository | ||
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
| if ! git diff --quiet; then | ||
| git add -A | ||
snomiao marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| HUSKY=0 git commit -m "style: auto-fix lint and formatting [skip ci]" | ||
| git push | ||
snomiao marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| fi | ||
| - run: bun test | ||
| timeout-minutes: 8 | ||
| env: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,3 +79,4 @@ tmp/ | |
| TODO.md | ||
| REPORT.md | ||
| .data | ||
| .logs | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| #!/usr/bin/env bun | ||
| bunx tsgo | ||
| bunx oxlint --fix | ||
| bunx oxfmt | ||
| bun typecheck | ||
| bun lint | ||
| bunx lint-staged | ||
|
|
Uh oh!
There was an error while loading. Please reload this page.