Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 3 additions & 15 deletions .github/workflows/genai-commander.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ name: genai commander
on:
issue_comment:
types: [created]
env:
GENAISCRIPT_DEFAULT_REASONING_MODEL: ${{ vars.GENAISCRIPT_DEFAULT_REASONING_MODEL }}
GENAISCRIPT_DEFAULT_REASONING_SMALL_MODEL: ${{ vars.GENAISCRIPT_DEFAULT_REASONING_SMALL_MODEL }}
GENAISCRIPT_DEFAULT_MODEL: ${{ vars.GENAISCRIPT_DEFAULT_MODEL }}
GENAISCRIPT_DEFAULT_SMALL_MODEL: ${{ vars.GENAISCRIPT_DEFAULT_SMALL_MODEL }}
GENAISCRIPT_DEFAULT_VISION_MODEL: ${{ vars.GENAISCRIPT_DEFAULT_VISION_MODEL }}
jobs:
pr_commented:
# must be PR and have a comment starting with /genai
Expand All @@ -16,6 +10,7 @@ jobs:
permissions:
contents: read
pull-requests: write
models: read
steps:
# only allow PRs from the same repository
- name: Check if PR is from the same repository
Expand Down Expand Up @@ -79,23 +74,16 @@ jobs:
run: yarn install --frozen-lockfile
- name: compile
run: yarn compile
#
# Start Ollama in a docker container
#
- name: start ollama
run: yarn ollama:start
# Execute the /genai <command> found in the comment
#
- name: genaiscript pr-describe
if: startsWith(github.event.comment.body, '/genai describe')
run: node packages/cli/built/genaiscript.cjs run pr-describe -prd --out-trace $GITHUB_STEP_SUMMARY --vars defaultBranch=dev
run: node packages/cli/built/genaiscript.cjs run pr-describe -p github -prd --out-trace $GITHUB_STEP_SUMMARY --vars defaultBranch=dev
env:
GITHUB_ISSUE: ${{ github.event.issue.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_COMMIT_SHA: ${{ fromJSON(steps.sha.outputs.result).sha }}
- name: genaiscript pr-review
if: startsWith(github.event.comment.body, '/genai review')
run: node packages/cli/built/genaiscript.cjs run pr-review -prc --out-trace $GITHUB_STEP_SUMMARY --vars defaultBranch=dev
run: node packages/cli/built/genaiscript.cjs run pr-review -p github -prc --out-trace $GITHUB_STEP_SUMMARY --vars defaultBranch=dev
env:
GITHUB_ISSUE: ${{ github.event.issue.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/genai-investigator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ permissions:
contents: read
actions: read
pull-requests: write
models: read
env:
GENAISCRIPT_DEFAULT_REASONING_MODEL: ${{ vars.GENAISCRIPT_DEFAULT_REASONING_MODEL }}
GENAISCRIPT_DEFAULT_REASONING_SMALL_MODEL: ${{ vars.GENAISCRIPT_DEFAULT_REASONING_SMALL_MODEL }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/genai-issue-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
permissions:
contents: read
issues: write
models: read
steps:
- uses: actions/checkout@v4
with:
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/genai-issue-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,13 @@ on:
concurrency:
group: issues-${{ github.event.issue.number }}
cancel-in-progress: true
env:
GENAISCRIPT_DEFAULT_REASONING_MODEL: ${{ vars.GENAISCRIPT_DEFAULT_REASONING_MODEL }}
GENAISCRIPT_DEFAULT_REASONING_SMALL_MODEL: ${{ vars.GENAISCRIPT_DEFAULT_REASONING_SMALL_MODEL }}
GENAISCRIPT_DEFAULT_MODEL: ${{ vars.GENAISCRIPT_DEFAULT_MODEL }}
GENAISCRIPT_DEFAULT_SMALL_MODEL: ${{ vars.GENAISCRIPT_DEFAULT_SMALL_MODEL }}
GENAISCRIPT_DEFAULT_VISION_MODEL: ${{ vars.GENAISCRIPT_DEFAULT_VISION_MODEL }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
models: read
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -29,10 +24,8 @@ jobs:
- run: yarn install --frozen-lockfile
- name: compile
run: yarn compile
- name: start ollama
run: yarn ollama:start
- name: genaiscript issue-review
run: node packages/cli/built/genaiscript.cjs run issue-reviewer -prc --out-trace $GITHUB_STEP_SUMMARY
run: node packages/cli/built/genaiscript.cjs run issue-reviewer -p github -prc --out-trace $GITHUB_STEP_SUMMARY
env:
GITHUB_ISSUE: ${{ github.event.issue.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/genai-pr-commit-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
pull-requests: write
models: read
steps:
- uses: actions/checkout@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/genai-pr-docs-commit-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
pull-requests: write
models: read
steps:
- uses: actions/checkout@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/genai-pr-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
pull-requests: write
models: read
steps:
- uses: actions/checkout@v4
with:
Expand Down
3 changes: 2 additions & 1 deletion docs/genaisrc/blog-narration.genai.mts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ console.log(`audio file: ${filename}`)

console.log(`target file: ${target}`)
await workspace.copyFile(filename, target)
await workspace.writeText(path.changeext(target, ".txt"), summary)
// convert to video
await host.exec(
`ffmpeg -loop 1 -i docs/src/assets/logo.svg -i "${target}" -c:v libx264 -c:a copy -shortest "${path.changeext(target, ".mp4")}"`
`ffmpeg -loop 1 -i ${path.changeext(file.filename, ".png")} -i "${target}" -c:v libx264 -c:a copy -shortest "${path.changeext(target, ".mp4")}"`
)
6 changes: 4 additions & 2 deletions docs/src/components/AudioPlayer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ const title = aiDisclaimer
---

<div>
<audio title={title} controls loop="false" preload="metadata">
<audio title={title} controls loop={false} preload="metadata">
<source src={src} type={mime} />
Your browser does not support the audio element.
</audio>
<div style={ { fontSize: '90%', marginTop: 0, fontFamily: 'monospace' }}>{aiDisclaimer ? `Generated by 🤖 AI` : null}</div>
<div style={{ fontSize: "90%", marginTop: 0, fontFamily: "monospace" }}>
{aiDisclaimer ? `Generated by 🤖 AI` : null}
</div>
</div>