Repository navigation
fix(chat): Reuse generated images for attachFile - #91
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
dcramer
marked this pull request as ready for review
March 16, 2026 23:21
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Treat same-turn imageGenerate outputs as already attached when attachFile is given the generated filename instead of a real sandbox file. Tighten the prompt so the model does not try to reattach generated images, and add the focused tests for that contract. Bump chat and the Slack adapters to 4.20.2 while updating the local state and test shims for the additive SDK interfaces introduced by the newer release. Co-Authored-By: GPT-5 <[email protected]>
Split generated image artifacts from reply attachments so imageGenerate no longer implicitly delivers files. Require attachFile to promote generated images into the Slack reply, which keeps generation and delivery as separate tool concerns. Co-Authored-By: GPT-5 <[email protected]>
Use attached reply files rather than generated artifacts when building the delivery plan so the plan matches what the assistant actually sends. Drop unused createAgentTools file hooks and clamp stale file plans at execution time so the Slack runtime never attempts file delivery without actual uploads. Refs GH-91 Co-Authored-By: GPT-5 Codex <[email protected]>
dcramer
force-pushed
the
fix/generated-image-attachfile
branch
from
March 17, 2026 16:30
4a2ff2d to
5fa94ad
Compare
Remove the legacy Slack and Chat module mocks from the touched bot tests so they exercise the real bot runtime under the current integration policy. Reuse the shared Slack harness in bot image hydration coverage and keep behavior control at the bot-deps seam instead of ad hoc Slack doubles. Refs GH-91 Co-Authored-By: GPT-5 Codex <[email protected]>
Add a Slack eval for 'show me how you feel' that requires an actual image attachment in the thread. Mock only the image generation HTTP response so the runtime still exercises the real attachment path without calling the external image backend. Keep eval output text-only so this case cannot pass by serializing attachment metadata before vitest-evals supports that surface. Co-Authored-By: GPT-5 Codex <[email protected]>
This was referenced Nov 9, 2026
BYK
added a commit
that referenced
this pull request
Nov 13, 2026
… links (#3381) ## Problem A message with several links in one sentence turned into a row of chips. Each chip had an icon, a border, a background, a status suffix (" · Running") and a trailing ↗, and lines broke badly (a lone "." on its own line). A URL repeated in a message showed its card twice. ## Fix - **Inline links** in prose and summaries are plain links with the object title, such as "Pin the release train to payments 4.2 (#91)". No icon, border, background, status, or ↗. Status shows only in the hover card and in block cards. A message link shows its channel (`#proj-release`), and long titles stop at 80 characters. - **People** keep the avatar and name chip, without the ↗. - **A URL alone on its line** shows the block card, whatever its type. A video or image page shows only its thumbnail. - **A URL repeated in one message** gets one card, also across code fences. - **Hover cards** open after 350 ms. Base UI's default is 600 ms. - To tell a video or image page from an article, web page cards now save `facts.media` from the oEmbed `type` (`video` or `photo`), or from Open Graph `og:type` `video.*` or `og:video`. A page that already has a cached card gets the field when its cache entry expires (1 h by default). The Sentry issue link from the screenshot that started this (`JUNIOR-3ZK · Unresolved`) comes from #3367. It goes through the same inline path, so it renders as a plain titled link once #3367 lands. ## Screenshots (1440 wide, mock release reply) | | Before | After | |---|---|---| | Dark |  |  | | Light |  |  | <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3A3327eedcd48b4d0139d324d264a639d1 --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3A3327eedcd48b4d0139d324d264a639d1) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A3327eedcd48b4d0139d324d264a639d1/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: BYK <[email protected]>
sentry-junior Bot
added a commit
that referenced
this pull request
Nov 25, 2026
A row read the short repo name only from its owner Conversation's links. A viewer who cannot see that Conversation got "#91" instead of "payments#91". With no Conversation, the name now comes from the key of the subject's card. Co-Authored-By: BYK <[email protected]>
This branch was successfully deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Treat same-turn imageGenerate outputs as already attached when attachFile is given the generated filename instead of a real sandbox file.
This fixes the verified Slack image failure where the model generated an image successfully and then redundantly tried to read /vercel/sandbox/generated-image-...png through attachFile. The prompt now makes that contract explicit so generated images are not reattached as sandbox files.
I also bumped chat and the Slack adapters from 4.17.0 to 4.20.2 while updating Juniors state adapter shim and test harnesses for the additive SDK interfaces in the newer release. I checked the upstream adapter diff before bumping; it does not already fix the generated-image collision, so the Junior change remains necessary.