Skip to content

fix(chat): render deployed file outputs inline - #7826

Merged
icecrasher321 merged 2 commits into
stagingfrom
codex/deployed-chat-file-outputs
Sep 14, 2026
Merged

icecrasher321 merged 2 commits into
stagingfrom
codex/deployed-chat-file-outputs

Conversation

@icecrasher321

Copy link
Copy Markdown
Collaborator

Summary

  • Render selected image outputs inline in deployed chats and keep other files downloadable.
  • Suppress empty outputs and preserve files when the same agent also streams text.
  • Negotiate structured chat outputs separately so existing stream clients keep their current behavior.

Type of Change

  • Bug fix

Testing

  • Focused streaming and rendering tests, including file previews, empty outputs, client compatibility, and aggregate payload limits.
  • Type-check, repository lint, and CI audit suite.
  • Checked image previews at desktop and mobile widths.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 14, 2026 10:53pm UTC

Request Review

@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@icecrasher321 I have started the AI code review. It will take a few minutes to complete.

@greptile-apps

greptile-apps Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge with both previous findings resolved and no new actionable defects identified.

Summary

This PR adds negotiated structured outputs for deployed chat streams, extracts returned files into explicitly projected client attachments, and renders image outputs inline while preserving downloads and existing clients’ text-stream behavior.

  • Adds a separate chat-outputs-v1 stream capability.
  • Emits selected non-text values as typed output frames.
  • Extracts file attachments while retaining other structured output fields.
  • Renders image previews from inline bytes or safe file URLs.
  • Suppresses empty assistant rows and file-only copy actions.
  • Adds focused protocol, streaming, projection, and rendering regressions.

Diagram

sequenceDiagram
  participant C as Deployed Chat Client
  participant S as Streaming Response
  participant E as Workflow Executor
  participant UI as Chat Message UI

  C->>S: Request agent-events-v1, chat-outputs-v1
  S->>E: Execute deployed workflow
  E-->>S: Live answer chunks
  S-->>C: chunk frames
  E-->>S: Selected structured output
  S-->>C: output frame
  C->>C: Separate files from visible content
  C->>UI: Render text and attachments
  UI->>UI: Preview images inline
  S-->>C: final frame
Loading

Reviews (2) · Last reviewed commit: "fix(chat): reconcile structured output d..."

Comment thread apps/sim/lib/workflows/streaming/streaming.ts
Comment thread apps/sim/app/(interfaces)/chat/hooks/use-chat-streaming.ts Outdated
@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@greptile

@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@icecrasher321 I have started the AI code review. It will take a few minutes to complete.

@icecrasher321
icecrasher321 merged commit b49d28f into staging Sep 14, 2026
33 checks passed
@icecrasher321
icecrasher321 deleted the codex/deployed-chat-file-outputs branch September 14, 2026 22:58

This branch was previously deployed

1 inactive deployment
Preview — c72b099d Deployed Sep 14, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant