You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: send screenshot attachments to ChatGPT Codex (#157)
## Summary
Fixes a `chatgpt-codex` bug where uploaded screenshots were only reduced
to filename hints, so models like `gpt-5.4` could ignore the attached
visual reference entirely. This patch keeps text attachments unchanged,
encodes supported image attachments as data URLs in prompt preparation,
and forwards them as Responses `input_image` parts on the ChatGPT Codex
generate path.
## Type of change
- [x] Bug fix
- [ ] New feature
- [ ] Refactor (no behavior change)
- [ ] Documentation
- [ ] Build / CI / tooling
- [ ] Breaking change
## Linked issue
- Refs local repro: attached screenshot uploads were not being used by
the model response.
## Checklist
- [ ] I read [`docs/VISION.md`](../docs/VISION.md),
[`docs/PRINCIPLES.md`](../docs/PRINCIPLES.md), and
[`CLAUDE.md`](../CLAUDE.md) before starting
- [x] Commits are signed with DCO (`git commit -s`)
- [ ] `pnpm lint && pnpm typecheck && pnpm test` passes locally
- [x] Added/updated tests for the change
- [x] Added a changeset (`pnpm changeset`) if user-visible
- [ ] Updated docs if behavior changed
Validation run for this PR:
- `corepack pnpm --filter @open-codesign/desktop test -- --run
src/main/prompt-context.test.ts src/main/codex-generate.test.ts`
- `corepack pnpm --filter @open-codesign/desktop typecheck`
- pre-push checks passed: workspace typecheck + `biome check .`
Note on full test suite:
- `pnpm test` still has existing Windows baseline failures unrelated to
this patch (provider token-store permission assertion, core
builtin-skill loader expectation, exporter PDF timeout, and opencode
path separator assertions).
## Screenshots / recordings (UI changes)
- N/A
---------
Signed-off-by: Sun-sunshine06 <Sun-sunshine06@users.noreply.github.com>
Co-authored-by: Sun-sunshine06 <Sun-sunshine06@users.noreply.github.com>
Co-authored-by: Qihan <>
fix: send attached screenshots to ChatGPT Codex as image inputs
7
+
8
+
Image attachments in the desktop app were previously reduced to filename-only hints on the `chatgpt-codex` route, so models like `gpt-5.4` could ignore uploaded screenshots entirely.
9
+
10
+
This change keeps the existing text-attachment behavior, but reads supported image files into data URLs and forwards them as Responses `input_image` parts for ChatGPT Codex generations.
0 commit comments