Repository navigation
fix(agent): persist plugin blob outputs and show attachments in logs - #43099
Closed
Souravrajvi0 wants to merge 3 commits into
Closed
Souravrajvi0 wants to merge 3 commits into
Souravrajvi0 wants to merge 3 commits into
Conversation
Upload binary plugin tool BLOB outputs through Dify's signed file API instead of stringifying bytes into tool observations. Carry saved file references in ToolReturn metadata, persist assistant MessageFile rows, emit chat file events, include message_files in agent log responses, and render attachments in the log detail panel. Fixes langgenius#42114
Resolve log detail panel import conflict with LoadingPlaceholder refactor and update observability test mock for serialize_log_message session kwarg.
Souravrajvi0
requested review from
BeautyyuYanli,
QuantumGhost,
crazywoola,
laipz8200 and
lyzno1
as code owners
September 28, 2026 18:47
Contributor
Pyrefly Type Coverage
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #43099 +/- ##
==========================================
- Coverage 88.33% 88.32% -0.02%
==========================================
Files 5133 5133
Lines 324423 324493 +70
Branches 65349 65375 +26
==========================================
+ Hits 286593 286618 +25
- Misses 32445 32480 +35
- Partials 5385 5395 +10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
4 of 5 tasks
Contributor
|
Thanks for investigating #42114 and putting together this PR, @Souravrajvi0! We opened a fresh replacement Draft PR against current
Closing this PR in favor of #46219. (This message is automated while I'm responsible for it.) |
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.
Important
Fixes #<issue number>.Summary
Fixes #42114
Reopens the work from #42126 (closed due to merge conflicts with
main).When plugin tools return binary BLOB outputs (for example image generation), the standalone
dify-agentplugin tools layer was stringifying bytes into tool observations (blob=b'\x89PNG...'), inflating model context and omitting generated files from chat and Agents logs.This change:
ToolReturn.metadataMessageFilerows and emits the existing chat file eventRebased onto current
main(conflict resolved inlog-detail-panel.tsxafter the LoadingPlaceholder refactor).Test plan
dify-agentplugin layer tests for blob chunk merge + upload flowdify-agentplugin layer test for image blob upload compact observationmessage_filesserialize_log_message(..., session=)Checklist
make lint && make type-check(backend) andvp staged(frontend) to appease the lint gods