[PR #208] [MERGED] refactor(plugin_daemon): simplify InvokeTool function and enhance stream handling #371

Closed
opened 2026-02-16 01:15:46 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-daemon/pull/208
Author: @Yeuoly
Created: 4/15/2025
Status: Merged
Merged: 4/15/2025
Merged by: @Yeuoly

Base: mainHead: feat/stream-tool-blob-message


📝 Commits (2)

  • eff053d refactor(plugin_daemon): simplify InvokeTool function and enhance stream handling
  • 41fbecd fix: buffer size

📊 Changes

4 files changed (+104 additions, -88 deletions)

View changed files

📝 internal/core/plugin_daemon/tool_service.go (+1 -84)
📝 internal/core/plugin_manager/debugging_runtime/hooks.go (+1 -1)
📝 internal/utils/stream/stream.go (+44 -3)
📝 internal/utils/stream/stream_test.go (+58 -0)

📄 Description

  • Removed unnecessary complexity from the InvokeTool function by eliminating the blob handling logic and directly returning the response.
  • Updated the stream implementation to support blocking writes, allowing for better management of data flow when the buffer is full.
  • Added tests for the new blocking write functionality to ensure reliability and performance under high load conditions.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-plugin-daemon/pull/208 **Author:** [@Yeuoly](https://github.com/Yeuoly) **Created:** 4/15/2025 **Status:** ✅ Merged **Merged:** 4/15/2025 **Merged by:** [@Yeuoly](https://github.com/Yeuoly) **Base:** `main` ← **Head:** `feat/stream-tool-blob-message` --- ### 📝 Commits (2) - [`eff053d`](https://github.com/langgenius/dify-plugin-daemon/commit/eff053d639ca7488541ce2bbbdb762bb78a60746) refactor(plugin_daemon): simplify InvokeTool function and enhance stream handling - [`41fbecd`](https://github.com/langgenius/dify-plugin-daemon/commit/41fbecd4d8fff50ee7eebfb61a0e0da7814c65cb) fix: buffer size ### 📊 Changes **4 files changed** (+104 additions, -88 deletions) <details> <summary>View changed files</summary> 📝 `internal/core/plugin_daemon/tool_service.go` (+1 -84) 📝 `internal/core/plugin_manager/debugging_runtime/hooks.go` (+1 -1) 📝 `internal/utils/stream/stream.go` (+44 -3) 📝 `internal/utils/stream/stream_test.go` (+58 -0) </details> ### 📄 Description - Removed unnecessary complexity from the InvokeTool function by eliminating the blob handling logic and directly returning the response. - Updated the stream implementation to support blocking writes, allowing for better management of data flow when the buffer is full. - Added tests for the new blocking write functionality to ensure reliability and performance under high load conditions. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 01:15:46 -05:00
yindo closed this issue 2026-02-16 01:15:46 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#371