feat: add audio input and audio output widgets (#47) #106
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Claude PR Assistant | |
| on: | |
| workflow_run: | |
| workflows: ['Pull Request Checks'] | |
| types: [completed] | |
| issue_comment: | |
| types: [created] | |
| pull_request_review_comment: | |
| types: [created] | |
| pull_request_review: | |
| types: [submitted, edited] | |
| permissions: | |
| contents: read | |
| jobs: | |
| resolve-pr: | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| if: >- | |
| github.repository_owner == 'viamrobotics' && | |
| github.event_name == 'workflow_run' && | |
| github.event.workflow_run.conclusion == 'success' && | |
| startsWith(github.event.workflow_run.head_branch, 'claude/') | |
| runs-on: ubuntu-latest | |
| outputs: | |
| pr_found: ${{ steps.pr.outputs.found }} | |
| pr_number: ${{ steps.pr.outputs.number }} | |
| pr_title: ${{ steps.pr.outputs.title }} | |
| branch: ${{ steps.pr.outputs.branch }} | |
| steps: | |
| - name: Find PR for branch | |
| id: pr | |
| # actions/github-script@v8.0.0 | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd | |
| with: | |
| script: | | |
| const branch = context.payload.workflow_run.head_branch; | |
| const { data: pulls } = await github.rest.pulls.list({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| head: `${context.repo.owner}:${branch}`, | |
| state: 'open' | |
| }); | |
| if (pulls.length === 0) { | |
| core.info('No open PR found for branch ' + branch); | |
| core.setOutput('found', 'false'); | |
| return; | |
| } | |
| const pr = pulls[0]; | |
| core.setOutput('found', 'true'); | |
| core.setOutput('number', String(pr.number)); | |
| core.setOutput('title', pr.title); | |
| core.setOutput('branch', branch); | |
| auto-review: | |
| needs: resolve-pr | |
| if: needs.resolve-pr.outputs.pr_found == 'true' | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| actions: read | |
| issues: write | |
| id-token: write | |
| # viamrobotics/claude-ci-workflows@v1.17.3 | |
| uses: viamrobotics/claude-ci-workflows/.github/workflows/claude-auto-review.yml@3ad96b0ccbb5ee0d7e2cde98653fae0c453e68bb | |
| with: | |
| pr_number: ${{ needs.resolve-pr.outputs.pr_number }} | |
| pr_title: ${{ needs.resolve-pr.outputs.pr_title }} | |
| branch: ${{ needs.resolve-pr.outputs.branch }} | |
| install_command: | | |
| NODE22_BIN=$(ls -d /opt/hostedtoolcache/node/22.*/x64/bin | tail -1) | |
| echo "$NODE22_BIN" >> "$GITHUB_PATH" | |
| export PATH="$NODE22_BIN:$PATH" | |
| corepack enable | |
| pnpm install | |
| max_turns: 50 | |
| allowed_tools: 'Edit,Read,Write,Glob,Grep,WebFetch,mcp__github_inline_comment__create_inline_comment,Bash(pnpm *),Bash(npx *),Bash(node *),Bash(ls *),Bash(find *),Bash(git config *),Bash(git add *),Bash(git commit *),Bash(git push *),Bash(git status*),Bash(git diff*),Bash(git log*),Bash(git checkout *),Bash(git branch *),Bash(git rev-parse *),Bash(git fetch *),Bash(gh pr review*),Bash(gh pr comment*),Bash(gh pr diff*),Bash(gh pr view*),Bash(gh api *)' | |
| extra_review_instructions: | | |
| - Do NOT manually edit `dist/**` (generated) or `pnpm-lock.yaml` (regenerated by pnpm). | |
| - If you fix issues, only run verification commands relevant to the files you changed: | |
| - Svelte / TS / JS files (.svelte, .ts, .js): `pnpm lint`, `pnpm check`, and `pnpm test` | |
| - Do NOT run unrelated commands, they waste turns and time. | |
| - This repo uses Svelte 5 runes and SvelteKit. Consult the Svelte MCP server when reviewing `.svelte` / `.svelte.ts` / `.svelte.js` files. | |
| - NEVER use curl, python3, or WebFetch to submit GitHub reviews. Use ONLY `gh pr review` and `gh pr comment`. | |
| - `WebFetch` and `Bash(gh api *)` are allowed for looking up Viam API context (docs.viam.com, viamrobotics/api, viamrobotics/viam-typescript-sdk, viamrobotics/viam-svelte-sdk, viamrobotics/rdk). See `.claude/rules/viam-context.md`. | |
| secrets: | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| GIT_ACCESS_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }} | |
| SLACK_AI_WORKFLOW_ALERT_WEBHOOK_URL: ${{ secrets.SLACK_AI_WORKFLOW_ALERT_WEBHOOK_URL }} | |
| on-demand: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| actions: read | |
| issues: write | |
| id-token: write | |
| if: >- | |
| github.repository_owner == 'viamrobotics' && | |
| ( | |
| (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || | |
| (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || | |
| (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || | |
| (github.event_name == 'pull_request_review' && github.event.review.state != 'approved' && github.event.review.user.type != 'Bot' && startsWith(github.event.pull_request.head.ref, 'claude/')) | |
| ) | |
| # viamrobotics/claude-ci-workflows@v1.17.3 | |
| uses: viamrobotics/claude-ci-workflows/.github/workflows/claude-pr-assistant.yml@3ad96b0ccbb5ee0d7e2cde98653fae0c453e68bb | |
| with: | |
| install_command: | | |
| NODE22_BIN=$(ls -d /opt/hostedtoolcache/node/22.*/x64/bin | tail -1) | |
| echo "$NODE22_BIN" >> "$GITHUB_PATH" | |
| export PATH="$NODE22_BIN:$PATH" | |
| corepack enable | |
| pnpm install | |
| max_turns: 50 | |
| allowed_tools: 'Edit,Read,Write,Glob,Grep,WebFetch,mcp__github_inline_comment__create_inline_comment,Bash(pnpm *),Bash(npx *),Bash(node *),Bash(ls *),Bash(find *),Bash(git config *),Bash(git add *),Bash(git commit *),Bash(git push *),Bash(git status*),Bash(git diff*),Bash(git log*),Bash(git checkout *),Bash(git branch *),Bash(git rev-parse *),Bash(git fetch *),Bash(gh pr review*),Bash(gh pr comment*),Bash(gh pr view*),Bash(gh pr diff*),Bash(gh api *)' | |
| extra_review_instructions: | | |
| - Do NOT manually edit `dist/**` (generated) or `pnpm-lock.yaml` (regenerated by pnpm). | |
| - Only run verification commands relevant to the files you changed: | |
| - Svelte / TS / JS files (.svelte, .ts, .js): `pnpm lint`, `pnpm check`, and `pnpm test` | |
| - Do NOT run unrelated commands, they waste turns and time. | |
| - If a lint or test command fails more than twice on the same issue, commit what you have, push, and note the unresolved issue in a PR comment. | |
| - Before editing code, read 1-2 similar functions or components in the same file or package to follow existing patterns and conventions. | |
| - This repo uses Svelte 5 runes and SvelteKit. Consult the Svelte MCP server when editing or reviewing `.svelte` / `.svelte.ts` / `.svelte.js` files. | |
| - NEVER use curl, python3, or WebFetch to submit GitHub reviews. Use ONLY `gh pr review` and `gh pr comment`. | |
| - `WebFetch` and `Bash(gh api *)` are allowed for looking up Viam API context (docs.viam.com, viamrobotics/api, viamrobotics/viam-typescript-sdk, viamrobotics/viam-svelte-sdk, viamrobotics/rdk). See `.claude/rules/viam-context.md`. | |
| extra_system_prompt: >- | |
| This is a Svelte 5 + SvelteKit TypeScript library (`@viamrobotics/test-widgets`). | |
| It is verifiable with `pnpm lint`, `pnpm check`, `pnpm test`, and `pnpm build`. | |
| Do NOT modify `dist/**` (generated), `.changeset/**` (versioning), or `pnpm-lock.yaml` (regenerated by pnpm). | |
| Package manager: pnpm. Node: 22.22.1. | |
| secrets: | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| GIT_ACCESS_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }} |