-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[codex] Fix Kiro ACP image attachment errors #2793
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
Closed
declancowen
wants to merge
23
commits into
pingdotgg:main
from
declancowen:codex/kiro-acp-image-errors
Closed
Changes from 21 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
4ced591
feat: add Kiro CLI provider
declancowen b83cc43
Add Kiro active prompt steering and appearance settings
declancowen cc00a4b
Wait for ACP prompt cancellation
declancowen 33128fe
Always forward ACP cancel requests
declancowen b8c1c62
Fix Kiro active steering attachments
declancowen 6723379
Stabilize Kiro active prompt state
declancowen a31f895
Polish Kiro review follow-ups
declancowen b2e1c56
Merge pull request #1 from declancowen/codex/kiro-provider-appearance…
declancowen be09187
Fix Kiro ACP stop and refresh app icon assets
declancowen b041476
Merge pull request #2 from declancowen/codex/kiro-acp-stop-icon-polish
declancowen 9893a93
Use horizontal send icon
declancowen f90a239
Fix running composer steering send
declancowen d59070c
Merge pull request #3 from declancowen/codex/fix-running-composer-ste…
declancowen d99e129
Add desktop release workflow
declancowen 66540db
Align stable desktop release flow
declancowen b723c56
fix: harden desktop update install flow
declancowen 2fac5ea
Fix chat markdown link accent color
declancowen d85822b
Fix provider registry test for Kiro
declancowen dae9717
Fix desktop update install restart
declancowen 3ba7233
Merge upstream main
declancowen 657f253
Fix Kiro ACP image attachment errors
declancowen dd6e413
Address PR review findings
declancowen 7d1ec6d
Restrict credentialed browser CORS origins
declancowen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,369 @@ | ||
| name: Desktop Release | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - "v*.*.*" | ||
| - "!v*.*.*-*" | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: "Release version, for example 0.0.26 or v0.0.26" | ||
| required: true | ||
| type: string | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| preflight: | ||
| name: Preflight | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 15 | ||
| outputs: | ||
| version: ${{ steps.release_meta.outputs.version }} | ||
| tag: ${{ steps.release_meta.outputs.tag }} | ||
| release_name: ${{ steps.release_meta.outputs.release_name }} | ||
| ref: ${{ github.sha }} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Setup Bun | ||
| uses: oven-sh/setup-bun@v2 | ||
| with: | ||
| bun-version-file: package.json | ||
|
|
||
| - name: Setup Node | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version-file: package.json | ||
|
|
||
| - name: Install dependencies | ||
| run: bun install --frozen-lockfile | ||
|
|
||
| - id: release_meta | ||
| name: Resolve release version | ||
| shell: bash | ||
| env: | ||
| INPUT_VERSION: ${{ inputs.version }} | ||
| run: | | ||
| set -euo pipefail | ||
|
|
||
| if [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then | ||
| raw="${INPUT_VERSION}" | ||
| else | ||
| raw="${GITHUB_REF_NAME}" | ||
| fi | ||
|
|
||
| version="${raw#v}" | ||
| if [[ ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | ||
| echo "Invalid stable release version: $raw" >&2 | ||
| echo "Stable desktop releases must use x.y.z or vx.y.z, for example 0.0.26 or v0.0.26." >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "version=$version" >> "$GITHUB_OUTPUT" | ||
| echo "tag=v$version" >> "$GITHUB_OUTPUT" | ||
| echo "release_name=T3 Code v$version" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Format check | ||
| run: bun run fmt:check | ||
|
|
||
| - name: Lint | ||
| run: bun run lint | ||
|
|
||
| - name: Typecheck | ||
| run: bun run typecheck | ||
|
|
||
| - name: Test | ||
| run: bun run test | ||
|
|
||
| build: | ||
| name: Build ${{ matrix.label }} | ||
| needs: preflight | ||
| runs-on: ${{ matrix.runner }} | ||
| timeout-minutes: 35 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - label: macOS arm64 | ||
| runner: macos-latest | ||
| platform: mac | ||
| target: dmg | ||
| arch: arm64 | ||
| - label: macOS x64 | ||
| runner: macos-latest | ||
| platform: mac | ||
| target: dmg | ||
| arch: x64 | ||
| - label: Linux x64 | ||
| runner: ubuntu-24.04 | ||
| platform: linux | ||
| target: AppImage | ||
| arch: x64 | ||
| - label: Windows x64 | ||
| runner: windows-latest | ||
| platform: win | ||
| target: nsis | ||
| arch: x64 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| ref: ${{ needs.preflight.outputs.ref }} | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Setup Bun | ||
| uses: oven-sh/setup-bun@v2 | ||
| with: | ||
| bun-version-file: package.json | ||
|
|
||
| - name: Setup Node | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version-file: package.json | ||
|
|
||
| - name: Install dependencies | ||
| run: bun install --frozen-lockfile | ||
|
|
||
| - name: Align package versions to release version | ||
| run: node scripts/update-release-package-versions.ts "${{ needs.preflight.outputs.version }}" | ||
|
|
||
| - name: Install Spectre-mitigated MSVC libs | ||
| if: matrix.platform == 'win' | ||
| shell: pwsh | ||
| run: | | ||
| $ErrorActionPreference = "Stop" | ||
| $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" | ||
| $installPath = & $vswhere -products * -latest -property installationPath | ||
| $setupExe = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\setup.exe" | ||
| $proc = Start-Process -FilePath $setupExe ` | ||
| -ArgumentList "modify", "--installPath", "`"$installPath`"", "--add", ` | ||
| "Microsoft.VisualStudio.Component.VC.Tools.x86.x64.Spectre", "--quiet", "--norestart" ` | ||
| -Wait -PassThru -NoNewWindow | ||
| if ($null -eq $proc -or $proc.ExitCode -ne 0) { | ||
| $code = if ($null -ne $proc) { $proc.ExitCode } else { 1 } | ||
| Write-Error "Visual Studio Installer failed with exit code $code" | ||
| exit $code | ||
| } | ||
|
|
||
| - name: Prepare Azure Trusted Signing | ||
| if: matrix.platform == 'win' | ||
| shell: pwsh | ||
| env: | ||
| AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} | ||
| AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} | ||
| AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} | ||
| AZURE_TRUSTED_SIGNING_ENDPOINT: ${{ secrets.AZURE_TRUSTED_SIGNING_ENDPOINT }} | ||
| AZURE_TRUSTED_SIGNING_ACCOUNT_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }} | ||
| AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME }} | ||
| AZURE_TRUSTED_SIGNING_PUBLISHER_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_PUBLISHER_NAME }} | ||
| run: | | ||
| $ErrorActionPreference = "Stop" | ||
|
|
||
| $requiredSecrets = @( | ||
| $env:AZURE_TENANT_ID, | ||
| $env:AZURE_CLIENT_ID, | ||
| $env:AZURE_CLIENT_SECRET, | ||
| $env:AZURE_TRUSTED_SIGNING_ENDPOINT, | ||
| $env:AZURE_TRUSTED_SIGNING_ACCOUNT_NAME, | ||
| $env:AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME, | ||
| $env:AZURE_TRUSTED_SIGNING_PUBLISHER_NAME | ||
| ) | ||
| if ($requiredSecrets | Where-Object { [string]::IsNullOrWhiteSpace($_) }) { | ||
| Write-Host "Azure Trusted Signing disabled; skipping TrustedSigning module preparation." | ||
| exit 0 | ||
| } | ||
|
|
||
| try { | ||
| Install-PackageProvider ` | ||
| -Name NuGet ` | ||
| -MinimumVersion 2.8.5.201 ` | ||
| -Force ` | ||
| -Scope CurrentUser ` | ||
| -ErrorAction Stop | ||
| } catch { | ||
| Write-Warning "Could not bootstrap NuGet package provider. Continuing because the runner may already have a usable provider. $($_.Exception.Message)" | ||
| } | ||
|
|
||
| Install-Module ` | ||
| -Name TrustedSigning ` | ||
| -MinimumVersion 0.5.0 ` | ||
| -Force ` | ||
| -AllowClobber ` | ||
| -Repository PSGallery ` | ||
| -Scope CurrentUser ` | ||
| -ErrorAction Stop | ||
|
|
||
| Import-Module TrustedSigning -MinimumVersion 0.5.0 -Force | ||
| Get-Command Invoke-TrustedSigning -ErrorAction Stop | ||
|
|
||
| - name: Build desktop artifact | ||
| shell: bash | ||
| env: | ||
| T3CODE_DESKTOP_UPDATE_REPOSITORY: ${{ github.repository }} | ||
| CSC_LINK: ${{ secrets.CSC_LINK }} | ||
| CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} | ||
| APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }} | ||
| APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }} | ||
| APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }} | ||
| AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} | ||
| AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} | ||
| AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} | ||
| AZURE_TRUSTED_SIGNING_ENDPOINT: ${{ secrets.AZURE_TRUSTED_SIGNING_ENDPOINT }} | ||
| AZURE_TRUSTED_SIGNING_ACCOUNT_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }} | ||
| AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME }} | ||
| AZURE_TRUSTED_SIGNING_PUBLISHER_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_PUBLISHER_NAME }} | ||
| run: | | ||
| set -euo pipefail | ||
|
|
||
| args=( | ||
| --platform "${{ matrix.platform }}" | ||
| --target "${{ matrix.target }}" | ||
| --arch "${{ matrix.arch }}" | ||
| --build-version "${{ needs.preflight.outputs.version }}" | ||
| --verbose | ||
| ) | ||
|
|
||
| has_all() { | ||
| for value in "$@"; do | ||
| if [[ -z "$value" ]]; then | ||
| return 1 | ||
| fi | ||
| done | ||
| return 0 | ||
| } | ||
|
|
||
| if [[ "${{ matrix.platform }}" == "mac" ]]; then | ||
| if has_all "$CSC_LINK" "$CSC_KEY_PASSWORD" "$APPLE_API_KEY" "$APPLE_API_KEY_ID" "$APPLE_API_ISSUER"; then | ||
| key_path="$RUNNER_TEMP/AuthKey_${APPLE_API_KEY_ID}.p8" | ||
| printf '%s' "$APPLE_API_KEY" > "$key_path" | ||
| export APPLE_API_KEY="$key_path" | ||
| echo "macOS signing enabled." | ||
| args+=(--signed) | ||
| else | ||
| echo "macOS signing secrets are required for stable desktop releases." >&2 | ||
| echo "Missing one or more of CSC_LINK, CSC_KEY_PASSWORD, APPLE_API_KEY, APPLE_API_KEY_ID, APPLE_API_ISSUER." >&2 | ||
| echo "Unsigned macOS builds can download updates, but Squirrel.Mac rejects them during install." >&2 | ||
| exit 1 | ||
| fi | ||
| elif [[ "${{ matrix.platform }}" == "win" ]]; then | ||
| if has_all \ | ||
| "$AZURE_TENANT_ID" \ | ||
| "$AZURE_CLIENT_ID" \ | ||
| "$AZURE_CLIENT_SECRET" \ | ||
| "$AZURE_TRUSTED_SIGNING_ENDPOINT" \ | ||
| "$AZURE_TRUSTED_SIGNING_ACCOUNT_NAME" \ | ||
| "$AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME" \ | ||
| "$AZURE_TRUSTED_SIGNING_PUBLISHER_NAME"; then | ||
| echo "Windows signing enabled (Azure Trusted Signing)." | ||
| args+=(--signed) | ||
| else | ||
| echo "Windows signing disabled (missing one or more Azure Trusted Signing secrets)." | ||
| fi | ||
| else | ||
| echo "Signing disabled for ${{ matrix.platform }}." | ||
| fi | ||
|
|
||
| bun run dist:desktop:artifact -- "${args[@]}" | ||
|
|
||
| - name: Collect release assets | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| mkdir -p release-publish | ||
|
|
||
| shopt -s nullglob | ||
| for pattern in \ | ||
| "release/*.dmg" \ | ||
| "release/*.zip" \ | ||
| "release/*.AppImage" \ | ||
| "release/*.exe" \ | ||
| "release/*.blockmap" \ | ||
| "release/*.yml"; do | ||
| for file in $pattern; do | ||
| cp "$file" release-publish/ | ||
| done | ||
| done | ||
|
|
||
| if [[ "${{ matrix.platform }}" == "mac" && "${{ matrix.arch }}" != "arm64" ]]; then | ||
| shopt -s nullglob | ||
| for manifest in release-publish/*-mac.yml; do | ||
| mv "$manifest" "${manifest%.yml}-${{ matrix.arch }}.yml" | ||
| done | ||
| fi | ||
|
|
||
| - name: Upload build artifacts | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: desktop-${{ matrix.platform }}-${{ matrix.arch }} | ||
| path: release-publish/* | ||
| if-no-files-found: error | ||
|
|
||
| release: | ||
| name: Publish GitHub Release | ||
| needs: [preflight, build] | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 10 | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| ref: ${{ needs.preflight.outputs.ref }} | ||
|
|
||
| - name: Setup Bun | ||
| uses: oven-sh/setup-bun@v2 | ||
| with: | ||
| bun-version-file: package.json | ||
|
|
||
| - name: Setup Node | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version-file: package.json | ||
|
|
||
| - name: Install release tooling dependencies | ||
| run: bun install --frozen-lockfile --filter=@t3tools/scripts | ||
|
|
||
| - name: Download all desktop artifacts | ||
| uses: actions/download-artifact@v8 | ||
| with: | ||
| pattern: desktop-* | ||
| merge-multiple: true | ||
| path: release-assets | ||
|
|
||
| - name: Merge macOS updater manifests | ||
| run: | | ||
| set -euo pipefail | ||
| shopt -s nullglob | ||
| for x64_manifest in release-assets/*-mac-x64.yml; do | ||
| arm64_manifest="${x64_manifest%-x64.yml}.yml" | ||
| if [[ -f "$arm64_manifest" ]]; then | ||
| node scripts/merge-update-manifests.ts --platform mac "$arm64_manifest" "$x64_manifest" | ||
| rm -f "$x64_manifest" | ||
| fi | ||
| done | ||
|
|
||
| - name: Publish release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| tag_name: ${{ needs.preflight.outputs.tag }} | ||
| target_commitish: ${{ needs.preflight.outputs.ref }} | ||
| name: ${{ needs.preflight.outputs.release_name }} | ||
| generate_release_notes: true | ||
| prerelease: false | ||
| make_latest: true | ||
| files: | | ||
| release-assets/*.dmg | ||
| release-assets/*.zip | ||
| release-assets/*.AppImage | ||
| release-assets/*.exe | ||
| release-assets/*.blockmap | ||
| release-assets/*.yml | ||
| fail_on_unmatched_files: true | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.