feat(agent, file-block): files in agent block, file block v4#4610
feat(agent, file-block): files in agent block, file block v4#4610Sg312 wants to merge 5 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR adds file attachment support to the agent block (upload or wire files into any agent's latest user message) and introduces a new
Confidence Score: 3/5The file attachment pipeline works correctly end-to-end for all supported providers, but the early guard in the agent handler silently passes for three declared-unsupported providers, causing wasted file hydration and a broken test. The early rejection check in apps/sim/executor/handlers/agent/agent-handler.ts and apps/sim/executor/handlers/agent/agent-handler.test.ts need the most attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant UI as Agent Block UI
participant AH as AgentBlockHandler
participant AT as attachments.ts
participant HY as hydrateUserFilesWithBase64
participant PR as Provider (openai/anthropic/…)
UI->>AH: execute(inputs.files)
AH->>AH: normalizeFileInput(filesInput)
AH->>AH: getAttachmentProvider(providerId) — guard
Note over AH: xai/deepseek/cerebras pass guard (non-null) ⚠️
AH->>HY: hydrateUserFilesWithBase64(userFiles)
HY-->>AH: UserFile[] with base64
AH->>AH: attach files to last user message
AH->>PR: executeProviderRequest(messages with files)
PR->>AT: buildXxxMessageContent / formatMessagesForProvider
AT->>AT: prepareProviderAttachments
Note over AT: Throws for xai/deepseek/cerebras here
AT-->>PR: formatted content parts
PR-->>AH: ProviderResponse
Reviews (1): Last reviewed commit: "Clean up attachments" | Re-trigger Greptile |
Summary
Brief description of what this PR does and why.
Fixes #(issue)
Type of Change
Testing
How has this been tested? What should reviewers focus on?
Checklist
Screenshots/Videos