fix: handle Message objects in build_output by extracting text attribute#8729
Conversation
WalkthroughA type check was introduced in the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant MCPToolsComponent
participant ToolCoroutine
User->>MCPToolsComponent: Provide tool argument values
MCPToolsComponent->>MCPToolsComponent: Iterate over argument values
alt Value is Message
MCPToolsComponent->>MCPToolsComponent: Extract text attribute
else Value is not Message
MCPToolsComponent->>MCPToolsComponent: Use value as is
end
MCPToolsComponent->>ToolCoroutine: Call with processed arguments
ToolCoroutine-->>MCPToolsComponent: Return result
MCPToolsComponent-->>User: Output result
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (3)`src/backend/base/langflow/components/**/*`: Add new backend components to the appropriate subdirectory under src/backend/base/langflow/components/.
📄 Source: CodeRabbit Inference Engine (.cursor/rules/backend_development.mdc) List of files the instruction was applied to:
`src/backend/**/*component*.py`: In your component class, set the 'icon' attribute to a string matching the frontend icon mapping exactly (case-sensitive).
📄 Source: CodeRabbit Inference Engine (.cursor/rules/icons.mdc) List of files the instruction was applied to:
`src/backend/**/components/**/*.py`: In your component class, set the 'icon' attribute to a string matching the frontend icon mapping exactly (case-sensitive).
📄 Source: CodeRabbit Inference Engine (.cursor/rules/icons.mdc) List of files the instruction was applied to:
⏰ Context from checks skipped due to timeout of 90000ms (2)
🔇 Additional comments (2)
✨ Finishing Touches
🧪 Generate Unit Tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
|
closes #8166 |
…ute (langflow-ai#8729) Update mcp_component.py
…ute (langflow-ai#8729) Update mcp_component.py
Summary by CodeRabbit