From fde171d77786f9f56042ad65192628d8ff159782 Mon Sep 17 00:00:00 2001 From: Shangjie Chen Date: Wed, 13 May 2026 11:37:20 -0700 Subject: [PATCH 1/2] Clean up Gemini workflows and update dispatch --- .github/workflows/gemini-dispatch.yml | 44 +--- .github/workflows/gemini-plan-execute.yml | 130 ----------- .github/workflows/gemini-scheduled-triage.yml | 220 ------------------ .github/workflows/gemini-triage.yml | 160 ------------- 4 files changed, 3 insertions(+), 551 deletions(-) delete mode 100644 .github/workflows/gemini-plan-execute.yml delete mode 100644 .github/workflows/gemini-scheduled-triage.yml delete mode 100644 .github/workflows/gemini-triage.yml diff --git a/.github/workflows/gemini-dispatch.yml b/.github/workflows/gemini-dispatch.yml index 91b877b1..e9a5ee6f 100644 --- a/.github/workflows/gemini-dispatch.yml +++ b/.github/workflows/gemini-dispatch.yml @@ -11,10 +11,7 @@ on: types: - 'opened' - 'ready_for_review' - issues: - types: - - 'opened' - - 'reopened' + issue_comment: types: - 'created' @@ -52,9 +49,6 @@ jobs: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false && github.event.pull_request.draft == false - ) || ( - github.event_name == 'issues' && - contains(fromJSON('["opened", "reopened"]'), github.event.action) ) || ( github.event.sender.type == 'User' && startsWith(github.event.comment.body || github.event.review.body || github.event.issue.body, '@gemini-cli') && @@ -97,16 +91,10 @@ jobs: if (eventType === 'pull_request.opened') { core.setOutput('command', 'review'); - } else if (['issues.opened', 'issues.reopened'].includes(eventType)) { - core.setOutput('command', 'triage'); } else if (request.startsWith("@gemini-cli /review")) { core.setOutput('command', 'review'); const additionalContext = request.replace(/^@gemini-cli \/review/, '').trim(); core.setOutput('additional_context', additionalContext); - } else if (request.startsWith("@gemini-cli /triage")) { - core.setOutput('command', 'triage'); - } else if (request.startsWith("@gemini-cli /approve")) { - core.setOutput('command', 'approve'); } else if (request.startsWith("@gemini-cli")) { const additionalContext = request.replace(/^@gemini-cli/, '').trim(); core.setOutput('command', 'invoke'); @@ -141,19 +129,7 @@ jobs: additional_context: '${{ needs.dispatch.outputs.additional_context }}' secrets: 'inherit' - triage: - needs: 'dispatch' - if: |- - ${{ needs.dispatch.outputs.command == 'triage' }} - uses: './.github/workflows/gemini-triage.yml' - permissions: - contents: 'read' - id-token: 'write' - issues: 'write' - pull-requests: 'write' - with: - additional_context: '${{ needs.dispatch.outputs.additional_context }}' - secrets: 'inherit' + invoke: needs: 'dispatch' @@ -169,27 +145,13 @@ jobs: additional_context: '${{ needs.dispatch.outputs.additional_context }}' secrets: 'inherit' - plan-execute: - needs: 'dispatch' - if: |- - ${{ needs.dispatch.outputs.command == 'approve' }} - uses: './.github/workflows/gemini-plan-execute.yml' - permissions: - contents: 'write' - id-token: 'write' - issues: 'write' - pull-requests: 'write' - with: - additional_context: '${{ needs.dispatch.outputs.additional_context }}' - secrets: 'inherit' + fallthrough: needs: - 'dispatch' - 'review' - - 'triage' - 'invoke' - - 'plan-execute' if: |- ${{ always() && !cancelled() && (failure() || needs.dispatch.outputs.command == 'fallthrough') }} runs-on: 'ubuntu-latest' diff --git a/.github/workflows/gemini-plan-execute.yml b/.github/workflows/gemini-plan-execute.yml deleted file mode 100644 index b8796c21..00000000 --- a/.github/workflows/gemini-plan-execute.yml +++ /dev/null @@ -1,130 +0,0 @@ -name: '🧙 Gemini Plan Execution' - -on: - workflow_call: - inputs: - additional_context: - type: 'string' - description: 'Any additional context from the request' - required: false - -concurrency: - group: '${{ github.workflow }}-plan-execute-${{ github.event_name }}-${{ github.event.pull_request.number || github.event.issue.number }}' - cancel-in-progress: true - -defaults: - run: - shell: 'bash' - -jobs: - plan-execute: - timeout-minutes: 30 - runs-on: 'ubuntu-latest' - permissions: - contents: 'write' - id-token: 'write' - issues: 'write' - pull-requests: 'write' - - steps: - - name: 'Mint identity token' - id: 'mint_identity_token' - if: |- - ${{ vars.APP_ID }} - uses: 'actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf' # ratchet:actions/create-github-app-token@v2 - with: - app-id: '${{ vars.APP_ID }}' - private-key: '${{ secrets.APP_PRIVATE_KEY }}' - permission-contents: 'write' - permission-issues: 'write' - permission-pull-requests: 'write' - - - name: 'Checkout Code' - uses: 'actions/checkout@v4' # ratchet:exclude - - - name: 'Run Gemini CLI' - id: 'run_gemini' - uses: 'google-github-actions/run-gemini-cli@v0' # ratchet:exclude - env: - TITLE: '${{ github.event.pull_request.title || github.event.issue.title }}' - DESCRIPTION: '${{ github.event.pull_request.body || github.event.issue.body }}' - EVENT_NAME: '${{ github.event_name }}' - GITHUB_TOKEN: '${{ steps.mint_identity_token.outputs.token || secrets.GITHUB_TOKEN || github.token }}' - IS_PULL_REQUEST: '${{ !!github.event.pull_request }}' - ISSUE_NUMBER: '${{ github.event.pull_request.number || github.event.issue.number }}' - REPOSITORY: '${{ github.repository }}' - ADDITIONAL_CONTEXT: '${{ inputs.additional_context }}' - with: - gcp_location: '${{ vars.GOOGLE_CLOUD_LOCATION }}' - gcp_project_id: '${{ vars.GOOGLE_CLOUD_PROJECT }}' - gcp_service_account: '${{ vars.SERVICE_ACCOUNT_EMAIL }}' - gcp_workload_identity_provider: '${{ vars.GCP_WIF_PROVIDER }}' - gemini_api_key: '${{ secrets.GEMINI_API_KEY }}' - gemini_cli_version: '${{ vars.GEMINI_CLI_VERSION }}' - gemini_debug: '${{ fromJSON(vars.GEMINI_DEBUG || vars.ACTIONS_STEP_DEBUG || false) }}' - gemini_model: '${{ vars.GEMINI_MODEL }}' - google_api_key: '${{ secrets.GOOGLE_API_KEY }}' - use_gemini_code_assist: '${{ vars.GOOGLE_GENAI_USE_GCA }}' - use_vertex_ai: '${{ vars.GOOGLE_GENAI_USE_VERTEXAI }}' - upload_artifacts: '${{ vars.UPLOAD_ARTIFACTS }}' - workflow_name: 'gemini-plan-execute' - # Assistant workflows can be triggered by comments on either Issues or PRs. - # We explicitly map both fields so the CLI can correctly categorize the interaction. - github_pr_number: '${{ github.event.pull_request.number }}' - github_issue_number: '${{ github.event.issue.number }}' - settings: |- - { - "model": { - "maxSessionTurns": 25 - }, - "telemetry": { - "enabled": true, - "target": "local", - "outfile": ".gemini/telemetry.log" - }, - "mcpServers": { - "github": { - "command": "docker", - "args": [ - "run", - "-i", - "--rm", - "-e", - "GITHUB_PERSONAL_ACCESS_TOKEN", - "ghcr.io/github/github-mcp-server:v0.27.0" - ], - "includeTools": [ - "add_issue_comment", - "issue_read", - "list_issues", - "search_issues", - "create_pull_request", - "pull_request_read", - "list_pull_requests", - "search_pull_requests", - "create_branch", - "create_or_update_file", - "delete_file", - "fork_repository", - "get_commit", - "get_file_contents", - "list_commits", - "push_files", - "search_code" - ], - "env": { - "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}" - } - } - }, - "tools": { - "core": [ - "run_shell_command(cat)", - "run_shell_command(echo)", - "run_shell_command(grep)", - "run_shell_command(head)", - "run_shell_command(tail)" - ] - } - } - prompt: '/gemini-plan-execute' diff --git a/.github/workflows/gemini-scheduled-triage.yml b/.github/workflows/gemini-scheduled-triage.yml deleted file mode 100644 index 5546ea64..00000000 --- a/.github/workflows/gemini-scheduled-triage.yml +++ /dev/null @@ -1,220 +0,0 @@ -name: '📋 Gemini Scheduled Issue Triage' - -on: - schedule: - - cron: '0 0 * * *' # Runs once a day - pull_request: - branches: - - 'main' - - 'release/**/*' - paths: - - '.github/workflows/gemini-scheduled-triage.yml' - push: - branches: - - 'main' - - 'release/**/*' - paths: - - '.github/workflows/gemini-scheduled-triage.yml' - workflow_dispatch: - -concurrency: - group: '${{ github.workflow }}' - cancel-in-progress: true - -defaults: - run: - shell: 'bash' - -jobs: - triage: - runs-on: 'ubuntu-latest' - timeout-minutes: 7 - permissions: - contents: 'read' - id-token: 'write' - issues: 'read' - pull-requests: 'read' - outputs: - available_labels: '${{ steps.get_labels.outputs.available_labels }}' - triaged_issues: '${{ env.TRIAGED_ISSUES }}' - steps: - - name: 'Get repository labels' - id: 'get_labels' - uses: 'actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd' # ratchet:actions/github-script@v8.0.0 - with: - # NOTE: we intentionally do not use the minted token. The default - # GITHUB_TOKEN provided by the action has enough permissions to read - # the labels. - script: |- - const labels = []; - for await (const response of github.paginate.iterator(github.rest.issues.listLabelsForRepo, { - owner: context.repo.owner, - repo: context.repo.repo, - per_page: 100, // Maximum per page to reduce API calls - })) { - labels.push(...response.data); - } - - if (!labels || labels.length === 0) { - core.setFailed('There are no issue labels in this repository.') - } - - const labelNames = labels.map(label => label.name).sort(); - core.setOutput('available_labels', labelNames.join(',')); - core.info(`Found ${labelNames.length} labels: ${labelNames.join(', ')}`); - return labelNames; - - - name: 'Find untriaged issues' - id: 'find_issues' - env: - GITHUB_REPOSITORY: '${{ github.repository }}' - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN || github.token }}' - run: |- - echo '🔍 Finding unlabeled issues and issues marked for triage...' - ISSUES="$(gh issue list \ - --state 'open' \ - --search 'no:label label:"status/needs-triage"' \ - --json number,title,body \ - --limit '100' \ - --repo "${GITHUB_REPOSITORY}" - )" - - echo '📝 Setting output for GitHub Actions...' - echo "issues_to_triage=${ISSUES}" >> "${GITHUB_OUTPUT}" - - ISSUE_NUMBERS="$(echo "${ISSUES}" | jq -r '.[].number | tostring' | paste -sd, -)" - echo "issue_numbers=${ISSUE_NUMBERS}" >> "${GITHUB_OUTPUT}" - - ISSUE_COUNT="$(echo "${ISSUES}" | jq 'length')" - echo "✅ Found ${ISSUE_COUNT} issue(s) to triage! 🎯" - - - name: 'Run Gemini Issue Analysis' - id: 'gemini_issue_analysis' - if: |- - ${{ steps.find_issues.outputs.issues_to_triage != '[]' }} - uses: 'google-github-actions/run-gemini-cli@v0' # ratchet:exclude - env: - GITHUB_TOKEN: '' # Do not pass any auth token here since this runs on untrusted inputs - ISSUES_TO_TRIAGE: '${{ steps.find_issues.outputs.issues_to_triage }}' - REPOSITORY: '${{ github.repository }}' - AVAILABLE_LABELS: '${{ steps.get_labels.outputs.available_labels }}' - with: - gcp_location: '${{ vars.GOOGLE_CLOUD_LOCATION }}' - gcp_project_id: '${{ vars.GOOGLE_CLOUD_PROJECT }}' - gcp_service_account: '${{ vars.SERVICE_ACCOUNT_EMAIL }}' - gcp_workload_identity_provider: '${{ vars.GCP_WIF_PROVIDER }}' - gemini_api_key: '${{ secrets.GEMINI_API_KEY }}' - gemini_cli_version: '${{ vars.GEMINI_CLI_VERSION }}' - gemini_debug: '${{ fromJSON(vars.GEMINI_DEBUG || vars.ACTIONS_STEP_DEBUG || false) }}' - gemini_model: '${{ vars.GEMINI_MODEL }}' - google_api_key: '${{ secrets.GOOGLE_API_KEY }}' - use_gemini_code_assist: '${{ vars.GOOGLE_GENAI_USE_GCA }}' - use_vertex_ai: '${{ vars.GOOGLE_GENAI_USE_VERTEXAI }}' - upload_artifacts: '${{ vars.UPLOAD_ARTIFACTS }}' - workflow_name: 'gemini-scheduled-triage' - # Overriding default telemetry inputs because scheduled workflows lack an event payload - # We pass the dynamically generated list of batch issues to the issue number field - github_issue_number: '${{ steps.find_issues.outputs.issue_numbers }}' - settings: |- - { - "model": { - "maxSessionTurns": 25 - }, - "telemetry": { - "enabled": true, - "target": "local", - "outfile": ".gemini/telemetry.log" - }, - "tools": { - "core": [ - "run_shell_command(echo)", - "run_shell_command(jq)", - "run_shell_command(printenv)" - ] - } - } - prompt: '/gemini-scheduled-triage' - - label: - runs-on: 'ubuntu-latest' - needs: - - 'triage' - if: |- - needs.triage.outputs.available_labels != '' && - needs.triage.outputs.available_labels != '[]' && - needs.triage.outputs.triaged_issues != '' && - needs.triage.outputs.triaged_issues != '[]' - permissions: - contents: 'read' - issues: 'write' - pull-requests: 'write' - steps: - - name: 'Mint identity token' - id: 'mint_identity_token' - if: |- - ${{ vars.APP_ID }} - uses: 'actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf' # ratchet:actions/create-github-app-token@v2 - with: - app-id: '${{ vars.APP_ID }}' - private-key: '${{ secrets.APP_PRIVATE_KEY }}' - permission-contents: 'read' - permission-issues: 'write' - permission-pull-requests: 'write' - - - name: 'Apply labels' - env: - AVAILABLE_LABELS: '${{ needs.triage.outputs.available_labels }}' - TRIAGED_ISSUES: '${{ needs.triage.outputs.triaged_issues }}' - uses: 'actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd' # ratchet:actions/github-script@v8.0.0 - with: - # Use the provided token so that the "gemini-cli" is the actor in the - # log for what changed the labels. - github-token: '${{ steps.mint_identity_token.outputs.token || secrets.GITHUB_TOKEN || github.token }}' - script: |- - // Parse the available labels - const availableLabels = (process.env.AVAILABLE_LABELS || '').split(',') - .map((label) => label.trim()) - .sort() - - // Parse out the triaged issues - const triagedIssues = (JSON.parse(process.env.TRIAGED_ISSUES || '{}')) - .sort((a, b) => a.issue_number - b.issue_number) - - core.debug(`Triaged issues: ${JSON.stringify(triagedIssues)}`); - - // Iterate over each label - for (const issue of triagedIssues) { - if (!issue) { - core.debug(`Skipping empty issue: ${JSON.stringify(issue)}`); - continue; - } - - const issueNumber = issue.issue_number; - if (!issueNumber) { - core.debug(`Skipping issue with no data: ${JSON.stringify(issue)}`); - continue; - } - - // Extract and reject invalid labels - we do this just in case - // someone was able to prompt inject malicious labels. - let labelsToSet = (issue.labels_to_set || []) - .map((label) => label.trim()) - .filter((label) => availableLabels.includes(label)) - .sort() - - core.debug(`Identified labels to set: ${JSON.stringify(labelsToSet)}`); - - if (labelsToSet.length === 0) { - core.info(`Skipping issue #${issueNumber} - no labels to set.`) - continue; - } - - core.debug(`Setting labels on issue #${issueNumber} to ${labelsToSet.join(', ')} (${issue.explanation || 'no explanation'})`) - - await github.rest.issues.setLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issueNumber, - labels: labelsToSet, - }); - } diff --git a/.github/workflows/gemini-triage.yml b/.github/workflows/gemini-triage.yml deleted file mode 100644 index 480a2b0d..00000000 --- a/.github/workflows/gemini-triage.yml +++ /dev/null @@ -1,160 +0,0 @@ -name: '🔀 Gemini Triage' - -on: - workflow_call: - inputs: - additional_context: - type: 'string' - description: 'Any additional context from the request' - required: false - -concurrency: - group: '${{ github.workflow }}-triage-${{ github.event_name }}-${{ github.event.pull_request.number || github.event.issue.number }}' - cancel-in-progress: true - -defaults: - run: - shell: 'bash' - -jobs: - triage: - runs-on: 'ubuntu-latest' - timeout-minutes: 7 - outputs: - available_labels: '${{ steps.get_labels.outputs.available_labels }}' - selected_labels: '${{ env.SELECTED_LABELS }}' - permissions: - contents: 'read' - id-token: 'write' - issues: 'read' - pull-requests: 'read' - steps: - - name: 'Get repository labels' - id: 'get_labels' - uses: 'actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd' # ratchet:actions/github-script@v8.0.0 - with: - # NOTE: we intentionally do not use the given token. The default - # GITHUB_TOKEN provided by the action has enough permissions to read - # the labels. - script: |- - const labels = []; - for await (const response of github.paginate.iterator(github.rest.issues.listLabelsForRepo, { - owner: context.repo.owner, - repo: context.repo.repo, - per_page: 100, // Maximum per page to reduce API calls - })) { - labels.push(...response.data); - } - - if (!labels || labels.length === 0) { - core.setFailed('There are no issue labels in this repository.') - } - - const labelNames = labels.map(label => label.name).sort(); - core.setOutput('available_labels', labelNames.join(',')); - core.info(`Found ${labelNames.length} labels: ${labelNames.join(', ')}`); - return labelNames; - - - name: 'Run Gemini issue analysis' - id: 'gemini_analysis' - if: |- - ${{ steps.get_labels.outputs.available_labels != '' }} - uses: 'google-github-actions/run-gemini-cli@v0' # ratchet:exclude - env: - GITHUB_TOKEN: '' # Do NOT pass any auth tokens here since this runs on untrusted inputs - ISSUE_TITLE: '${{ github.event.issue.title }}' - ISSUE_BODY: '${{ github.event.issue.body }}' - AVAILABLE_LABELS: '${{ steps.get_labels.outputs.available_labels }}' - with: - gcp_location: '${{ vars.GOOGLE_CLOUD_LOCATION }}' - gcp_project_id: '${{ vars.GOOGLE_CLOUD_PROJECT }}' - gcp_service_account: '${{ vars.SERVICE_ACCOUNT_EMAIL }}' - gcp_workload_identity_provider: '${{ vars.GCP_WIF_PROVIDER }}' - gemini_api_key: '${{ secrets.GEMINI_API_KEY }}' - gemini_cli_version: '${{ vars.GEMINI_CLI_VERSION }}' - gemini_debug: '${{ fromJSON(vars.GEMINI_DEBUG || vars.ACTIONS_STEP_DEBUG || false) }}' - gemini_model: '${{ vars.GEMINI_MODEL }}' - google_api_key: '${{ secrets.GOOGLE_API_KEY }}' - use_gemini_code_assist: '${{ vars.GOOGLE_GENAI_USE_GCA }}' - use_vertex_ai: '${{ vars.GOOGLE_GENAI_USE_VERTEXAI }}' - upload_artifacts: '${{ vars.UPLOAD_ARTIFACTS }}' - workflow_name: 'gemini-triage' - # Explicitly set the issue number to handle `issue_comment` triggers where the context might be ambiguous - github_issue_number: '${{ github.event.issue.number }}' - settings: |- - { - "model": { - "maxSessionTurns": 25 - }, - "telemetry": { - "enabled": true, - "target": "local", - "outfile": ".gemini/telemetry.log" - }, - "tools": { - "core": [ - "run_shell_command(echo)" - ] - } - } - prompt: '/gemini-triage' - - label: - runs-on: 'ubuntu-latest' - needs: - - 'triage' - if: |- - ${{ needs.triage.outputs.selected_labels != '' }} - permissions: - contents: 'read' - issues: 'write' - pull-requests: 'write' - steps: - - name: 'Mint identity token' - id: 'mint_identity_token' - if: |- - ${{ vars.APP_ID }} - uses: 'actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf' # ratchet:actions/create-github-app-token@v2 - with: - app-id: '${{ vars.APP_ID }}' - private-key: '${{ secrets.APP_PRIVATE_KEY }}' - permission-contents: 'read' - permission-issues: 'write' - permission-pull-requests: 'write' - - - name: 'Apply labels' - env: - ISSUE_NUMBER: '${{ github.event.issue.number }}' - AVAILABLE_LABELS: '${{ needs.triage.outputs.available_labels }}' - SELECTED_LABELS: '${{ needs.triage.outputs.selected_labels }}' - uses: 'actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd' # ratchet:actions/github-script@v8.0.0 - with: - # Use the provided token so that the "gemini-cli" is the actor in the - # log for what changed the labels. - github-token: '${{ steps.mint_identity_token.outputs.token || secrets.GITHUB_TOKEN || github.token }}' - script: |- - // Parse the available labels - const availableLabels = (process.env.AVAILABLE_LABELS || '').split(',') - .map((label) => label.trim()) - .sort() - - // Parse the label as a CSV, reject invalid ones - we do this just - // in case someone was able to prompt inject malicious labels. - const selectedLabels = (process.env.SELECTED_LABELS || '').split(',') - .map((label) => label.trim()) - .filter((label) => availableLabels.includes(label)) - .sort() - - // Set the labels - const issueNumber = process.env.ISSUE_NUMBER; - if (selectedLabels && selectedLabels.length > 0) { - await github.rest.issues.setLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issueNumber, - labels: selectedLabels, - }); - core.info(`Successfully set labels: ${selectedLabels.join(',')}`); - } else { - core.info(`Failed to determine labels to set. There may not be enough information in the issue or pull request.`) - } From f3bff2cc6f1259a8249fa986b8eb578a86f0e693 Mon Sep 17 00:00:00 2001 From: Shangjie Chen Date: Wed, 13 May 2026 11:40:41 -0700 Subject: [PATCH 2/2] Prevent /review command on issues --- .github/workflows/gemini-dispatch.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gemini-dispatch.yml b/.github/workflows/gemini-dispatch.yml index e9a5ee6f..b2d7a015 100644 --- a/.github/workflows/gemini-dispatch.yml +++ b/.github/workflows/gemini-dispatch.yml @@ -83,18 +83,24 @@ jobs: env: EVENT_TYPE: '${{ github.event_name }}.${{ github.event.action }}' REQUEST: '${{ github.event.comment.body || github.event.review.body || github.event.issue.body }}' + IS_PR: '${{ !!(github.event.pull_request || github.event.issue.pull_request) }}' with: script: | const eventType = process.env.EVENT_TYPE; const request = process.env.REQUEST; + const isPr = process.env.IS_PR === 'true'; core.setOutput('request', request); if (eventType === 'pull_request.opened') { core.setOutput('command', 'review'); } else if (request.startsWith("@gemini-cli /review")) { - core.setOutput('command', 'review'); - const additionalContext = request.replace(/^@gemini-cli \/review/, '').trim(); - core.setOutput('additional_context', additionalContext); + if (isPr) { + core.setOutput('command', 'review'); + const additionalContext = request.replace(/^@gemini-cli \/review/, '').trim(); + core.setOutput('additional_context', additionalContext); + } else { + core.setOutput('command', 'fallthrough'); + } } else if (request.startsWith("@gemini-cli")) { const additionalContext = request.replace(/^@gemini-cli/, '').trim(); core.setOutput('command', 'invoke');