Skip to content

Fix: chat memory store issue and fix output types#8463

Merged
edwinjosechittilappilly merged 8 commits into
mainfrom
fix-chat-memory
Jun 11, 2025
Merged

Fix: chat memory store issue and fix output types#8463
edwinjosechittilappilly merged 8 commits into
mainfrom
fix-chat-memory

Conversation

@Yukiyukiyeah
Copy link
Copy Markdown
Contributor

@Yukiyukiyeah Yukiyukiyeah commented Jun 10, 2025

This pull request introduces enhancements to the MemoryComponent class and related functionality in the Langflow backend. Key changes include improved input handling, new output methods, and updates to message storage and retrieval logic. Additionally, there are minor adjustments to the MessageStoreComponent and a starter project JSON file.

Enhancements to MemoryComponent:

  • Input Handling Updates:

    • Renamed the sender input to sender_type and added a new sender input for specifying the message sender. ([src/backend/base/langflow/components/helpers/memory.pyL51-R65](https://github.com/langflow-ai/langflow/pull/8463/files#diff-1577557cb6086dc21321ae7e4b1535b04795387beff04ea59045b220a9dadba0L51-R65))
    • Set a default empty value for the session_id input to handle cases where it is not explicitly provided. ([src/backend/base/langflow/components/helpers/memory.pyR85](https://github.com/langflow-ai/langflow/pull/8463/files#diff-1577557cb6086dc21321ae7e4b1535b04795387beff04ea59045b220a9dadba0R85))
    • Removed the show property from one of the inputs to simplify the configuration. ([src/backend/base/langflow/components/helpers/memory.pyL88](https://github.com/langflow-ai/langflow/pull/8463/files#diff-1577557cb6086dc21321ae7e4b1535b04795387beff04ea59045b220a9dadba0L88))
  • New Output Methods:

    • Added a new output method retrieve_messages_as_text to retrieve messages as text, complementing the existing retrieve_messages_dataframe method. ([[1]](https://github.com/langflow-ai/langflow/pull/8463/files#diff-1577557cb6086dc21321ae7e4b1535b04795387beff04ea59045b220a9dadba0L101-R112), [[2]](https://github.com/langflow-ai/langflow/pull/8463/files#diff-1577557cb6086dc21321ae7e4b1535b04795387beff04ea59045b220a9dadba0R216-R220))
  • Message Storage and Retrieval Logic:

    • Introduced an async def store_message method to handle storing messages with enhanced validation and support for external memory. ([src/backend/base/langflow/components/helpers/memory.pyR137-R182](https://github.com/langflow-ai/langflow/pull/8463/files#diff-1577557cb6086dc21321ae7e4b1535b04795387beff04ea59045b220a9dadba0R137-R182))
    • Updated the retrieve_messages method to use the new sender_type input and refined the filtering logic. ([src/backend/base/langflow/components/helpers/memory.pyL154-R207](https://github.com/langflow-ai/langflow/pull/8463/files#diff-1577557cb6086dc21321ae7e4b1535b04795387beff04ea59045b220a9dadba0L154-R207))

Adjustments to MessageStoreComponent:

  • Commented out the legacy property, potentially marking the component as non-legacy for future use. ([src/backend/base/langflow/components/helpers/store_message.pyL17-R17](https://github.com/langflow-ai/langflow/pull/8463/files#diff-c873d4f3dd80c34e0163a9060b7a116f076e62e99e5105a0fe11b4e06f99a0faL17-R17))

Starter Project Updates:

  • Modified the Custom Component Maker.json file to include the new retrieve_messages_as_text method and adjusted the configuration for outputs. ([src/backend/base/langflow/initial_setup/starter_projects/Custom Component Maker.jsonL269-R283](https://github.com/langflow-ai/langflow/pull/8463/files#diff-a517d7d5e1e4decfb12711c96ae08e2c6c174241f01e51da60e3dcdb63406822L269-R283))

Summary by CodeRabbit

  • New Features

    • Added a new "sender_type" dropdown input to various Agent and Memory components, allowing users to filter messages by sender type ("Machine", "User", or "Machine and User").
    • Introduced an additional output in Memory components for retrieving messages as formatted text, alongside the existing DataFrame output.
  • Improvements

    • Clarified the "sender" input field in Agent and Memory components by updating its display name and description to better distinguish between sender identity and sender type filtering.
    • Enhanced component flexibility by enabling more explicit sender specification and message retrieval options.

@Yukiyukiyeah Yukiyukiyeah marked this pull request as ready for review June 10, 2025 21:05
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 10, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The changes introduce a new sender_type dropdown input to various agent and memory-related components, distinguishing it from the existing sender input, which is now clarified as the sender's identity. The memory components are updated to support retrieving messages as formatted text via a new output. Numerous starter project JSONs are updated to reflect these input/output changes and clarify sender semantics.

Changes

File(s) Change Summary
src/backend/base/langflow/components/helpers/memory.py Refactored MemoryComponent: added sender_type dropdown input, clarified sender as sender identity, introduced retrieve_messages_as_text output/method, updated message storing/retrieval logic, and adjusted outputs.
src/backend/base/langflow/components/helpers/store_message.py Commented out the legacy = True attribute in MessageStoreComponent. No functional changes.
src/backend/base/langflow/initial_setup/starter_projects/Custom Component Maker.json
.../Meeting Summary.json
.../Memory Chatbot.json
Updated Memory component: added sender_type dropdown input, clarified sender input, added "Message" output for formatted text, updated retrieval/storage logic, and set default for session_id.
src/backend/base/langflow/initial_setup/starter_projects/Financial Agent.json
.../Gmail Agent.json
.../Instagram Copywriter.json
.../Invoice Summarizer.json
.../Market Research.json
.../News Aggregator.json
.../Pokédex Agent.json
.../Price Deal Finder.json
.../Research Agent.json
.../SaaS Pricing.json
.../Search agent.json
.../Sequential Tasks Agents.json
.../Simple Agent.json
.../Social Media Agent.json
.../Travel Planning Agents.json
.../Youtube Analysis.json
In all listed agent starter project JSONs: added new sender_type dropdown input (options: Machine, User, Machine and User), updated sender input's display name and info to clarify sender identity, and updated metadata as needed.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant MemoryComponent

    User->>MemoryComponent: Store message (with sender, sender_type, session_id, etc.)
    MemoryComponent->>MemoryComponent: store_message()
    MemoryComponent->>MemoryComponent: Save message (using sender)
    MemoryComponent->>MemoryComponent: Retrieve messages (filtered by sender_type)
    MemoryComponent-->>User: Return stored message(s)

    User->>MemoryComponent: Retrieve messages as text
    MemoryComponent->>MemoryComponent: retrieve_messages_as_text()
    MemoryComponent->>MemoryComponent: Retrieve messages (filtered by sender_type)
    MemoryComponent->>MemoryComponent: Format messages as text
    MemoryComponent-->>User: Return Message (formatted text)
Loading
sequenceDiagram
    participant User
    participant AgentComponent

    User->>AgentComponent: Provide input (sender, sender_type, ...)
    AgentComponent->>AgentComponent: Use sender_type for filtering messages
    AgentComponent->>AgentComponent: Use sender for storing message sender identity
    AgentComponent-->>User: Return result/output
Loading

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. enhancement New feature or request labels Jun 10, 2025
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

🔭 Outside diff range comments (4)
src/backend/base/langflow/initial_setup/starter_projects/Price Deal Finder.json (1)

2093-2100: 🛠️ Refactor suggestion

Ensure sender default and options align with identity semantics
The sender input now represents the actual message sender (Machine or User) and defers to the “current sender” if empty—but its default value (“Machine and User”) and options list include a combined choice, which conflicts with this purpose. Please revise:

  • Limit options to ["Machine", "User"]
  • Set "value" to "" (empty) to trigger the fallback behavior described in the info text
   "sender": {
     "_input_type": "DropdownInput",
     "advanced": true,
-    "display_name": "Sender",
+    "display_name": "Sender",
     "dynamic": false,
-    "info": "The sender of the message. Might be Machine or User. If empty, the current sender parameter will be used.",
+    "info": "The sender of the message. Might be Machine or User. If empty, the current sender parameter will be used.",
     "name": "sender",
-    "options": [
-      "Machine",
-      "User",
-      "Machine and User"
-    ],
+    "options": ["Machine", "User"],
     "required": false,
     "show": true,
     "title_case": false,
     "tool_mode": false,
     "trace_as_metadata": true,
     "type": "str",
-    "value": "Machine and User"
+    "value": ""
   },
src/backend/base/langflow/initial_setup/starter_projects/SaaS Pricing.json (1)

1139-1159: ⚠️ Potential issue

Misconfigured sender input options
The sender field should capture the actual message sender identity and thus only needs the two options “Machine” and “User”. Including “Machine and User” here duplicates the new filter input’s purpose and can confuse downstream logic.
Apply this diff:

 "sender": {
   …
-  "options": [
-    "Machine",
-    "User",
-    "Machine and User"
-  ],
+  "options": [
+    "Machine",
+    "User"
+  ],
   …
 }
src/backend/base/langflow/components/helpers/memory.py (1)

130-134: ⚠️ Potential issue

Update method to reflect the new dual outputs.

The update_outputs method should show both the text and dataframe outputs in Retrieve mode to match the component's output configuration.

Apply this diff to show both outputs:

            if field_value == "Retrieve":
                frontend_node["outputs"] = [
                    Output(
-                        display_name="Messages", name="dataframe", method="retrieve_messages_dataframe", dynamic=True
+                        display_name="Message", name="messages_text", method="retrieve_messages_as_text", dynamic=True
+                    ),
+                    Output(
+                        display_name="Dataframe", name="dataframe", method="retrieve_messages_dataframe", dynamic=True
                    )
                ]
src/backend/base/langflow/initial_setup/starter_projects/Memory Chatbot.json (1)

1686-1710: ⚠️ Potential issue

Fix input type mismatch for sender field.

The sender field is still configured as a DropdownInput but should be a MessageTextInput to match the Python component definition. The options array should be removed.

              "sender": {
-               "_input_type": "DropdownInput",
+               "_input_type": "MessageTextInput",
                "advanced": true,
-               "combobox": false,
-               "dialog_inputs": {},
                "display_name": "Sender",
                "dynamic": false,
                "info": "The sender of the message. Might be Machine or User. If empty, the current sender parameter will be used.",
+               "input_types": [
+                 "Message"
+               ],
                "name": "sender",
-               "options": [
-                 "Machine",
-                 "User",
-                 "Machine and User"
-               ],
-               "options_metadata": [],
                "placeholder": "",
                "required": false,
                "show": false,
                "title_case": false,
-               "toggle": false,
                "tool_mode": false,
                "trace_as_metadata": true,
                "type": "str",
-               "value": "Machine and User"
+               "value": ""
              },
♻️ Duplicate comments (2)
src/backend/base/langflow/initial_setup/starter_projects/Financial Agent.json (2)

3560-3565: Refine 'sender' input display and info (duplicate)
Same update applied to the second Agent node template.


3605-3629: Add sender_type filter input (duplicate)
Same sender_type addition in the second Agent node template.

🧹 Nitpick comments (4)
src/backend/base/langflow/components/helpers/store_message.py (1)

17-17: Consider removing or deprecating the legacy flag.

The legacy = True line is commented out, effectively disabling legacy mode. If legacy support is fully deprecated, please delete this line or add a deprecation notice to clarify intent.

src/backend/base/langflow/initial_setup/starter_projects/Search agent.json (1)

1528-1540: Clarify the semantics of the renamed sender input.

You’ve repurposed the sender dropdown by renaming its display name and expanding options to include "Machine and User". Please verify this input is meant strictly for filtering. If it’s intended to capture an arbitrary sender identifier, consider switching to a text input. Otherwise, update its description to clearly differentiate it from the new sender_type field.

src/backend/base/langflow/initial_setup/starter_projects/Social Media Agent.json (1)

1776-1785: Limit sender options to actual identity
The sender dropdown now represents the message’s actual sender. Including a “Machine and User” option here blurs its purpose—this combined selection belongs to filtering. Please restrict sender to singular values (“Machine” or “User”) and reserve “Machine and User” for the sender_type input.

src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json (1)

2836-2838: Update sender input semantics
Renaming the sender input to represent the actual sender string with updated display name and info aligns with PR objectives. Don’t forget to adjust the node’s field_order if the UI order needs to reflect this change.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7be8161 and bf76224.

📒 Files selected for processing (21)
  • src/backend/base/langflow/components/helpers/memory.py (7 hunks)
  • src/backend/base/langflow/components/helpers/store_message.py (1 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Custom Component Maker.json (4 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Financial Agent.json (4 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Gmail Agent.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Invoice Summarizer.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Market Research.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json (4 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Memory Chatbot.json (4 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/News Aggregator.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Pokédex Agent.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Price Deal Finder.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Research Agent.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/SaaS Pricing.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Search agent.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks Agents.json (6 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Simple Agent.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Social Media Agent.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Travel Planning Agents.json (6 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Youtube Analysis.json (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Update Starter Projects
🔇 Additional comments (42)
src/backend/base/langflow/initial_setup/starter_projects/Search agent.json (1)

1574-1598: Approve sender_type addition.

The new sender_type dropdown for filtering by sender category (defaulting to "Machine and User") correctly complements the backend changes in memory retrieval. Ensure it’s wired through get_memory_data and properly surfaced in the UI.

src/backend/base/langflow/initial_setup/starter_projects/Youtube Analysis.json (1)

1620-1622: Update existing sender input metadata
The display name and info text for the sender dropdown have been correctly updated to reflect that it specifies the message sender.

src/backend/base/langflow/initial_setup/starter_projects/News Aggregator.json (2)

1415-1418: Clarified "sender" input display_name and info
Renaming display_name to "Sender" and updating its info text accurately distinguishes this field as the actual message sender identity, decoupling it from type filtering.


1457-1481: Introduced "sender_type" dropdown for filtering
Adding a dedicated sender_type input with options and default aligns with the updated component inputs. Verify that this advanced field’s visibility and UI toggle behavior are consistent with other starter projects.

src/backend/base/langflow/initial_setup/starter_projects/Simple Agent.json (2)

1716-1718: Clarify sender input semantics
Updated display_name and info correctly distinguish this field as the actual sender identifier rather than filtering criteria, matching the new split between sender and sender_type.


1759-1783: Introduce sender_type dropdown for filtering
Adds a dedicated sender_type input with appropriate options and default value to enable explicit filtering by message origin. Configuration aligns with PR objectives.

src/backend/base/langflow/initial_setup/starter_projects/Gmail Agent.json (2)

589-591: Approve rename of sender input metadata
The display_name change from "Sender Type" to "Sender" and the updated info text clearly distinguish this as the actual message sender.


631-655: Approve addition of sender_type dropdown input
The new sender_type field is correctly defined with the expected options, default, and metadata flags for filtering by sender type.

src/backend/base/langflow/initial_setup/starter_projects/Research Agent.json (1)

1421-1423: Separate semantics: updated display_name and info for sender
Renaming the dropdown’s display_name to "Sender" and clarifying its info text correctly distinguishes the actual sender identity from filtering options.

src/backend/base/langflow/initial_setup/starter_projects/Financial Agent.json (2)

2785-2788: Refine 'sender' input display and info
Renaming display_name to "Sender" and clarifying the info message correctly distinguishes this field as the actual sender value. The updated options and input_types accurately cover the intended use.


2830-2854: Add sender_type filter input
Introducing the new sender_type dropdown allows explicit filtering by message category. Please verify that "sender_type" has been added to the component’s field_order array so it appears in the correct order in the UI.

src/backend/base/langflow/initial_setup/starter_projects/Social Media Agent.json (1)

1818-1842: Approve new sender_type filter input
Adding a dedicated sender_type dropdown for filtering by sender category is on target. Verify that the default ("Machine and User") and the toggle property render and function correctly in the frontend.

src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json (2)

1787-1808: Clarify the 'sender' input semantics
Renaming display_name to “Sender” and updating the info text clearly distinguishes this field as the actual sender identifier (with fallback behavior). This change aligns with the MemoryComponent pattern.


1831-1855: Introduce the new 'sender_type' filter input
Adding an advanced sender_type dropdown with options ["Machine", "User", "Machine and User"] correctly surfaces explicit filtering by sender type. The metadata matches other components’ patterns.

src/backend/base/langflow/initial_setup/starter_projects/Pokédex Agent.json (1)

1787-1799: Display name and info update for sender input
The display_name is correctly renamed from “Sender Type” to “Sender,” and the updated info text now clearly explains fallback behavior when the field is empty. This matches the PR objectives and improves clarity.

src/backend/base/langflow/initial_setup/starter_projects/SaaS Pricing.json (1)

1182-1206: Validate the new sender_type filter input
The added sender_type dropdown correctly provides filtering by sender type (Machine, User, Machine and User). Ensure that UI consumers and your retrieval logic reference this field for filtering, not the sender input.

src/backend/base/langflow/initial_setup/starter_projects/Invoice Summarizer.json (1)

1689-1696: The sender input metadata update looks good
Renamed display_name to “Sender” and updated info to reflect its role as the message sender. The added input_types constraint is appropriate.

src/backend/base/langflow/initial_setup/starter_projects/Travel Planning Agents.json (6)

2169-2171: Clarify existing sender input display name and info
Renaming display_name from “Sender Type” to “Sender” and updating the info text to clearly describe its purpose aligns with the PR’s intent to separate filtering and identity.


2211-2235: Introduce new sender_type dropdown for filtering
Adding the advanced sender_type input with options ["Machine", "User", "Machine and User"] and default “Machine and User” completes the split between identity and filter. This matches the standardized pattern across components.


2937-2939: Clarify existing sender input display name and info
Consistent with the City Selection Agent change, renaming and info update for the Local Expert Agent’s sender input improves clarity.


2979-3003: Introduce new sender_type dropdown for filtering
The Local Expert Agent now has a dedicated sender_type input for explicit message‐type filtering, defaulting to “Machine and User.” Good alignment with PR objectives.


3705-3707: Clarify existing sender input display name and info
Updating the Travel Concierge Agent’s sender input name and description ensures users understand it specifies the message sender, distinct from filtering.


3747-3771: Introduce new sender_type dropdown for filtering
Adding sender_type to the Travel Concierge Agent aligns it with other agents, enabling explicit control over which sender types to include.

src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks Agents.json (6)

784-787: Clarify sender input naming and description
The sender dropdown’s display_name and info have been updated to distinguish it from the new filter field. This aligns with the PR’s pattern of splitting identification from filtering.


824-848: Introduce sender_type filtering dropdown
The new sender_type input provides explicit sender-type filtering (Machine/User/Bachine and User), matching other templates in this PR.


1476-1478: Update sender input for Analysis & Editor Agent
Display name and info text for sender have been adjusted consistently to represent actual message origin.


1516-1540: Add sender_type dropdown to Analysis & Editor Agent
This new filter input lets users select which sender types to include, in line with overall PR objectives.


2994-2996: Refine sender input for Researcher Agent
The sender field’s metadata now clearly indicates it captures the message sender, distinct from the filtering control.


3034-3058: Add sender_type filter to Researcher Agent
Introduces the sender_type selector to enable fine-grained sender-type filtering (Machine/User/Both).

src/backend/base/langflow/components/helpers/memory.py (7)

4-4: LGTM! Import added for the new text formatting functionality.

The data_to_text helper is correctly imported and used in the new retrieve_messages_as_text method.


52-65: Good separation of concerns between sender filtering and identification.

The refactoring to separate sender_type (for filtering) and sender (for identification) improves the component's clarity and usability.


85-85: Appropriate default value for session_id.

Setting an empty string as the default allows the component to use the current session ID when not explicitly provided.


109-112: Dual outputs provide good flexibility.

The addition of both text and dataframe outputs allows users to choose the most suitable format for their use case.


155-157: Verify the sender filtering logic in external memory storage.

The code filters stored messages by the sender after storing (line 156), which means it only returns messages from the same sender that was just stored. Is this the intended behavior? Consider whether you want to return all stored messages or just those from the current sender.


216-220: Well-implemented text formatting method.

The new retrieve_messages_as_text method properly leverages the existing retrieval logic and formats the output as text using the configured template.


206-212:

Details

✅ Verification successful

Verify parameter consistency with aget_messages function.

The code passes sender_type to the sender parameter of aget_messages. Ensure this parameter name alignment is intentional and that the aget_messages function correctly handles sender type filtering.


🏁 Script executed:

#!/bin/bash
# Description: Check the signature and implementation of aget_messages to verify parameter handling

# Find and display the aget_messages function definition
ast-grep --pattern 'async def aget_messages($$$) {
  $$$
}'

# Also search with ripgrep for more context
rg -A 10 "async def aget_messages"

Length of output: 1775


Parameter name ‘sender’ correctly matches aget_messages signature

The call at line 207 uses sender=sender_type, which aligns with the async def aget_messages(sender: str | None = None, …) definition. No changes required.

src/backend/base/langflow/initial_setup/starter_projects/Memory Chatbot.json (2)

1532-1556: Output configuration correctly reflects the dual output design.

The JSON properly configures both the text message output and dataframe output to match the Python component implementation.


1734-1758: Correct configuration for the new sender_type input.

The sender_type dropdown is properly configured with the three filtering options to match the Python component.

src/backend/base/langflow/initial_setup/starter_projects/Custom Component Maker.json (3)

268-283: Outputs updated to include text retrieval
The new outputs for retrieve_messages_as_text and retrieve_messages_dataframe align with the component changes and are correctly configured.


314-314: The large code string for the Memory component was updated; this is autogenerated and appears in line with the implementation changes.


420-422: Clarified display name for Sender input
Renaming "display_name" from "Sender Type" to "Sender" accurately reflects its purpose. The updated info text also clarifies behavior when left empty.

src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json (1)

2678-2690: Add new text output for message retrieval
The messages_text output using retrieve_messages_as_text is correctly added alongside the DataFrame output. Ensure the front-end logic in update_outputs and downstream UI templates accommodate this new output.

Comment on lines +1662 to +1686
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Missing field ordering and trace configuration for new sender_type input
The newly added sender_type field isn’t listed in the component’s field_order (so it won’t appear in the UI), and it lacks a "trace_as_input": true property for consistency with other inputs.

Apply this diff to fix both issues:

--- a/src/backend/base/langflow/initial_setup/starter_projects/Youtube Analysis.json
+++ b/src/backend/base/langflow/initial_setup/starter_projects/Youtube Analysis.json
@@ "field_order": [
-    "sender",
-    "sender_name",
+    "sender",
+    "sender_type",
+    "sender_name",
@@ "sender_type": {
-    "trace_as_metadata": true,
+    "trace_as_input": true,
+    "trace_as_metadata": true,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
// … elsewhere in the same JSON …
"field_order": [
"sender",
"sender_type",
"sender_name",
// … other fields …
],
// … later, in the inputs map …
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_input": true,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
// … remainder of JSON …
🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Youtube
Analysis.json around lines 1662 to 1686, the new sender_type input is missing
from the component's field_order array, so it won't be displayed in the UI, and
it lacks the "trace_as_input": true property which is needed for consistent
tracing like other inputs. To fix this, add "sender_type" to the field_order
list in the component configuration and include "trace_as_input": true in the
sender_type input definition.

Comment on lines +2139 to +2163
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add sender_type to the UI field order and remove unused toggle property
The new sender_type dropdown is defined but not present in the node’s field_order, so it won’t appear in the editor. Also, the toggle property is not used by other inputs. Please:

  1. Remove "toggle": false
  2. Insert "sender_type" into the parent node’s field_order immediately after "sender"
   // In the node’s field_order array:
-  "memory",
-  "sender",
+  "memory",
+  "sender",
+  "sender_type",
   "sender_name",
   "n_messages",
   "session_id",
   // ...
   "sender_type": {
     "_input_type": "DropdownInput",
     "advanced": true,
-    "combobox": false,
-    "dialog_inputs": {},
+    "combobox": false,
+    "dialog_inputs": {},
     "display_name": "Sender Type",
     "dynamic": false,
     "info": "Filter by sender type.",
     "name": "sender_type",
     "options": [
       "Machine",
       "User",
       "Machine and User"
     ],
     "options_metadata": [],
     "placeholder": "",
     "required": false,
     "show": true,
     "title_case": false,
-    "toggle": false,
     "tool_mode": false,
     "trace_as_metadata": true,
     "type": "str",
     "value": "Machine and User"
   },

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Price Deal
Finder.json around lines 2139 to 2163, the sender_type dropdown is missing from
the node's field_order, so it won't show in the editor, and the toggle property
is unused. Remove the "toggle": false property from the sender_type definition
and add "sender_type" to the parent node's field_order array immediately after
the "sender" entry to ensure it appears correctly in the UI.

Comment on lines +1681 to +1705
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Critical: Add sender_type to field_order for visibility
The new sender_type input is defined but not listed in the node’s field_order. Without it, this filter won’t appear in the UI. Insert "sender_type" into the field_order array at the desired position (e.g., immediately after "sender").

Example diff around the field_order (near line 1219):

  "field_order": [
     ...,
     "memory",
     "sender",
+    "sender_type",
     "sender_name",
     "n_messages",
     ...
  ],
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
"field_order": [
...,
"memory",
"sender",
"sender_type",
"sender_name",
"n_messages",
...
],
🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Market Research.json
around lines 1681 to 1705, the new "sender_type" input is defined but missing
from the node's "field_order" array, preventing it from appearing in the UI. To
fix this, locate the "field_order" array (near line 1219) and insert
"sender_type" into it at the appropriate position, such as immediately after
"sender", ensuring the filter becomes visible in the interface.

Comment on lines +1641 to +1643
"display_name": "Sender",
"dynamic": false,
"info": "Filter by sender type.",
"info": "The sender of the message. Might be Machine or User. If empty, the current sender parameter will be used.",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Critical: sender input type should be free-text for message sender
The PR summary indicates the existing sender input is renamed to sender_type, and a new sender input must accept arbitrary sender identifiers. Here, sender remains a DropdownInput with fixed options, which contradicts its intended use. Update _input_type to MessageTextInput and remove the options array to allow free-text input.

Suggested diff:

  "sender": {
-   "_input_type": "DropdownInput",
+   "_input_type": "MessageTextInput",
    "display_name": "Sender",
    "info": "The sender of the message. Might be Machine or User. If empty, the current sender parameter will be used.",
-   "options": [
-     "Machine",
-     "User",
-     "Machine and User"
-   ],
+   // remove options/combobox/toggle fields
    "name": "sender",
    "type": "str",
-   "value": "Machine and User"
+   "value": ""
  },
🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Market Research.json
around lines 1641 to 1643, the `sender` input is incorrectly defined as a
DropdownInput with fixed options, but it should accept free-text input for
arbitrary sender identifiers. Change the `_input_type` of `sender` to
`MessageTextInput` and remove the `options` array to enable free-text input as
intended.

Comment on lines +1461 to +1485
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Missing inclusion of sender_type in field_order
The new sender_type input is defined but not listed in the node’s field_order, so it won’t render in the UI.

Apply this diff to insert "sender_type" after "sender_name" in the field_order array:

--- a/src/backend/base/langflow/initial_setup/starter_projects/Research Agent.json
+++ b/src/backend/base/langflow/initial_setup/starter_projects/Research Agent.json
@@ -991,7 +991,8 @@
     "field_order": [
       "agent_llm",
       /* ... other fields ... */,
       "memory",
-      "sender",
+      "sender",
+      "sender_type",
       "sender_name",
       "n_messages",
       /* ... remaining fields ... */
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
"field_order": [
"agent_llm",
/* ... other fields ... */,
"memory",
"sender",
"sender_type",
"sender_name",
"n_messages",
/* ... remaining fields ... */
]
🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Research Agent.json
around lines 1461 to 1485, the new "sender_type" input is defined but missing
from the node's "field_order" array, preventing it from rendering in the UI. To
fix this, locate the "field_order" array in the same JSON object and insert the
string "sender_type" immediately after "sender_name" to ensure the input appears
in the correct order in the interface.

Comment on lines 1835 to 1859
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add sender_type filter input but update field ordering
The new sender_type dropdown is configured with the right options and default value. To ensure it’s visible in the UI, add "sender_type" into the Agent component’s field_order array immediately after "sender":

--- a/src/backend/base/langflow/initial_setup/starter_projects/Pokédex Agent.json
+++ b/src/backend/base/langflow/initial_setup/starter_projects/Pokédex Agent.json
@@ -1284,7 +1284,8 @@
             "memory",
             "sender",
-            "sender_name",
+            "sender_type",
+            "sender_name",
             "n_messages",
             "session_id",
             "order",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
"memory",
"sender",
"sender_type",
"sender_name",
"n_messages",
"session_id",
"order",
🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Pokédex Agent.json
between lines 1835 and 1859, the new "sender_type" dropdown input is correctly
defined but missing from the Agent component's field_order array. To fix this,
locate the Agent component's field_order array and insert "sender_type"
immediately after "sender" to ensure the dropdown appears in the UI in the
correct order.

Comment on lines +1735 to +1759
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

New sender_type input not included in UI field order
You’ve added a sender_type dropdown for filtering, but the Agent node’s field_order array isn’t updated to include it—this will hide the control in the UI.

Proposed fix (insert after "sender" in the Agent node’s field_order):

   "field_order": [
     /* ... */
     "memory",
-    "sender",
+    "sender",
+    "sender_type",
     "sender_name",
     "n_messages",
     "session_id",
     /* ... */
   ],
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
"field_order": [
/* ... */
"memory",
"sender",
"sender_type",
"sender_name",
"n_messages",
"session_id",
/* ... */
],
🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Invoice
Summarizer.json around lines 1735 to 1759, the new "sender_type" dropdown input
is missing from the Agent node's "field_order" array, causing it to be hidden in
the UI. To fix this, locate the Agent node's "field_order" array and insert
"sender_type" immediately after "sender" to ensure the dropdown appears in the
correct order in the UI.

Comment on lines +460 to +484
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

New sender_type input missing from field_order
You’ve added a sender_type DropdownInput, but the component’s field_order still lacks "sender_type". Without this, the UI may not surface the field in the intended position.

Apply this diff to include it:

 "field_order": [
-  "memory",
+  "memory",
+  "sender_type",
   "sender",
   "sender_name",
   "n_messages",
   "session_id",
   "order",
   "template"
 ]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
"field_order": [
"memory",
"sender_type",
"sender",
"sender_name",
"n_messages",
"session_id",
"order",
"template"
]
🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Custom Component
Maker.json around lines 460 to 484, the new "sender_type" DropdownInput is
missing from the component's "field_order" array. To fix this, locate the
"field_order" property in the JSON and add "sender_type" to the list in the
desired position to ensure the UI displays the field correctly.

Comment on lines +2879 to +2903
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Insert new sender_type dropdown input
The new sender_type input for filtering by sender type is correctly defined. To ensure it appears in the UI, add "sender_type" to the node’s field_order array.

Apply this diff to include it:

 "field_order": [
-  "memory",
-  "sender",
+  "memory",
+  "sender_type",
+  "sender",
   "sender_name",
   "n_messages",
   "session_id",
   "order",
   "template"
 ]

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json
around lines 2879 to 2903, the new "sender_type" dropdown input is defined but
not visible in the UI because it is missing from the node's "field_order" array.
To fix this, locate the "field_order" array in the same node and add the string
"sender_type" to it, ensuring the input appears in the correct order in the UI.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 16

🔭 Outside diff range comments (5)
src/backend/base/langflow/initial_setup/starter_projects/Youtube Analysis.json (1)

1615-1638: ⚠️ Potential issue

Critical: Incorrect input type for sender
The new sender field should accept arbitrary sender names (free‐text), not be limited to dropdown choices. Update _input_type from DropdownInput to MessageTextInput, remove options, and adjust input metadata accordingly.

Apply this diff:

-  "sender": {
-    "_input_type": "DropdownInput",
-    "advanced": true,
-    "combobox": false,
-    "dialog_inputs": {},
-    "display_name": "Sender",
-    "dynamic": false,
-    "info": "The sender of the message. Might be Machine or User. If empty, the current sender parameter will be used.",
-    "name": "sender",
-    "options": [
-      "Machine",
-      "User",
-      "Machine and User"
-    ],
-    "options_metadata": [],
-    "placeholder": "",
-    "required": false,
-    "show": true,
-    "title_case": false,
-    "tool_mode": false,
-    "trace_as_metadata": true,
-    "type": "str",
-    "value": "Machine and User"
-  },
+  "sender": {
+    "_input_type": "MessageTextInput",
+    "advanced": true,
+    "display_name": "Sender",
+    "dynamic": false,
+    "info": "Specify the exact sender identifier (e.g., username or ID). Leave empty to use current sender.",
+    "name": "sender",
+    "placeholder": "",
+    "required": false,
+    "show": true,
+    "title_case": false,
+    "tool_mode": false,
+    "trace_as_input": true,
+    "trace_as_metadata": true,
+    "type": "str",
+    "value": ""
+  },
src/backend/base/langflow/initial_setup/starter_projects/Market Research.json (1)

1638-1658: ⚠️ Potential issue

Critical: sender input should be a free-form text input, not a dropdown

The new sender field is meant to specify the actual message sender (e.g. a user-defined name), but it’s still defined as a DropdownInput with filter options—duplicating sender_type. Please change it to a text input (e.g. MessageTextInput) without preset options.

Proposed diff:

-        "sender": {
-            "_input_type": "DropdownInput",
+        "sender": {
+            "_input_type": "MessageTextInput",
             "advanced": true,
-            "display_name": "Sender",
-            "dynamic": false,
-            "info": "The sender of the message. Might be Machine or User. If empty, the current sender parameter will be used.",
+            "display_name": "Sender",
+            "dynamic": false,
+            "info": "Name of the message sender (free-form).",
             "name": "sender",
-            "options": [
-                "Machine",
-                "User",
-                "Machine and User"
-            ],
-            "placeholder": "",
-            "required": false,
-            "show": true,
-            "title_case": false,
-            "tool_mode": false,
-            "trace_as_metadata": true,
-            "type": "str",
-            "value": "Machine and User"
+            "placeholder": "",
+            "required": false,
+            "show": true,
+            "title_case": false,
+            "tool_mode": false,
+            "trace_as_input": true,
+            "type": "str",
+            "value": ""
         },
src/backend/base/langflow/initial_setup/starter_projects/Price Deal Finder.json (1)

2092-2102: 🛠️ Refactor suggestion

Restrict identity options to valid sender values

The sender input defines the message identity and should only allow "Machine" or "User". The "Machine and User" option belongs to the filter (sender_type) and not to the actual sender identity.

Apply this diff to fix the sender options:

 "sender": {
-  "options": [
-    "Machine",
-    "User",
-    "Machine and User"
-  ],
+  "options": [
+    "Machine",
+    "User"
+  ],
 }
src/backend/base/langflow/components/helpers/memory.py (1)

175-214: 💡 Verification agent

🧩 Analysis chain

Verify the sender type filtering logic.

The filtering logic at lines 203-204 compares m.type with expected_type, but there might be a mismatch between the dropdown values ("Machine", "User") and the actual message type constants used in the Message class.


🏁 Script executed:

#!/bin/bash
# Description: Verify the message type constants match the dropdown values

# Check the actual values of MESSAGE_SENDER_AI and MESSAGE_SENDER_USER constants
echo "Checking MESSAGE_SENDER constants:"
rg -A 2 -B 2 'MESSAGE_SENDER_(AI|USER)\s*=' src/backend/

# Check how message.type is set in the Message class
echo -e "\nChecking Message class type field:"
ast-grep --pattern 'class Message {
  $$$
  type $$$
  $$$
}'

# Look for Message class definition and type assignment
echo -e "\nChecking Message class implementation:"
fd -e py | xargs rg -l "class Message" | xargs rg -A 10 -B 5 "\.type\s*="

Length of output: 2549


🏁 Script executed:

#!/bin/bash
# Display the first 200 lines of the Message class implementation
sed -n '1,200p' src/backend/base/langflow/schema/message.py

Length of output: 7306


Fix sender type filtering in retrieve_messages.

The code currently filters on m.type, but Message instances use the sender field for "Machine"/"User". Update the filter to use m.sender.

• File: src/backend/base/langflow/components/helpers/memory.py
Lines ~203–204

-    stored = [m for m in stored if m.type == expected_type]
+    stored = [m for m in stored if m.sender == expected_type]
🧰 Tools
🪛 Ruff (0.11.9)

214-214: Add quotes to type expression in typing.cast()

Add quotes

(TC006)

src/backend/base/langflow/initial_setup/starter_projects/Memory Chatbot.json (1)

1687-1693: ⚠️ Potential issue

Remove or integrate the unused sender field

The sender input is defined here but never referenced by the retrieval logic (which uses only sender_type). Either incorporate this field into your filtering in retrieve_messages, or remove it entirely to avoid dead configuration.

♻️ Duplicate comments (2)
src/backend/base/langflow/initial_setup/starter_projects/Financial Agent.json (2)

3558-3581: Update sender input display_name and metadata
Same pattern applied to the second Agent node’s sender input—changes are consistent and correct.


3605-3629: Missing input_types on new sender_type input
Ensure the sender_type input in the second Agent node also declares "input_types": ["Message"].

🧹 Nitpick comments (6)
src/backend/base/langflow/components/helpers/store_message.py (1)

17-17: Commented-out legacy flag: consider cleanup or documentation.
The legacy = True attribute was only commented out, leaving vestigial code. Please either remove the line entirely or add a deprecation note explaining its purpose to avoid dead code and maintain clarity.

src/backend/base/langflow/initial_setup/starter_projects/Youtube Analysis.json (1)

1662-1686: Nitpick: Remove unsupported toggle property
The DropdownInput definition for sender_type includes a toggle field, which isn’t used elsewhere for dropdowns. Removing it will keep the schema consistent with other DropdownInput entries.

src/backend/base/langflow/initial_setup/starter_projects/Search agent.json (1)

1527-1550: Mismatch between info text and options
The info for the sender input only mentions “Machine or User,” but the dropdown also includes “Machine and User.” This can confuse end users. Please update the description to cover all three options.

For example:

"sender": {
  …
- "info": "The sender of the message. Might be Machine or User. If empty, the current sender parameter will be used.",
+ "info": "The sender of the message. Can be Machine, User, or Machine and User. If empty, the current sender parameter will be used.",
  …
}
src/backend/base/langflow/initial_setup/starter_projects/Price Deal Finder.json (1)

2158-2158: Remove extraneous toggle property

The toggle key isn’t part of the standard DropdownInput schema and may be ignored or cause confusion. Please remove this line.

-    "toggle": false,
src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json (1)

2833-2855: Clarify sender vs. sender_type inputs
The sender input now represents the exact sender identity, distinct from the new sender_type filter. Consider enhancing the info text or display name to clearly communicate this separation to users and prevent confusion in configuration.

src/backend/base/langflow/initial_setup/starter_projects/Memory Chatbot.json (1)

1532-1542: Clarify text output naming

The new output uses display_name: "Message" and name: "messages_text", which may be confusing alongside the DataFrame output. Consider renaming the text output’s display_name to something like "Messages Text" or "Text" for clarity and consistency with the messages_text field.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7be8161 and bf76224.

📒 Files selected for processing (21)
  • src/backend/base/langflow/components/helpers/memory.py (7 hunks)
  • src/backend/base/langflow/components/helpers/store_message.py (1 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Custom Component Maker.json (4 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Financial Agent.json (4 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Gmail Agent.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Invoice Summarizer.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Market Research.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json (4 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Memory Chatbot.json (4 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/News Aggregator.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Pokédex Agent.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Price Deal Finder.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Research Agent.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/SaaS Pricing.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Search agent.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks Agents.json (6 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Simple Agent.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Social Media Agent.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Travel Planning Agents.json (6 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Youtube Analysis.json (2 hunks)
🔇 Additional comments (32)
src/backend/base/langflow/initial_setup/starter_projects/News Aggregator.json (2)

1415-1417: Update sender input metadata for clarity.
The sender input’s display name has been changed to "Sender" and its info text refined to distinguish it from the new filter. This correctly separates identity from filtering semantics as intended.


1457-1481: Added sender_type filter dropdown.
A new sender_type dropdown input is introduced to filter messages by type ("Machine", "User", "Machine and User"), matching the updated MemoryComponent API. This aligns well with the enhanced filtering logic.

src/backend/base/langflow/initial_setup/starter_projects/Gmail Agent.json (1)

589-591: Rename of Sender input is consistent.

The display_name has been changed from “Sender Type” to “Sender” and the info text now clearly describes its purpose and fallback behavior.

src/backend/base/langflow/initial_setup/starter_projects/Social Media Agent.json (1)

1776-1778: Consistent labelling for sender input

Renaming the sender display_name to "Sender" and updating its info text to clarify it represents the actual message sender correctly distinguishes it from the filtering field.

src/backend/base/langflow/initial_setup/starter_projects/Pokédex Agent.json (1)

1835-1859: Approve: New sender_type filter input

The sender_type dropdown is correctly added to filter messages by origin, with proper display name, info text, and three option values. This aligns with the backend sender_type parameter in MemoryComponent.

src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json (2)

1788-1808: Clarified sender display and info
The sender input’s display_name is now “Sender” (instead of “Sender Type”) and its info text has been updated to specify that it represents the actual message sender. Confirm that downstream code (e.g., MemoryComponent and ChatOutput) correctly references sender for identity, not filtering.


1831-1855: Added sender_type filter dropdown
A new sender_type dropdown has been introduced with options “Machine”, “User”, and “Machine and User”, defaulting to the combined view for backward compatibility. Ensure that the component logic consumes sender_type to filter messages appropriately and that the UI toggle behavior matches other starter projects.

src/backend/base/langflow/initial_setup/starter_projects/Research Agent.json (2)

1421-1423: Clarified existing sender input
The display name has been updated from "Sender Type" to "Sender" and the info text now correctly explains that it represents the message sender.


1461-1485: Added new sender_type dropdown
A dedicated sender_type filter with the expected options and default value has been introduced to distinguish sender identity from sender filtering.

src/backend/base/langflow/initial_setup/starter_projects/Simple Agent.json (1)

1716-1718: Clarify sender input identity
Renaming the display name to “Sender” and updating its info accurately reflects its role as the actual message sender, distinct from filtering.

src/backend/base/langflow/initial_setup/starter_projects/SaaS Pricing.json (2)

1139-1159: Verify identity dropdown options for the sender input
The sender input block now uses a dropdown with options ["Machine", "User", "Machine and User"], but this field is meant to specify a single message sender (not a filter). Please confirm whether including "Machine and User" here is intentional, or if it should be restricted to the individual sender types only.


1182-1206: New sender_type filter input looks correct
This addition cleanly separates filtering concerns (sender_type) from specifying the actual sender (sender). The display name, info text, and options align with the updated component logic.

src/backend/base/langflow/initial_setup/starter_projects/Financial Agent.json (1)

2785-2790: Update sender input display_name and metadata
The sender dropdown now has a clearer display_name, updated info, and an input_types array, which aligns with the pattern used in other components.

src/backend/base/langflow/initial_setup/starter_projects/Travel Planning Agents.json (1)

2169-2171: Approve renaming for clarity.

Updating the sender dropdown’s display name to "Sender" and clarifying its info text is consistent and improves UX.

src/backend/base/langflow/initial_setup/starter_projects/Invoice Summarizer.json (2)

1690-1695: Clarify Sender identity input
The sender field is now correctly labeled and scoped to specify the exact message sender. The updated display_name, info, and input_types align with its intended purpose.


1735-1759: Add dedicated Sender Type filter
Introducing sender_type as a separate dropdown for filtering by sender category is consistent with the new design. Defaulting to “Machine and User” covers all cases out of the box.

src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks Agents.json (3)

784-786: Approve: Clarified ‘sender’ input for message origin
The existing sender field’s display_name and info have been updated to clearly represent the actual message sender. This aligns with the backend changes distinguishing sender identity from sender filtering.


1476-1478: Approve: Clarified ‘sender’ input for Analysis & Editor Agent
The sender field’s display name and tooltip have been updated to specify the actual message sender, improving clarity.


2994-2996: Approve: Clarified ‘sender’ input for Researcher Agent
The sender input’s metadata has been updated to represent the message origin clearly. This matches the backend’s separation of sender identity and filtering.

src/backend/base/langflow/components/helpers/memory.py (5)

4-4: LGTM!

The import is correctly added to support the new retrieve_messages_as_text method.


59-65: LGTM!

The new sender input is well-configured and clearly documented. The separation of sender identity from sender type filtering improves the component's flexibility.


85-85: LGTM!

Adding a default empty string value for session_id is a good practice to handle cases where it's not provided.


137-173: LGTM!

The store_message method implementation correctly handles the new sender input with appropriate fallback logic and maintains backward compatibility.


216-219: LGTM!

The retrieve_messages_as_text method is well-implemented, reusing existing logic and providing a clean text output format.

src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json (3)

2679-2694: Add dual outputs for Message History
The MemoryComponent now exposes two distinct outputs—messages_text via retrieve_messages_as_text for a formatted Message and dataframe via retrieve_messages_dataframe for tabular data—aligning the starter project with the core helper implementation. Ensure these JSON keys (messages_text, dataframe) correctly map to component outputs in the Playground UI.


2879-2902: Approve new sender_type filter input
Introducing sender_type as a dropdown to filter by Machine, User, or both cleanly decouples filtering logic from sender identity. The default of "Machine and User" makes sense for most retrieval flows.


2725-2725:

Details

✅ Verification successful

Verify template code synchronization
The "code".value line indicates the inclusion of the new retrieve_messages_as_text method in the template. Confirm that this JSON-embedded code mirrors the implementation in src/backend/base/langflow/components/helpers/memory.py, including the async signature and import of data_to_text.


🏁 Script executed:

#!/bin/bash
# Verify matching method signature and presence
rg -A3 "async def retrieve_messages_as_text" src/backend/base/langflow/components/helpers/memory.py

Length of output: 316


🏁 Script executed:

#!/bin/bash
# Verify import of data_to_text and presence of Message import
rg -n "data_to_text" -C2 src/backend/base/langflow/components/helpers/memory.py
rg -n "from .*message import Message" -C2 src/backend/base/langflow/components/helpers/memory.py

Length of output: 992


Template code synchronized
The retrieve_messages_as_text method in Meeting Summary.json exactly matches the implementation in src/backend/base/langflow/components/helpers/memory.py—it has the correct async signature, imports data_to_text and Message, and the same logic. No further changes needed.

src/backend/base/langflow/initial_setup/starter_projects/Memory Chatbot.json (1)

1578-1580: Reviewing the embedded Python code string within this JSON is out of scope for the front-end configuration file. Please ensure the backend MemoryComponent implementation is reviewed in its own module.

src/backend/base/langflow/initial_setup/starter_projects/Custom Component Maker.json (4)

281-293: DataFrame output definition looks correct
The dataframe output remains properly configured for retrieve_messages_dataframe. No changes needed here.


314-314: Ensure template code matches implementation
This code string embeds the updated MemoryComponent class. Please verify it stays in sync with the source implementation in src/backend/base/langflow/components/helpers/memory.py.


420-423: Clarified sender input metadata
Changing the display name to “Sender” and updating the info text makes its purpose (the actual message sender) clear. Nice improvement.


460-484: Introduce sender_type dropdown for filtering
Adding a distinct sender_type input cleanly separates filtering logic from sender identity. Default and options align with the backend.

Comment on lines +631 to +655
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

⚠️ Potential issue

Missing sender_type in field_order.

You’ve added a new sender_type dropdown for filtering by sender category, but it’s not included in the component’s field_order. As a result, the input won’t render in the UI. Please update the field_order array to include "sender_type" (for example, between "sender" and "sender_name").

🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Gmail Agent.json
between lines 631 and 655, the new "sender_type" dropdown input is missing from
the component's "field_order" array, preventing it from rendering in the UI. To
fix this, locate the "field_order" array in the JSON and insert "sender_type"
into it, ideally placing it between "sender" and "sender_name" as suggested.

Comment on lines +1574 to +1598
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Ensure the new input appears in the UI
The newly added sender_type input isn’t referenced in the component’s field_order, so it won’t render in the Playground. Please insert "sender_type" into field_order after "sender".

 "field_order": [
     …,
     "memory",
     "sender",
+    "sender_type",
     "sender_name",
     "n_messages",
     "session_id",
     …
 ]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
"field_order": [
…,
"memory",
"sender",
"sender_type",
"sender_name",
"n_messages",
"session_id",
]
🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Search agent.json
between lines 1574 and 1598, the new input field "sender_type" is defined but
not included in the component's "field_order" array. To fix this, locate the
"field_order" array in the same JSON file and insert the string "sender_type"
immediately after the existing "sender" entry to ensure the input appears in the
UI.

Comment on lines +1681 to +1705
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Essential: Add sender_type to the Agent’s field_order

You’ve introduced sender_type for filtering, but the Agent node’s field_order array isn’t updated. Without it, the input will render out of place or be invisible. Please insert "sender_type" right after "sender" in the field_order.

Example patch:

--- a/src/backend/base/langflow/initial_setup/starter_projects/Market Research.json
+++ b/src/backend/base/langflow/initial_setup/starter_projects/Market Research.json
@@ "field_order": [
-      "memory",
-      "sender",
-      "sender_name",
+      "memory",
+      "sender",
+      "sender_type",
+      "sender_name",
       "n_messages",
       "session_id",
       "order",

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Market Research.json
around lines 1681 to 1705, the new "sender_type" field is defined but not
included in the Agent node's "field_order" array. To fix this, locate the
"field_order" array in the Agent node configuration and insert "sender_type"
immediately after "sender" to ensure the input renders correctly and in the
intended order.

Comment on lines +1818 to +1842
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Invalid or missing component support for sender_type

A new sender_type input has been added here, but the ChatOutput component class does not declare or handle a sender_type property. This discrepancy will either silently drop your input or break the UI. Please remove this field from the JSON or extend the ChatOutput implementation to support sender_type.

🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Social Media
Agent.json between lines 1818 and 1842, the new sender_type input is added but
the ChatOutput component does not support or handle this property. To fix this,
either remove the sender_type field from this JSON configuration or update the
ChatOutput component class to declare and properly handle the sender_type
property, ensuring it integrates correctly with the UI and does not cause
errors.

Comment on lines 1792 to 1794
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Critical: Incorrect options for the sender input

The sender field is intended to specify a single message origin (Machine or User), but the options list still includes "Machine and User", which belongs to the filter input. This misconfiguration can cause MemoryComponent.store_message to receive invalid sender values.

Apply this diff to restrict sender to only two options:

 "sender": {
   ...
-  "options": [
-    "Machine",
-    "User",
-    "Machine and User"
-  ],
+  "options": [
+    "Machine",
+    "User"
+  ],
   ...
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"display_name": "Sender",
"dynamic": false,
"info": "Filter by sender type.",
"info": "The sender of the message. Might be Machine or User. If empty, the current sender parameter will be used.",
"display_name": "Sender",
"dynamic": false,
"info": "The sender of the message. Might be Machine or User. If empty, the current sender parameter will be used.",
"options": [
"Machine",
"User"
],
🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Pokédex Agent.json
around lines 1792 to 1794, the `sender` input incorrectly includes the option
"Machine and User," which should be removed. Update the options list for the
`sender` field to only include "Machine" and "User" to ensure valid values are
passed to MemoryComponent.store_message.

Comment on lines +3034 to +3058
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Missing in UI ordering: Add sender_type to field_order
The sender_type dropdown for filtering is not listed in the Researcher Agent’s field_order. Please include "sender_type" after "sender_name" in the field_order array.

🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks
Agents.json around lines 3034 to 3058, the "sender_type" dropdown is defined but
missing from the Researcher Agent's "field_order" array. To fix this, locate the
"field_order" array for the Researcher Agent and insert "sender_type"
immediately after "sender_name" to ensure the dropdown appears in the correct
order in the UI.

Comment on lines +109 to +112
outputs = [
Output(display_name="Message", name="messages_text", method="retrieve_messages_as_text", dynamic=True),
Output(display_name="Dataframe", name="dataframe", method="retrieve_messages_dataframe", dynamic=True),
]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Update the update_outputs method to include the new text output.

The new messages_text output is defined in the outputs list but is not included in the update_outputs method when mode is "Retrieve". This could cause the new output to not appear correctly in the UI.

             if field_value == "Retrieve":
                 frontend_node["outputs"] = [
+                    Output(
+                        display_name="Messages", name="messages_text", method="retrieve_messages_as_text", dynamic=True
+                    ),
                     Output(
                         display_name="Messages", name="dataframe", method="retrieve_messages_dataframe", dynamic=True
                     )
                 ]

Also applies to: 129-134

🤖 Prompt for AI Agents
In src/backend/base/langflow/components/helpers/memory.py around lines 109-112
and 129-134, the new output "messages_text" is defined but not included in the
update_outputs method when mode is "Retrieve". To fix this, modify the
update_outputs method to add "messages_text" to the outputs list for the
"Retrieve" mode so that this output is properly handled and displayed in the UI.

Comment on lines +52 to 58
name="sender_type",
display_name="Sender Type",
options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER, "Machine and User"],
value="Machine and User",
info="Filter by sender type.",
advanced=True,
),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Verify the consistency of input name changes across the component.

The input name change from sender to sender_type is a breaking change. I notice that mode_config at line 24 still references "sender" in the "Store" mode configuration, which appears inconsistent with this rename.


🏁 Script executed:

#!/bin/bash
# Description: Verify that all references to the old 'sender' input have been properly updated

# Check if mode_config still references the old 'sender' input name
echo "Checking mode_config in memory.py:"
rg -A 5 -B 5 'mode_config.*=.*\{' src/backend/base/langflow/components/helpers/memory.py

# Look for any remaining references to a 'sender' input in the component
echo -e "\nChecking for 'sender' references in input configurations:"
ast-grep --pattern 'DropdownInput(name="sender", $$$)'

Length of output: 2344


Fix inconsistent sender key in mode_config

The mode_config in src/backend/base/langflow/components/helpers/memory.py still references the old "sender" key, which will break with the renamed input sender_type. Please update the "Store" entry to use "sender_type":

• File: src/backend/base/langflow/components/helpers/memory.py
Update mode_config:

 mode_config = {
-      "Store": ["message", "memory", "sender", "sender_name", "session_id"],
+      "Store": ["message", "memory", "sender_type", "sender_name", "session_id"],
    "Retrieve": ["n_messages", "order", "template", "memory"],
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
name="sender_type",
display_name="Sender Type",
options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER, "Machine and User"],
value="Machine and User",
info="Filter by sender type.",
advanced=True,
),
mode_config = {
"Store": ["message", "memory", "sender_type", "sender_name", "session_id"],
"Retrieve": ["n_messages", "order", "template", "memory"],
}
🤖 Prompt for AI Agents
In src/backend/base/langflow/components/helpers/memory.py around lines 52 to 58,
the input name was changed from "sender" to "sender_type" but the mode_config
dictionary at line 24 still uses the old "sender" key in the "Store" mode
configuration. To fix this, update the "Store" entry in mode_config to replace
the "sender" key with "sender_type" to maintain consistency and prevent breaking
changes.

Comment on lines +1734 to +1758
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Include sender_type in the node’s field order

You added a sender_type input with "show": true, but the node’s field_order (lines 1511–1519) still lists only "sender". Without updating field_order, the new input won’t appear in the correct sequence in the UI. Please insert "sender_type" at the intended position in the field_order array.

🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Memory Chatbot.json
between lines 1511 and 1519, the node's field_order array currently includes
only "sender" but does not list the newly added "sender_type" input. To ensure
the "sender_type" input appears in the correct sequence in the UI, update the
field_order array by inserting "sender_type" at the appropriate position
alongside "sender".

Comment on lines +269 to +278
"display_name": "Message",
"group_outputs": false,
"method": "retrieve_messages_as_text",
"name": "messages_text",
"selected": "Message",
"tool_mode": true,
"types": [
"Message"
],
"value": "__UNDEFINED__"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

update_outputs does not include the new text output
You’ve added a messages_text output for retrieve_messages_as_text, but the update_outputs logic only appends the DataFrame output when in Retrieve mode. This will prevent users from selecting or seeing the text output.

🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Custom Component
Maker.json around lines 269 to 278, the update_outputs function only adds the
DataFrame output in Retrieve mode and does not include the new messages_text
output for retrieve_messages_as_text. To fix this, modify the update_outputs
logic to also append the messages_text output when in Retrieve mode, ensuring
users can select and see the new text output alongside the DataFrame output.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 16

🔭 Outside diff range comments (2)
src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json (1)

1787-1808: 🛠️ Refactor suggestion

Refine sender input options
The sender dropdown now specifies the actual sender and should only allow a single sender. The “Machine and User” option is not valid when defining one sender.

Apply this diff to remove the combined option and set a sensible default:

 "sender": {
   "options": [
-    "Machine",
-    "User",
-    "Machine and User"
+    "Machine",
+    "User"
   ],
-  "value": "Machine and User"
+  "value": "User"
 }
src/backend/base/langflow/initial_setup/starter_projects/Memory Chatbot.json (1)

1686-1710: 💡 Verification agent

🧩 Analysis chain

Verify backward compatibility for existing flows using the sender field.

The sender field has been repurposed from a dropdown (for sender type) to a text input (for sender identity), while the filtering functionality has moved to the new sender_type field. This is a breaking change that could affect existing flows.

Run the following script to check if any other starter projects or components might be affected by this change:

Also applies to: 1734-1758


🏁 Script executed:

#!/bin/bash
# Description: Search for references to the sender field in Memory components across starter projects

# Look for Memory components with sender field references
rg -A 10 -B 10 '"name": "sender"' --glob "*.json" | grep -A 20 -B 20 "Memory"

# Check for any hardcoded sender values that might break
rg '"sender".*"value".*"(Machine|User)"' --glob "*.json"

Length of output: 29555


🏁 Script executed:

#!/bin/bash
# Check for new "sender_type" field usage across all JSON files
rg -n '"name":\s*"sender_type"' --glob '*.json'

Length of output: 3023


Breaking change: ‘sender’ repurposed, new ‘sender_type’ added
The sender dropdown has been renamed in the UI (now hidden by default, with updated display_name/info) and its type‐filtering role has moved to a new sender_type field. This will impact all existing flows, starter projects, and test fixtures that use the old sender parameter.

Please update the following JSON definitions to include or replace usages accordingly:

• Starter projects under
src/backend/base/langflow/initial_setup/starter_projects/*.json
– Replace any legacy “Sender Type” dropdowns on name: "sender" with the new sender_type field.
– Ensure sender remains present only for the actual sender value (or adjust UI visibility).

• Test fixtures under
src/backend/tests/data/*.json
– Update LoopTest.json, MemoryChatbotNoLLM.json, env_variable_test.json, etc., to set or migrate their type filters from sender to sender_type.

• Any other custom flows or integrations that reference the old sender field for type filtering.

Until these are updated, flows relying on the old dropdown will break.

🧹 Nitpick comments (5)
src/backend/base/langflow/components/helpers/store_message.py (1)

17-17: Remove deprecated legacy flag comment.
The commented-out # legacy = True line clutters the codebase. Either delete this line entirely or replace it with updated deprecation logic if you intend to support legacy behavior.

src/backend/base/langflow/initial_setup/starter_projects/News Aggregator.json (2)

1415-1423: Clarify sender input semantics
The renamed sender dropdown now shows “Sender” with multi‐option values, including “Machine and User,” which collides with the new sender_type filter. Per PR objectives, sender should capture the actual message sender (a single identifier), while sender_type handles filtering by category. Consider changing sender to a text input (MessageTextInput) or limiting its options to a single actor value.


1457-1481: Remove unsupported "toggle" flag on sender_type
The new sender_type dropdown includes a "toggle": false property, which isn’t recognized by other DropdownInput definitions in starter project schemas. Removing it will keep the schema consistent and avoid confusion.

src/backend/base/langflow/initial_setup/starter_projects/Market Research.json (1)

1681-1705: Trim redundant metadata
The new sender_type input block includes unused fields ("dialog_inputs": {}) and a "toggle" flag not present in other inputs. Removing these will improve consistency and reduce noise in the JSON schema.

src/backend/base/langflow/initial_setup/starter_projects/Custom Component Maker.json (1)

280-283: Consistent display_name casing

The Dataframe output uses display_name "Dataframe" but the type and selected value are "DataFrame". Consider renaming display_name to "DataFrame" for consistency.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7be8161 and bf76224.

📒 Files selected for processing (21)
  • src/backend/base/langflow/components/helpers/memory.py (7 hunks)
  • src/backend/base/langflow/components/helpers/store_message.py (1 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Custom Component Maker.json (4 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Financial Agent.json (4 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Gmail Agent.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Invoice Summarizer.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Market Research.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json (4 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Memory Chatbot.json (4 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/News Aggregator.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Pokédex Agent.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Price Deal Finder.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Research Agent.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/SaaS Pricing.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Search agent.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks Agents.json (6 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Simple Agent.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Social Media Agent.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Travel Planning Agents.json (6 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Youtube Analysis.json (2 hunks)
🔇 Additional comments (33)
src/backend/base/langflow/initial_setup/starter_projects/Youtube Analysis.json (1)

1620-1623: Display name and info refined for sender input
The display name has been renamed from "Sender Type" to "Sender" and the info text now clarifies its usage.

src/backend/base/langflow/initial_setup/starter_projects/Social Media Agent.json (2)

1776-1778: Clarify the sender input to represent the actual message sender
The display name and info have been updated to indicate that this dropdown specifies the explicit sender (Machine or User) rather than filtering. This aligns with the PR objective to separate sender identity from sender-type filtering.


1818-1842: Add a dedicated sender_type input for filtering by sender category
Introducing a separate dropdown to filter by sender type (Machine, User, or both) cleanly decouples filtering logic from explicit sender specification. The configuration and metadata look correct.

src/backend/base/langflow/initial_setup/starter_projects/Search agent.json (1)

1528-1536: Approve rename of sender input
The display_name for the sender input has been correctly updated to "Sender" and its info text better reflects its purpose.

src/backend/base/langflow/initial_setup/starter_projects/Simple Agent.json (2)

1716-1718: Clarify 'Sender' input semantics
Display_name updated to “Sender” and info revised to describe the actual message sender rather than its type. This change cleanly separates identity from filtering logic.


1759-1783: Add explicit 'sender_type' filter input
Introduces a new sender_type DropdownInput with options ["Machine", "User", "Machine and User"] and a default of "Machine and User", fulfilling the PR objective to isolate filtering by sender category.

src/backend/base/langflow/initial_setup/starter_projects/Market Research.json (1)

1641-1643: Update sender input labeling
Renaming the display name to "Sender" and clarifying the info text aligns it with its new role (explicit sender rather than filter).

src/backend/base/langflow/initial_setup/starter_projects/Research Agent.json (3)

1421-1421: Renamed sender input label
The display_name has been updated from "Sender Type" to "Sender" to clearly represent the actual message sender.


1423-1423: Clarified sender input description
Updated info text ties the input to the actual sender and fallback behavior, improving user understanding.


1461-1485: Introduced sender_type dropdown for filtering
A new sender_type input field cleanly separates message sender filtering from sender specification, enhancing configurability and clarity.

src/backend/base/langflow/initial_setup/starter_projects/Financial Agent.json (2)

2785-2806: Rename sender display name and update metadata
The sender input is correctly repurposed to specify the actual message sender. Display name, info text, and input_types align with backend expectations.


2830-2854: Add new sender_type filter input
The sender_type dropdown for filtering by sender type has been added consistently with other starter projects. Options and default value match the new backend logic.

src/backend/base/langflow/initial_setup/starter_projects/Pokédex Agent.json (2)

1788-1794: Clarified sender input metadata
Updated the sender display name from “Sender Type” to “Sender” and refined the info text to emphasize that it specifies the actual message sender (Machine or User), falling back to the current parameter when empty.


1835-1859: Introduced sender_type filter dropdown
Added a new advanced sender_type input to decouple filtering by sender category from the actual sender value, offering options “Machine,” “User,” and “Machine and User.”

src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json (1)

1831-1855: Correctly added sender_type filter
Introducing sender_type cleanly separates filtering from sender specification and aligns with the PR goals.

src/backend/base/langflow/initial_setup/starter_projects/Invoice Summarizer.json (1)

1735-1759: sender_type input addition aligns with filtering requirements.

The sender_type dropdown is correctly defined as an advanced filter with the expected options and metadata for “Machine”, “User”, and “Machine and User”. This matches the PR objective to separate sender identity from sender‐type filtering.

src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks Agents.json (3)

824-848: sender_type input in Finance Agent is correct.
The new dropdown for filtering by sender category matches the intended design.


1516-1540: sender_type input in Analysis & Editor Agent is configured properly.
Filtering dropdown aligns with the MemoryComponent API for sender type.


3034-3058: sender_type input in Researcher Agent is correct.
Dropdown for sender filtering is properly defined.

src/backend/base/langflow/initial_setup/starter_projects/Travel Planning Agents.json (6)

2169-2171: Update sender input display name and info
Renaming the dropdown’s display name to “Sender” and clarifying the info text aligns with the new semantics.


2211-2235: Add new sender_type filter input
Inserting a sender_type dropdown to filter messages by Machine, User, or both complements the existing sender field.


2937-2939: Update sender display and info for Local Expert Agent
Consistent rename of the sender input and info update in this agent’s template.


2979-3003: Add sender_type filter for Local Expert Agent
New dropdown input for filtering by sender type follows the established pattern.


3705-3707: Rename sender for Travel Concierge Agent
Display name and info for the sender dropdown updated to match other agent components.


3747-3771: Include sender_type dropdown for Travel Concierge Agent
Adds the same sender-type filter dropdown, ensuring consistent filtering across all agents.

src/backend/base/langflow/initial_setup/starter_projects/Custom Component Maker.json (1)

269-279: Approve new text output configuration

The messages_text output entry for retrieve_messages_as_text is correctly configured: dynamic, cached, and tool_mode aligned with the existing DataFrame output. It matches the backend method signature.

src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json (2)

2837-2839: Clean up the sender input display name
Renaming the sender field’s display name from "Sender Type" to "Sender" clarifies that it holds the actual sender identity. This change correctly distinguishes it from the new filtering input.


2879-2903: Add sender_type input for filtering
Introducing the sender_type DropdownInput cleanly separates sender filtering ("Machine", "User", "Machine and User") from the actual sender value. This aligns perfectly with your updated filtering logic in retrieve_messages.

src/backend/base/langflow/initial_setup/starter_projects/Memory Chatbot.json (1)

1532-1556: LGTM! Good addition of dual output options.

The addition of a Message output alongside the existing DataFrame output provides users with flexibility in how they consume retrieved messages - either as formatted text or structured data.

src/backend/base/langflow/components/helpers/memory.py (4)

4-4: LGTM!

The import of data_to_text is correctly added to support the new text formatting functionality.


52-65: Well-structured separation of sender filtering and identity.

The changes effectively separate the concept of sender type (for filtering) from sender identity (actual sender string), making the component more flexible. The default empty string for session_id is a good defensive practice.

Also applies to: 85-85


175-214: LGTM! Correct implementation of sender type filtering.

The method correctly uses sender_type for filtering messages, with proper handling of the "Machine and User" option to retrieve all messages.

🧰 Tools
🪛 Ruff (0.11.9)

214-214: Add quotes to type expression in typing.cast()

Add quotes

(TC006)


216-220: LGTM! Clean implementation of text formatting output.

The new method efficiently reuses the existing retrieve_messages() logic and applies template formatting, providing a convenient text output option for users.

Comment on lines +631 to +655
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Missing sender_type in field_order and redundant duplication
You’ve added a new sender_type dropdown but haven’t updated the node’s field_order to include it (it should go between sender and sender_name). Also, the original sender dropdown now duplicates the same options. Please:

  1. Change the old sender input to a text input.
  2. Insert "sender_type" into the field_order array in the correct position.
🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Gmail Agent.json
between lines 631 and 655, the new sender_type dropdown is missing from the
node's field_order array and the original sender dropdown redundantly duplicates
its options. Fix this by changing the sender input type from dropdown to text
input and insert "sender_type" into the field_order array between "sender" and
"sender_name" to maintain the correct order.

Comment on lines +589 to 592
"display_name": "Sender",
"dynamic": false,
"info": "Filter by sender type.",
"info": "The sender of the message. Might be Machine or User. If empty, the current sender parameter will be used.",
"name": "sender",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Inconsistent input type and default for sender field
You’ve updated the display name and info to clarify that sender should specify the actual message sender, but it’s still a DropdownInput with "Machine and User" as the default—this conflicts with its intended use as a free‐text filter. According to the PR summary, sender should be a MessageTextInput (allowing arbitrary sender strings) with an empty default.

🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Gmail Agent.json
around lines 589 to 592, the sender field is incorrectly defined as a
DropdownInput with a default value of "Machine and User," which conflicts with
its intended use as a free-text filter. Change the input type of the sender
field to MessageTextInput and set its default value to an empty string to allow
arbitrary sender strings as described in the PR summary.

Comment on lines +1662 to +1686
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

New sender_type input added but missing from field_order
You've introduced a sender_type dropdown to separately filter by sender type. Ensure you update the Agent node's field_order to include "sender_type" so the UI renders this new input:

"field_order": [
- "memory", "sender", "sender_name",
+ "memory", "sender", "sender_type", "sender_name",
  "n_messages", "session_id", ...
]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
"field_order": [
"memory",
"sender",
"sender_type",
"sender_name",
"n_messages",
"session_id",
...
],
🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Youtube
Analysis.json around lines 1662 to 1686, you added a new dropdown input
"sender_type" but did not include it in the Agent node's "field_order". To fix
this, locate the "field_order" array in the same JSON structure and add
"sender_type" to it so the UI will render this new input properly.

Comment on lines +1574 to +1598
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Integrate new sender_type input into field_order and remove unused toggle property
The added sender_type dropdown isn’t referenced in the component’s field_order, so it won’t show up in the UI. Also, the toggle attribute isn’t used by other dropdowns and should be removed for consistency.

Proposed diff:

--- a/src/backend/base/langflow/initial_setup/starter_projects/Search agent.json
+++ b/src/backend/base/langflow/initial_setup/starter_projects/Search agent.json
@@ "field_order": [
-   "sender",
+   "sender",
+   "sender_type",
    "sender_name",
@@ "sender_type": {
-                "toggle": false,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
// In src/backend/base/langflow/initial_setup/starter_projects/Search agent.json
// 1) Integrate the new dropdown into the field_order:
"field_order": [
"sender",
"sender_type",
"sender_name",
// … other fields …
],
// 2) Remove the unused `toggle` property from the sender_type definition:
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Search agent.json
between lines 1574 and 1598, add "sender_type" to the component's field_order
array to ensure it appears in the UI, and remove the unused "toggle" property
from the sender_type dropdown definition to maintain consistency with other
dropdown inputs.

Comment on lines +1142 to +1144
"display_name": "Sender",
"dynamic": false,
"info": "Filter by sender type.",
"info": "The sender of the message. Might be Machine or User. If empty, the current sender parameter will be used.",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Clarify ‘sender’ input semantics and type

The sender input remains a dropdown with filtering options (including “Machine and User”), but per the updated component API it should represent the actual message sender string. Switch this to a MessageTextInput (or equivalent) to allow arbitrary sender values and remove the “Machine and User” option from this field.

🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/SaaS Pricing.json
around lines 1142 to 1144, the 'sender' input is currently a dropdown with fixed
options like "Machine" and "User". Update this input to use a MessageTextInput
component (or equivalent) to accept arbitrary sender strings instead of
predefined options, and remove the "Machine" and "User" choices from the
dropdown to reflect the updated component API semantics.

Comment on lines +1476 to +1478
"display_name": "Sender",
"dynamic": false,
"info": "Filter by sender type.",
"info": "The sender of the message. Might be Machine or User. If empty, the current sender parameter will be used.",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Incorrect input type for sender in Analysis & Editor Agent.
This field should be a MessageTextInput for specifying the exact sender, not a dropdown. The filter dropdown is handled by sender_type.

-  "_input_type": "DropdownInput",
+  "_input_type": "MessageTextInput",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"display_name": "Sender",
"dynamic": false,
"info": "Filter by sender type.",
"info": "The sender of the message. Might be Machine or User. If empty, the current sender parameter will be used.",
"_input_type": "MessageTextInput",
"display_name": "Sender",
"dynamic": false,
"info": "The sender of the message. Might be Machine or User. If empty, the current sender parameter will be used.",
🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks
Agents.json around lines 1476 to 1478, the `sender` field is incorrectly set as
a dropdown input type. Change the input type of `sender` to MessageTextInput to
allow specifying the exact sender text. Keep the filter dropdown functionality
in the separate `sender_type` field as intended.

Comment on lines +420 to +422
"display_name": "Sender",
"dynamic": false,
"info": "Filter by sender type.",
"info": "The sender of the message. Might be Machine or User. If empty, the current sender parameter will be used.",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix sender input type and default value

The sender field is still defined as a DropdownInput with a default of "Machine and User", but in the component code it’s a MessageTextInput with an empty default. Update this to:

  • _input_type: "MessageTextInput"
  • Remove hardcoded "Machine and User" default (use "")
🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Custom Component
Maker.json around lines 420 to 422, the sender input is incorrectly defined as a
DropdownInput with a default value of "Machine and User". Change the _input_type
to "MessageTextInput" and remove the hardcoded default value, setting it to an
empty string "" to match the component code expectations.

Comment on lines +460 to +484
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

⚠️ Potential issue

Include sender_type in field_order

The new sender_type dropdown is not listed in the node’s "field_order", so it won’t appear in the UI. Add "sender_type" to the "field_order" array in the node definition.
Example diff:

-  "field_order": [
-    "memory",
-    "sender",
-    "sender_name",
+  "field_order": [
+    "memory",
+    "sender_type",
+    "sender",
+    "sender_name",
     "n_messages",
     "session_id",
     "order",
     "template"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
"field_order": [
"memory",
"sender_type",
"sender",
"sender_name",
"n_messages",
"session_id",
"order",
"template"
],
🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Custom Component
Maker.json between lines 460 and 484, the "sender_type" dropdown field is
defined but missing from the node's "field_order" array, preventing it from
showing in the UI. To fix this, locate the "field_order" array in the same node
definition and add the string "sender_type" to it, ensuring the new field
appears in the correct order in the UI.

Comment on lines +2680 to +2694
"display_name": "Message",
"group_outputs": false,
"method": "retrieve_messages_as_text",
"name": "messages_text",
"selected": "Message",
"tool_mode": true,
"types": [
"Message"
],
"value": "__UNDEFINED__"
},
{
"allows_loop": false,
"cache": true,
"display_name": "Dataframe",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Ensure UI dynamic outputs align with new outputs
You've added two outputs (messages_text and dataframe) under MemoryComponent, but the update_outputs method still only configures the DataFrame output for Retrieve mode. Update update_outputs to surface both outputs (or allow selection between them) when in Retrieve mode to keep the UI in sync with the new backend methods.

🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json
around lines 2680 to 2694, the update_outputs method currently only configures
the DataFrame output for Retrieve mode, but you have added two outputs:
messages_text and dataframe. Modify the update_outputs method to include both
outputs or provide a way to select between them when in Retrieve mode, ensuring
the UI dynamically reflects these new backend outputs and stays synchronized.

Comment on lines +109 to +112
outputs = [
Output(display_name="Message", name="messages_text", method="retrieve_messages_as_text", dynamic=True),
Output(display_name="Dataframe", name="dataframe", method="retrieve_messages_dataframe", dynamic=True),
]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Add the Message output to the Retrieve mode outputs.

The update_outputs method only shows the DataFrame output in Retrieve mode, but the new Message output is also available. Users should have access to both output options.

Apply this diff to include both outputs in Retrieve mode:

            if field_value == "Retrieve":
                frontend_node["outputs"] = [
+                   Output(
+                       display_name="Message", name="messages_text", method="retrieve_messages_as_text", dynamic=True
+                   ),
                    Output(
                        display_name="Messages", name="dataframe", method="retrieve_messages_dataframe", dynamic=True
                    )
                ]

Also applies to: 129-134

🤖 Prompt for AI Agents
In src/backend/base/langflow/components/helpers/memory.py at lines 109-112 and
129-134, the update_outputs method currently includes only the DataFrame output
for Retrieve mode, but it should include both the Message and DataFrame outputs.
Modify the outputs list in both places to add the Output with display_name
"Message" and name "messages_text" alongside the existing DataFrame output,
ensuring users can access both output options in Retrieve mode.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 14

🔭 Outside diff range comments (4)
src/backend/base/langflow/initial_setup/starter_projects/Pokédex Agent.json (1)

1787-1794: ⚠️ Potential issue

Incorrect sender input type & semantics
The block named "sender" still uses a dropdown with filtering options, but per the PR summary the original dropdown should have been renamed to sender_type and a new sender input (text) added to specify the message sender identity.

Please convert this block to a text input for sender identity. For example:

-  "sender": {
-    "_input_type": "DropdownInput",
-    "display_name": "Sender",
-    "info": "The sender of the message. Might be Machine or User. If empty, the current sender parameter will be used.",
-    "options": ["Machine", "User", "Machine and User"],
-    ...
-  },
+  "sender": {
+    "_input_type": "MessageTextInput",
+    "display_name": "Sender",
+    "info": "Name of the sender when storing messages.",
+    "name": "sender",
+    "type": "str",
+    "value": "",
+    "advanced": true,
+    "show": true
+  },

Ensure the dropdown semantics move exclusively to sender_type.

src/backend/base/langflow/initial_setup/starter_projects/News Aggregator.json (1)

1415-1423: ⚠️ Potential issue

The sender dropdown should not include the aggregate option.
The sender field is intended to specify the actual message sender and should only list "Machine" or "User". The "Machine and User" choice is only relevant when filtering by type and belongs on the sender_type input. Please remove it here to avoid confusion.

src/backend/base/langflow/initial_setup/starter_projects/Research Agent.json (1)

990-997: ⚠️ Potential issue

Missing sender_type in Agent’s field_order
The field_order array still lists only sender and sender_name, but not the newly added sender_type. Without including it here, the input won’t appear in the UI. Please insert "sender_type" at the correct position in the list.

src/backend/base/langflow/components/helpers/memory.py (1)

109-135: ⚠️ Potential issue

Missing "Message" output in update_outputs method.

The new "Message" output defined at line 110 is not included in the update_outputs method when mode is "Retrieve". This means users won't see this output option in the UI.

Apply this diff to include both outputs when in "Retrieve" mode:

             if field_value == "Retrieve":
                 frontend_node["outputs"] = [
+                    Output(
+                        display_name="Message", name="messages_text", method="retrieve_messages_as_text", dynamic=True
+                    ),
                     Output(
                         display_name="Messages", name="dataframe", method="retrieve_messages_dataframe", dynamic=True
                     )
                 ]
🧹 Nitpick comments (6)
src/backend/base/langflow/components/helpers/store_message.py (1)

17-17: Remove commented-out legacy flag
The commented legacy = True line is dead code and should be removed to clean up the class definition.

src/backend/base/langflow/initial_setup/starter_projects/Youtube Analysis.json (1)

1662-1686: Verify ‘sender_type’ dropdown configuration
The new sender_type input includes a toggle property, which isn’t typically part of the DropdownInput schema. Confirm whether the frontend supports toggle here or replace it with the correct control flags (e.g., combobox, real_time_refresh) for consistency.

src/backend/base/langflow/initial_setup/starter_projects/News Aggregator.json (1)

1457-1481: Verify integration of the new sender_type filter.
This dropdown is a valuable addition for filtering by message type. Ensure you:

  1. Add sender_type to the component’s field_order array so it appears in the UI.
  2. Remove or confirm support for the toggle property on DropdownInput, as it’s not used elsewhere.
src/backend/base/langflow/components/helpers/memory.py (1)

206-212: Consider parameter naming clarity.

The method passes sender_type to aget_messages using the sender parameter. This could be confusing since we now distinguish between sender identity and sender type. Consider if aget_messages should be updated to have a sender_type parameter for clarity.

src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json (2)

2680-2694: Ensure output naming consistency and clarity.

The new text output uses display_name: "Message", but it returns multiple messages as concatenated text. Consider renaming to something like "Messages Text" or "Formatted Messages" for clarity.
Also, the DataFrame output uses "Dataframe"; adjust to "DataFrame" to match casing conventions across the UI.


2837-2845: Clarify sender input semantics vs. sender_type.

With both sender (text input) and sender_type (filter dropdown) present, the UI may confuse users. Consider updating the display names (e.g., "Sender Filter" vs. "Sender") or grouping them logically in field_order to distinguish identity vs. filter.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7be8161 and bf76224.

📒 Files selected for processing (21)
  • src/backend/base/langflow/components/helpers/memory.py (7 hunks)
  • src/backend/base/langflow/components/helpers/store_message.py (1 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Custom Component Maker.json (4 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Financial Agent.json (4 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Gmail Agent.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Invoice Summarizer.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Market Research.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json (4 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Memory Chatbot.json (4 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/News Aggregator.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Pokédex Agent.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Price Deal Finder.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Research Agent.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/SaaS Pricing.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Search agent.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks Agents.json (6 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Simple Agent.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Social Media Agent.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Travel Planning Agents.json (6 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Youtube Analysis.json (2 hunks)
🔇 Additional comments (36)
src/backend/base/langflow/initial_setup/starter_projects/Search agent.json (2)

1532-1534: Rename sender input display name and info
The sender field is correctly renamed from "Sender Type" to "Sender" with updated info clarifying it represents the actual message sender. This aligns with the PR’s goal of separating sender identity and type.


1574-1598: Add sender_type dropdown filter
The new sender_type input cleanly separates filtering by sender type. Please verify that this field is referenced in the component logic and included in the node’s field_order.

src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json (1)

1789-1793: ✅ Updated sender display name and help text
The sender input’s display name has been changed from “Sender Type” to “Sender” and its info text now clearly explains its role. This aligns precisely with the PR objectives.

src/backend/base/langflow/initial_setup/starter_projects/Market Research.json (2)

1637-1643: Verify sender input type matches PR intent
The sender field’s display_name and info were updated, but it remains a DropdownInput. According to the PR summary, the original sender input was renamed to sender_type and a new sender input (for specifying the actual sender identity) should be a MessageTextInput. Please confirm this block aligns with the MemoryComponent changes and adjust the input type if needed.


1681-1705: sender_type dropdown addition is correct
The new sender_type filter input is implemented as an advanced DropdownInput with the expected options and default value, matching the PR objectives.

src/backend/base/langflow/initial_setup/starter_projects/Price Deal Finder.json (1)

2097-2099: Confirm sender input semantics update
The display_name has been changed from “Sender Type” to “Sender,” and the info text now clarifies that this is the actual sender identity. This aligns well with the PR’s goal of splitting identity vs. filter inputs.

src/backend/base/langflow/initial_setup/starter_projects/Research Agent.json (2)

1418-1424: Updated sender input display name and info
The change renames the display from “Sender Type” to “Sender” and clarifies the info text to indicate this field specifies which actor sent the message. This aligns the metadata with its intended function.


1461-1485: Introduced sender_type dropdown for filtering
Adding a separate sender_type filter input cleanly separates identity (sender) from type-based filtering. The default and option set cover all use cases.

src/backend/base/langflow/initial_setup/starter_projects/Social Media Agent.json (2)

1776-1778: Renamed display_name to “Sender” for clarity
The display name change from “Sender Type” to “Sender” and updated info text clearly distinguishes this input as the actual message origin rather than a filter.


1818-1842: Added new “sender_type” dropdown for filtering
Introducing a separate sender_type input aligns with the MemoryComponent’s filtering logic and keeps identity vs. filter concerns decoupled.

src/backend/base/langflow/initial_setup/starter_projects/SaaS Pricing.json (1)

1182-1206: Correct sender_type addition
The new sender_type dropdown is configured correctly, with appropriate metadata and default for filtering messages by sender type.

src/backend/base/langflow/initial_setup/starter_projects/Financial Agent.json (2)

2785-2789: Clarify “sender” input semantics and connections
Renaming display_name to “Sender” and updating the info to reflect the actual sender identity is correct. Adding "input_types": ["Message"] ensures only message outputs can be wired here, aligning with other components.


2830-2854: Verify sender_type input configuration
The new sender_type dropdown lacks an input_types property, unlike sender. If you intend for this filter to accept connected message outputs, consider adding:

               "info": "Filter by sender type.",
+              "input_types": ["Message"],
               "name": "sender_type",

Otherwise, please confirm the omission is deliberate.

src/backend/base/langflow/initial_setup/starter_projects/Gmail Agent.json (2)

589-592: Consistent renaming of the sender input
The display name and info text have been updated to clearly describe the message sender. This aligns with the pattern used across other starter projects.


631-655: ⚠️ Potential issue

Invalid property key on sender_type input
The new sender_type block uses an unrecognized "toggle" key, and omits standard DropdownInput properties (show, combobox, dialog_inputs). This will likely break the UI. Please replace "toggle": false with "show": true, and add "combobox": false, "dialog_inputs": {} to match other DropdownInput definitions.

Apply this diff:

 "sender_type": {
-  "_input_type": "DropdownInput",
-  "advanced": true,
-  "combobox": false,
-  "dialog_inputs": {},
-  "display_name": "Sender Type",
-  "dynamic": false,
-  "info": "Filter by sender type.",
-  "name": "sender_type",
-  "options": ["Machine","User","Machine and User"],
-  "options_metadata": [],
-  "placeholder": "",
-  "required": false,
-  "show": true,
-  "title_case": false,
-  "toggle": false,
-  "tool_mode": false,
-  "trace_as_metadata": true,
-  "type": "str",
-  "value": "Machine and User"
+  "_input_type": "DropdownInput",
+  "advanced": true,
+  "combobox": false,
+  "dialog_inputs": {},
+  "display_name": "Sender Type",
+  "dynamic": false,
+  "info": "Filter by sender type.",
+  "name": "sender_type",
+  "options": ["Machine", "User", "Machine and User"],
+  "options_metadata": [],
+  "placeholder": "",
+  "required": false,
+  "show": true,
+  "title_case": false,
+  "tool_mode": false,
+  "trace_as_metadata": true,
+  "type": "str",
+  "value": "Machine and User"
 }

Likely an incorrect or invalid review comment.

src/backend/base/langflow/initial_setup/starter_projects/Invoice Summarizer.json (1)

1690-1695: Refine sender input metadata
The sender dropdown’s display_name has been changed to “Sender,” the info text now clarifies the semantics, and Message was correctly added to input_types.

src/backend/base/langflow/initial_setup/starter_projects/Travel Planning Agents.json (3)

2169-2171: Rename and clarify “sender” input and introduce “sender_type” filter
The existing sender dropdown has been correctly renamed to “Sender” with updated info to represent the actual message sender. The new sender_type dropdown cleanly separates filtering concerns by sender type. This aligns perfectly with the PR objectives.

Also applies to: 2211-2235


2937-2939: Propagate “sender” rename and add “sender_type” filter in Local Expert Agent
The Local Expert Agent’s inputs now mirror the City Selection Agent: sender specifies identity, and sender_type enables explicit filtering. Looks good.

Also applies to: 2979-3003


3705-3707: Propagate “sender” rename and add “sender_type” filter in Travel Concierge Agent
Consistent update here as well: sender for identity, and sender_type for filtering. Matches the established pattern across starter projects.

Also applies to: 3747-3771

src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks Agents.json (3)

784-787: Rename sender display_name and update info are appropriate
The input now clearly distinguishes the actual sender identity.


1476-1478: Rename sender display_name and update info are appropriate
Consistent with other agent templates.


2994-2996: Rename sender display_name and update info are appropriate
Matches the change in other agent configurations.

src/backend/base/langflow/initial_setup/starter_projects/Memory Chatbot.json (4)

1532-1542: New “Message” output for text retrieval looks correct
The addition of messages_text using retrieve_messages_as_text aligns with the component’s new capabilities. Ensure the front-end mapping and tooling recognize this output and invoke the correct async method.


1578-1586: Synchronize JSON template code with implementation
The embedded code value now imports data_to_text and defines retrieve_messages_as_text. Please verify that this snippet exactly matches your MemoryComponent in memory.py, including correct indentation and escape sequences.


1687-1694: Verify hidden “sender” dropdown behavior
The sender field is repurposed for actual sender identity but marked show:false. Confirm that it’s only surfaced in Store mode and that its default/hidden state doesn’t conflict with the new sender_type filter.


1734-1758: New “Sender Type” dropdown is configured properly
The sender_type input for filtering now offers Machine, User, and Machine and User with a sensible default. Confirm that selecting Machine and User correctly disables filtering (i.e., passes None into the retrieval logic).

src/backend/base/langflow/initial_setup/starter_projects/Custom Component Maker.json (4)

269-279: Correctly added a new text output
The new “Message” output is configured to call retrieve_messages_as_text, returns type Message, and is cacheable. This aligns with the updated component API.


283-293: Dataframe output remains intact
The existing “Dataframe” output still calls retrieve_messages_dataframe and returns type DataFrame as expected.


312-314: Skip: embedded component code
The large code block under template.code.value reflects the full MemoryComponent implementation. Assuming the code file was updated correctly, no JSON-specific adjustments are needed here.


460-484:

Details

✅ Verification successful

Validate sender_type option values against code constants
The dropdown for sender_type uses ["Machine", "User", "Machine and User"], but the component code imports MESSAGE_SENDER_AI and MESSAGE_SENDER_USER. Confirm that "Machine" maps to MESSAGE_SENDER_AI (and that the constants match).


🏁 Script executed:

#!/bin/bash
# Verify the actual constant values for sender types in the component code
rg -n "MESSAGE_SENDER_" src/backend/base/langflow/components/helpers/memory.py

Length of output: 561


🏁 Script executed:

#!/bin/bash
# Locate the definitions of MESSAGE_SENDER_AI and MESSAGE_SENDER_USER
rg -n "MESSAGE_SENDER_AI" -n .

Length of output: 104920


🏁 Script executed:

#!/bin/bash
# Verify the value of MESSAGE_SENDER_USER in constants
rg -n "MESSAGE_SENDER_USER" src/backend/base/langflow/utils/constants.py

Length of output: 105


sender_type options correctly match constants—no change needed

Verified that in src/backend/base/langflow/utils/constants.py:

  • MESSAGE_SENDER_AI = "Machine"
  • MESSAGE_SENDER_USER = "User"

The dropdown’s first two options ("Machine", "User") align exactly with those constants, and the third option ("Machine and User") is intentionally a literal for combined filtering.

src/backend/base/langflow/components/helpers/memory.py (5)

4-4: Import looks good.

The data_to_text import is correctly added and used in the new retrieve_messages_as_text method.


59-65: Good addition of sender identity input.

The new sender input effectively separates sender identity from sender type, providing better flexibility for message attribution.


85-85: Good default value addition.

Setting an empty string default for session_id improves robustness when the field is not provided.


137-173: Well-implemented message storage method.

The store_message method properly handles:

  • Both external memory and Langflow table storage
  • Default values for sender and session_id
  • Validation that messages were actually stored
  • Proper async/await patterns

216-219: Clean implementation of text formatting.

The retrieve_messages_as_text method effectively reuses existing functionality and provides a convenient text output format.

src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json (1)

2691-2694: Confirm cache and allows_loop settings for DataFrame output.

The DataFrame output block toggles allows_loop and cache. Verify that these flags align with the intended behavior—e.g., caching large DataFrames may impact memory, and loop allowance should be intentional.

Comment on lines +1759 to +1783
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Missing sender_type in field_order
You’ve added the sender_type input in the template but haven’t updated the Agent node’s field_order list. Without "sender_type" in field_order, this input won’t render in the UI. Please insert it at the desired position (e.g. after "sender") to ensure it appears in the form.

🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Simple Agent.json
between lines 1759 and 1783, the new "sender_type" input field is defined but
missing from the Agent node's "field_order" list. To fix this, locate the
"field_order" array in the same JSON file and insert "sender_type" at the
appropriate position, such as immediately after "sender", so that the UI renders
this input field correctly.

Comment on lines +1716 to +1718
"display_name": "Sender",
"dynamic": false,
"info": "Filter by sender type.",
"info": "The sender of the message. Might be Machine or User. If empty, the current sender parameter will be used.",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Duplicate filter semantics on sender input
The sender DropdownInput still uses the same filtering options (Machine, User, Machine and User) as the new sender_type input. Per the PR summary, sender should capture the actual message sender identity, not act as a filter. Please change its _input_type to a free-text input (e.g. MessageTextInput) and remove the options array so it only accepts the sender name.

🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Simple Agent.json
around lines 1716 to 1718, the `sender` input currently uses a DropdownInput
with filtering options similar to `sender_type`. To fix this, change the
`_input_type` of `sender` from DropdownInput to a free-text input type like
MessageTextInput, and remove the `options` array so it only accepts a sender
name as free text without filtering.

Comment on lines +1831 to +1855
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

⚠️ Ensure sender_type appears in the UI field_order
You’ve added the new sender_type dropdown correctly, but it’s not listed in the component’s field_order array. Without it, the UI may not render this input. Please add it in the desired sequence.

Apply a diff like this outside the JSON segment you edited:

 "field_order": [
   "...",
   "memory",
   "sender",
-  "sender_name",
+  "sender_name",      # existing
+  "sender_type",      # newly added
   "n_messages",
   "session_id",
   "order",
   "template",
   "add_current_date_tool"
 ]

🏁 Script executed:

#!/bin/bash
# Locate the Instagram Copywriter JSON file
echo "Locating the JSON file..."
fd "Instagram Copywriter.json" src/backend/base/langflow/initial_setup/starter_projects

# Search for `field_order` occurrences in that file
echo ""
echo "Searching for 'field_order' occurrences..."
rg -n '"field_order"' -- src/backend/base/langflow/initial_setup/starter_projects/"Instagram Copywriter.json"

Length of output: 793


🏁 Script executed:

#!/bin/bash
# Show context around the sender_type block (20 lines before and after)
rg -n '"sender_type"' -C20 src/backend/base/langflow/initial_setup/starter_projects/"Instagram Copywriter.json"

Length of output: 2081


🏁 Script executed:

#!/bin/bash
FILE='src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json'
# Find the first field_order after sender_type block (line 1855)
NEXT_LINE=$(rg -n '"field_order"' -- "$FILE" | awk -F: '$1>1855{print $1; exit}')
echo "Context around field_order at line $NEXT_LINE:"
sed -n "$((NEXT_LINE-5)),$((NEXT_LINE+15))p" "$FILE"

Length of output: 1141


🏁 Script executed:

#!/bin/bash
FILE='src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json'
# Find the last field_order before the sender_type block (line 1811)
PRIOR_LINE=$(rg -n '"field_order"' -- "$FILE" | awk -F: '$1<1811 {line=$1} END {print line}')
echo "Field_order found at line $PRIOR_LINE. Showing context:"
sed -n "$((PRIOR_LINE-5)),$((PRIOR_LINE+15))p" "$FILE"

Length of output: 1182


🏁 Script executed:

#!/bin/bash
FILE='src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json'
# Show the component section surrounding sender inputs and its field_order
sed -n '1700,1900p' "$FILE"

Length of output: 7752



🏁 Script executed:

#!/bin/bash
FILE='src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json'
# Print lines following sender_type to locate this node's field_order
sed -n '1850,2000p' "$FILE"

Length of output: 5834


🏁 Script executed:

#!/bin/bash
FILE='src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json'
# Show the full 'field_order' array for the Agent component
sed -n '1320,1420p' "$FILE"

Length of output: 3707


Add sender_type to the Agent component’s field_order
The new sender_type dropdown is defined but not listed in the Agent node’s field_order, so it won’t render in the UI. Please update the array in src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json to include "sender_type" between "sender_name" and "n_messages":

   "field_order": [
     "agent_llm",
     "max_tokens",
     "model_kwargs",
     "json_mode",
     "output_schema",
     "model_name",
     "openai_api_base",
     "api_key",
     "temperature",
     "seed",
     "output_parser",
     "system_prompt",
     "tools",
     "input_value",
     "handle_parsing_errors",
     "verbose",
     "max_iterations",
     "agent_description",
     "memory",
     "sender",
     "sender_name",
+    "sender_type",
     "n_messages",
     "session_id",
     "order",
     "template",
     "add_current_date_tool"
   ],
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
"field_order": [
"agent_llm",
"max_tokens",
"model_kwargs",
"json_mode",
"output_schema",
"model_name",
"openai_api_base",
"api_key",
"temperature",
"seed",
"output_parser",
"system_prompt",
"tools",
"input_value",
"handle_parsing_errors",
"verbose",
"max_iterations",
"agent_description",
"memory",
"sender",
"sender_name",
"sender_type",
"n_messages",
"session_id",
"order",
"template",
"add_current_date_tool"
],
🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Instagram
Copywriter.json around lines 1831 to 1855, the new "sender_type" dropdown is
defined but missing from the Agent component's "field_order" array. To fix this,
locate the "field_order" array for the Agent component in the file and insert
"sender_type" between "sender_name" and "n_messages" to ensure it appears in the
UI.

Comment on lines +1620 to 1623
"display_name": "Sender",
"dynamic": false,
"info": "Filter by sender type.",
"info": "The sender of the message. Might be Machine or User. If empty, the current sender parameter will be used.",
"name": "sender",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Align ‘sender’ options with actual sender semantics
The sender dropdown now represents the actual message sender identity, but including “Machine and User” can cause ambiguous behavior when storing messages. It’s better to limit this to a single role (e.g., “Machine” or “User”) or allow an empty/default value to fall back to the current sender parameter.

🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Youtube
Analysis.json around lines 1620 to 1623, the 'sender' field's options include
both "Machine" and "User," which can cause ambiguity when storing messages.
Update the 'sender' dropdown options to allow only a single role, such as either
"Machine" or "User," or permit an empty/default value that falls back to the
current sender parameter, ensuring clear and unambiguous sender identity
handling.

Comment on lines 1835 to 1859
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

New sender_type input added—but missing in field_order
The sender_type DropdownInput is well defined for filtering, but the Agent node’s field_order array doesn’t include "sender_type", which will cause it to be hidden or misplaced in the UI.

Please insert "sender_type" into the Agent node’s field_order at the desired position (e.g., immediately after "sender").

🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Pokédex Agent.json
between lines 1835 and 1859, the new "sender_type" DropdownInput is defined but
missing from the Agent node's "field_order" array. To fix this, locate the
"field_order" array in the same Agent node and insert the string "sender_type"
at the appropriate position, ideally immediately after the existing "sender"
entry, to ensure it appears correctly in the UI.

Comment on lines +1516 to +1540
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Missing sender_type in field_order
Ensure the new sender_type input appears in the configured order.

Insert "sender_type" after "sender_name" in the field_order list:

---
 "field_order": [
   ...,
   "memory",
   "sender",
   "sender_name",
+  "sender_type",
   "n_messages",
   "session_id",
   ...
 ]
🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks
Agents.json around lines 1516 to 1540, the new "sender_type" input is missing
from the "field_order" list. To fix this, locate the "field_order" array in the
JSON and insert the string "sender_type" immediately after "sender_name" to
ensure the input appears in the correct order in the UI.

Comment on lines +3034 to +3058
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Missing sender_type in field_order
Add the new sender_type to the UI order to maintain consistency.

Update the field_order array:

---
 "field_order": [
   ...,
   "memory",
   "sender",
   "sender_name",
+  "sender_type",
   "n_messages",
   "session_id",
   ...
 ]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
"field_order": [
"memory",
"sender",
"sender_name",
"sender_type",
"n_messages",
"session_id"
],
🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks
Agents.json around lines 3034 to 3058, the new "sender_type" field is defined
but missing from the "field_order" array, which controls the UI display order.
To fix this, locate the "field_order" array in the JSON file and add
"sender_type" at the appropriate position to ensure it appears in the UI
consistently with other fields.

Comment on lines +420 to +422
"display_name": "Sender",
"dynamic": false,
"info": "Filter by sender type.",
"info": "The sender of the message. Might be Machine or User. If empty, the current sender parameter will be used.",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Mismatch in sender input type
The JSON uses a DropdownInput with fixed options for sender, but the MemoryComponent class defines sender as a free‐form MessageTextInput. This will prevent users from supplying custom sender strings.

Apply this diff to align the starter‐project JSON with the component code:

-  "sender": {
-    "_input_type": "DropdownInput",
-    "advanced": true,
-    "display_name": "Sender",
-    "dynamic": false,
-    "info": "The sender of the message. Might be Machine or User. If empty, the current sender parameter will be used.",
-    "name": "sender",
-    "options": ["Machine", "User", "Machine and User"],
-    "type": "str",
-    "value": "Machine and User"
-  },
+  "sender": {
+    "_input_type": "MessageTextInput",
+    "advanced": true,
+    "display_name": "Sender",
+    "dynamic": false,
+    "info": "The sender of the message. Might be Machine or User. If empty, the current sender parameter will be used.",
+    "name": "sender",
+    "type": "str",
+    "value": ""
+  },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"display_name": "Sender",
"dynamic": false,
"info": "Filter by sender type.",
"info": "The sender of the message. Might be Machine or User. If empty, the current sender parameter will be used.",
"sender": {
"_input_type": "MessageTextInput",
"advanced": true,
"display_name": "Sender",
"dynamic": false,
"info": "The sender of the message. Might be Machine or User. If empty, the current sender parameter will be used.",
"name": "sender",
"type": "str",
"value": ""
},
🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Custom Component
Maker.json around lines 420 to 422, the sender input is defined as a
DropdownInput with fixed options, but the MemoryComponent class expects a
free-form MessageTextInput for sender. To fix this, change the sender input type
in the JSON from DropdownInput to MessageTextInput, removing the fixed options
to allow users to enter custom sender strings, ensuring consistency with the
component code.

Comment on lines 51 to 58
DropdownInput(
name="sender",
name="sender_type",
display_name="Sender Type",
options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER, "Machine and User"],
value="Machine and User",
info="Filter by sender type.",
advanced=True,
),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Breaking change: sender renamed to sender_type.

This is a breaking change that will affect existing configurations and code using the sender input. Ensure that:

  1. Migration documentation is provided for users
  2. All references to this input in the codebase are updated
  3. Starter projects and examples are updated accordingly

Run the following script to check for any remaining references to the old sender input:


🏁 Script executed:

#!/bin/bash
# Description: Search for references to the old 'sender' input in MemoryComponent usage

# Search for potential references to MemoryComponent with 'sender' parameter
rg -A 5 -B 5 'MemoryComponent.*sender[^_]' --type py

# Search in JSON files for the old field name
rg '"sender".*"dropdown"' --type json

Length of output: 94


🏁 Script executed:

#!/bin/bash
# Deep search for any remaining references to the old 'sender' input name

# 1. Look for DropdownInput instantiations still using name="sender"
rg -P "DropdownInput\([^)]*name\s*=\s*['\"]sender['\"]" --type py -A3 -B3

# 2. Search all Python files for any name="sender" occurrences
rg "name *= *['\"]sender['\"]" --type py -A2 -B2

# 3. Check JSON files for direct uses of "sender"
rg '"sender"' --type json -A2 -B2

Length of output: 112016


Breaking change: sender renamed to sender_type

The recent rename of the dropdown input from sender to sender_type is a breaking change. There are still numerous places across the codebase and configuration files where name="sender" is used:

• Python components

  • src/backend/base/langflow/components/input_output/chat.py
  • src/backend/base/langflow/components/input_output/chat_output.py
  • src/backend/base/langflow/components/helpers/store_message.py
  • src/backend/base/langflow/components/helpers/memory.py

• JSON fixtures (tests/data)

  • LoopTest.json, MemoryChatbotNoLLM.json, WebhookTest.json, SimpleAPITest.json, …

• Starter project templates (initial_setup/starter_projects/*.json)

  • Financial Report Parser.json, Image Sentiment Analysis.json, Hybrid Search RAG.json, …

Actions required:

  1. Provide clear migration notes in your docs for users upgrading from the old sender input.
  2. Update every DropdownInput(name="sender", …) occurrence in Python code to name="sender_type".
  3. Rename the sender field to sender_type in all JSON fixtures and starter-project definitions, and update any dependent test cases.
🤖 Prompt for AI Agents
In src/backend/base/langflow/components/helpers/memory.py around lines 51 to 58,
the DropdownInput name has been renamed from "sender" to "sender_type", which is
a breaking change. To fix this, update all occurrences of DropdownInput with
name="sender" to name="sender_type" throughout the entire codebase, including
Python files, JSON fixtures, and starter project templates. Additionally,
provide migration documentation for users explaining this change and update any
test cases or dependent code referencing the old "sender" input to use
"sender_type" instead.

Comment on lines +2879 to +2903
"sender_type": {
"_input_type": "DropdownInput",
"advanced": true,
"combobox": false,
"dialog_inputs": {},
"display_name": "Sender Type",
"dynamic": false,
"info": "Filter by sender type.",
"name": "sender_type",
"options": [
"Machine",
"User",
"Machine and User"
],
"options_metadata": [],
"placeholder": "",
"required": false,
"show": true,
"title_case": false,
"toggle": false,
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Machine and User"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Missing sender_type in field_order.

The new sender_type input isn’t included in the node’s field_order, so it may not render in the expected position. Add "sender_type" to the field_order array to maintain consistent input ordering.

🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json
around lines 2879 to 2903, the new "sender_type" input is missing from the
node's "field_order" array. To fix this, locate the "field_order" array in the
same node and add the string "sender_type" to it to ensure the input renders in
the correct position and maintains consistent ordering.

@Yukiyukiyeah Yukiyukiyeah changed the title Fix chat memory store issue and fix output types Fix: chat memory store issue and fix output types Jun 10, 2025
Copy link
Copy Markdown
Collaborator

@edwinjosechittilappilly edwinjosechittilappilly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make changes om update_outputs also.

Copy link
Copy Markdown
Collaborator

@edwinjosechittilappilly edwinjosechittilappilly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make changes in update_outputs also.

Copy link
Copy Markdown
Collaborator

@edwinjosechittilappilly edwinjosechittilappilly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make changes in update_outputs also.

@edwinjosechittilappilly
Copy link
Copy Markdown
Collaborator

reviewing

Copy link
Copy Markdown
Collaborator

@edwinjosechittilappilly edwinjosechittilappilly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jun 11, 2025
@edwinjosechittilappilly edwinjosechittilappilly added this pull request to the merge queue Jun 11, 2025
github-merge-queue Bot pushed a commit that referenced this pull request Jun 11, 2025
* fix chat memory

* update template

* update update outputs

* update update outputs

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Merged via the queue into main with commit 133afb5 Jun 11, 2025
74 of 75 checks passed
@edwinjosechittilappilly edwinjosechittilappilly deleted the fix-chat-memory branch June 11, 2025 17:26
Yukiyukiyeah added a commit that referenced this pull request Jun 11, 2025
* fix chat memory

* update template

* update update outputs

* update update outputs

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Yukiyukiyeah added a commit that referenced this pull request Jun 11, 2025
* fix chat memory

* update template

* update update outputs

* update update outputs

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Yukiyukiyeah added a commit that referenced this pull request Jun 13, 2025
* update SaaS, Social Media, and YouTube json file

* fix: make starter projects auto refactor not remove selected output (#8400)

* Fixed bug where starter projects were refactored incorrectly

* fix: improve handling of selected outputs in custom component template builder

- Added checks to ensure selected output is valid before attempting to set its state.
- Enhanced code readability with comments explaining the logic for selecting outputs.

* Set selected output as the previous selected output

* Update base.py

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* fix: made clean edges clean after changing dropdown of output (#8460)

fixed output considering all outputs not just selected one

* refactor(docker): remove --extra deploy flag from uv sync commands (#8485)

🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix: refactor mcp and freeze tests to be less prone to flaky results (#8486)

* Fixed mcp test to be less prone to errors

* Fix freeze spec

* fix: made button disabled state more congruent, made edit flow details submit on enter (#8339)

* Changed textarea classes

* Changed flowsettingscomponent to use form

* changed edit flow settings to use form and to submit on enter

* Reset form data on close

* Updated disabled state to have lower opacity instead of to have set background

* Fixed loading state of button

* Fix: chat memory store issue and fix output types (#8463)

* fix chat memory

* update template

* update update outputs

* update update outputs

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* ci: update setup-uv to possibly fix caching (#8490)

* update json

* fix custom component

* revert change

---------

Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
github-merge-queue Bot pushed a commit that referenced this pull request Jun 23, 2025
* Update Vector Store RAG.json

* fix: make starter projects auto refactor not remove selected output (#8400)

* Fixed bug where starter projects were refactored incorrectly

* fix: improve handling of selected outputs in custom component template builder

- Added checks to ensure selected output is valid before attempting to set its state.
- Enhanced code readability with comments explaining the logic for selecting outputs.

* Set selected output as the previous selected output

* Update base.py

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* fix: made clean edges clean after changing dropdown of output (#8460)

fixed output considering all outputs not just selected one

* refactor(docker): remove --extra deploy flag from uv sync commands (#8485)

🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix: refactor mcp and freeze tests to be less prone to flaky results (#8486)

* Fixed mcp test to be less prone to errors

* Fix freeze spec

* fix: made button disabled state more congruent, made edit flow details submit on enter (#8339)

* Changed textarea classes

* Changed flowsettingscomponent to use form

* changed edit flow settings to use form and to submit on enter

* Reset form data on close

* Updated disabled state to have lower opacity instead of to have set background

* Fixed loading state of button

* Fix: chat memory store issue and fix output types (#8463)

* fix chat memory

* update template

* update update outputs

* update update outputs

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* ci: update setup-uv to possibly fix caching (#8490)

* update templates

* update templates

* First round of template updates

* Update templates

* fix: Update SaaS, Social Media, and YouTube json file (#8441)

* update SaaS, Social Media, and YouTube json file

* fix: make starter projects auto refactor not remove selected output (#8400)

* Fixed bug where starter projects were refactored incorrectly

* fix: improve handling of selected outputs in custom component template builder

- Added checks to ensure selected output is valid before attempting to set its state.
- Enhanced code readability with comments explaining the logic for selecting outputs.

* Set selected output as the previous selected output

* Update base.py

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* fix: made clean edges clean after changing dropdown of output (#8460)

fixed output considering all outputs not just selected one

* refactor(docker): remove --extra deploy flag from uv sync commands (#8485)

🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix: refactor mcp and freeze tests to be less prone to flaky results (#8486)

* Fixed mcp test to be less prone to errors

* Fix freeze spec

* fix: made button disabled state more congruent, made edit flow details submit on enter (#8339)

* Changed textarea classes

* Changed flowsettingscomponent to use form

* changed edit flow settings to use form and to submit on enter

* Reset form data on close

* Updated disabled state to have lower opacity instead of to have set background

* Fixed loading state of button

* Fix: chat memory store issue and fix output types (#8463)

* fix chat memory

* update template

* update update outputs

* update update outputs

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* ci: update setup-uv to possibly fix caching (#8490)

* update json

* fix custom component

* revert change

---------

Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>

* fix: templates (#8499)

* basic-prompting-template-updated

* show-system-message

* names

* blog-writer-tested

* financial-report-parser

* image-sentiment-analysis

* seo-keyword-generator

* seo-keyword-generator

* Merge branch 'fix-vector-search-template' into mendons-template-branch

---------

Co-authored-by: Eric Hare <ericrhare@gmail.com>

* Update Basic Prompting.json

* Update Blog Writer.json

* Further template updates

* Update Image Sentiment Analysis.json

* Update templates

* Update Financial Report Parser.json

* Update Market Research.json

* Update Market Research.json

* Update Image Sentiment Analysis.json

* Update Market Research.json

* Update image sentiment analysis template

* Update Market Research.json

* Update Custom Component Maker.json

* Update Custom Component Maker.json

* Update Hybrid Search RAG.json

* Update Hybrid Search RAG.json

* Update Hybrid Search RAG.json

* More template updates

* Update Financial Report Parser.json

* Update Custom Component Maker.json

* Template updates

* Update Custom Component Maker.json

* Template updates

* fix custom component

* Update Financial Agent.json

* More template updates

* finance report parser fix

---------

Co-authored-by: Yuqi Tang <yuqi.tang@datastax.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
github-merge-queue Bot pushed a commit that referenced this pull request Jun 23, 2025
* Update Vector Store RAG.json

* fix: make starter projects auto refactor not remove selected output (#8400)

* Fixed bug where starter projects were refactored incorrectly

* fix: improve handling of selected outputs in custom component template builder

- Added checks to ensure selected output is valid before attempting to set its state.
- Enhanced code readability with comments explaining the logic for selecting outputs.

* Set selected output as the previous selected output

* Update base.py

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* fix: made clean edges clean after changing dropdown of output (#8460)

fixed output considering all outputs not just selected one

* refactor(docker): remove --extra deploy flag from uv sync commands (#8485)

🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix: refactor mcp and freeze tests to be less prone to flaky results (#8486)

* Fixed mcp test to be less prone to errors

* Fix freeze spec

* fix: made button disabled state more congruent, made edit flow details submit on enter (#8339)

* Changed textarea classes

* Changed flowsettingscomponent to use form

* changed edit flow settings to use form and to submit on enter

* Reset form data on close

* Updated disabled state to have lower opacity instead of to have set background

* Fixed loading state of button

* Fix: chat memory store issue and fix output types (#8463)

* fix chat memory

* update template

* update update outputs

* update update outputs

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* ci: update setup-uv to possibly fix caching (#8490)

* update templates

* update templates

* First round of template updates

* Update templates

* fix: Update SaaS, Social Media, and YouTube json file (#8441)

* update SaaS, Social Media, and YouTube json file

* fix: make starter projects auto refactor not remove selected output (#8400)

* Fixed bug where starter projects were refactored incorrectly

* fix: improve handling of selected outputs in custom component template builder

- Added checks to ensure selected output is valid before attempting to set its state.
- Enhanced code readability with comments explaining the logic for selecting outputs.

* Set selected output as the previous selected output

* Update base.py

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* fix: made clean edges clean after changing dropdown of output (#8460)

fixed output considering all outputs not just selected one

* refactor(docker): remove --extra deploy flag from uv sync commands (#8485)

🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix: refactor mcp and freeze tests to be less prone to flaky results (#8486)

* Fixed mcp test to be less prone to errors

* Fix freeze spec

* fix: made button disabled state more congruent, made edit flow details submit on enter (#8339)

* Changed textarea classes

* Changed flowsettingscomponent to use form

* changed edit flow settings to use form and to submit on enter

* Reset form data on close

* Updated disabled state to have lower opacity instead of to have set background

* Fixed loading state of button

* Fix: chat memory store issue and fix output types (#8463)

* fix chat memory

* update template

* update update outputs

* update update outputs

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* ci: update setup-uv to possibly fix caching (#8490)

* update json

* fix custom component

* revert change

---------

Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>

* fix: templates (#8499)

* basic-prompting-template-updated

* show-system-message

* names

* blog-writer-tested

* financial-report-parser

* image-sentiment-analysis

* seo-keyword-generator

* seo-keyword-generator

* Merge branch 'fix-vector-search-template' into mendons-template-branch

---------

Co-authored-by: Eric Hare <ericrhare@gmail.com>

* Update Basic Prompting.json

* Update Blog Writer.json

* Further template updates

* Update Image Sentiment Analysis.json

* Update templates

* Update Financial Report Parser.json

* Update Market Research.json

* Update Market Research.json

* update several templates

* Update Image Sentiment Analysis.json

* Update Market Research.json

* Update image sentiment analysis template

* Update Market Research.json

* Update Custom Component Maker.json

* Update Custom Component Maker.json

* Update Hybrid Search RAG.json

* Update Hybrid Search RAG.json

* Update Hybrid Search RAG.json

* More template updates

* Update Financial Report Parser.json

* updated templates

* change custom component maker

* Update Twitter Thread Generator.json

* updates from main

* change model

* Update Research Translation Loop.json

* expanded output component to fix tests

* update template

* autofix

* fix error

* fix change back

* change back

* ci: Skip truncated values test for refactoring (#8670)

* refactor: simplify init target by removing cache cleanup and adding pre-commit hook (#8590)

* build: add pyyaml dependency

* refactor: simplify init command by removing cache cleaning and langflow run call

* refactor: simplify init target by removing cache cleanup and adding pre-commit hook

* refactor: update langchain_core.prompts import paths to use specific modules

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* feat: update structured output to multiline input and revise system prompt (#8585)

* Update structured_output.py

* [autofix.ci] apply automated fixes

* Update structured_output.py

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* update to prompt

* template updates

* Update src/backend/base/langflow/components/processing/structured_output.py

* [autofix.ci] apply automated fixes

* Update src/backend/base/langflow/components/processing/structured_output.py

* Update src/backend/base/langflow/components/processing/structured_output.py

* Update src/backend/base/langflow/components/processing/structured_output.py

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* feat: add sessions endpoint with session management enhancements (#8596)

* 📝 (monitor.py): Add endpoint to get sessions and handle session_id encoding for API requests
📝 (use-get-messages-mutation.ts): Implement a mutation function to fetch messages with query parameters and handle session_id encoding for API requests
📝 (use-get-messages-polling.ts): Ensure proper encoding of session_id for API requests in polling mutation
📝 (use-get-messages.ts): Handle session_id encoding for API requests in messages query
📝 (new-modal.tsx): Implement functions to handle session deletion and proper encoding of session_id for API requests
📝 (utils.ts): Add functions to encode, decode, validate, format, and prepare session IDs for API requests

* 📝 (constants.ts): Add SESSIONS constant to API URLs for monitoring sessions
🔧 (use-delete-messages.ts): Add queryClient to UseRequestProcessor to invalidate sessions query
✨ (use-get-sessions-from-flow.ts): Introduce useGetSessionsFromFlowQuery to fetch sessions from flow
🔧 (use-rename-session.ts): Change refetchQueries to invalidateQueries for useGetSessionsFromFlowQuery
🔧 (custom-new-modal.tsx): Update import path for IOModal to playground-modal
🔧 (session-selector.tsx): Add setActiveSession function to handle setting active session
🔧 (sidebar-open-view.tsx): Add setActiveSession function to handle setting active session
♻️ (new-modal.tsx): Refactor IOModal into playground-modal and update functionality
♻️ (playground-modal.tsx): Refactor IOModal to handle playground-specific functionality
⬆️ (flowStore.ts): Add newChatOnPlayground state and setNewChatOnPlayground function
⬆️ (index.ts): Update FlowStoreType to include newChatOnPlayground and setNewChatOnPlayground

* 🔧 (pyproject.toml): update testpaths to point to the correct directory for tests
✨ (test_session_endpoint.py): add unit tests for sessions endpoint with flow_id filtering
♻️ (session-selector.tsx): refactor to trim editedSession before setting it
♻️ (sidebar-open-view.tsx): refactor to set visibleSession instead of activeSession

* ✨ (use-get-sessions-from-flow.ts): Always include the flow ID as the default session if it's not already present
♻️ (playground-modal.tsx): Refactor setting sessions to include currentFlowId as the default session if not present, and handle visibility of sessions more efficiently

* ♻️ (use-get-messages-mutation.ts): remove unused imports and refactor code for better readability and maintainability

* ✨ (test_session_endpoint.py): refactor test function names for better clarity and consistency

* ✨ (create-new-session-name.ts): add function to generate a new session name based on the current date and time
🔧 (playground-modal.tsx): import createNewSessionName function to dynamically set a new session name when no session is visible

* [autofix.ci] apply automated fixes

* ✨ (monitor.py): rename get_sessions endpoint to get_message_sessions for clarity and consistency
🔧 (constants.ts): remove unused SESSIONS constant from API URLs
🔧 (use-delete-messages.ts): remove commented out code and unnecessary comments
✨ (use-delete-sessions.ts): add functionality to delete sessions in frontend
🔧 (use-get-sessions-from-flow.ts): update API endpoint for getting sessions to match backend changes
🔧 (playground-modal.tsx): add functionality to delete sessions and associated messages in the UI, update UI optimistically, and handle errors appropriately

* [autofix.ci] apply automated fixes

* 🐛 (monitor.py): Fix type hinting issue in delete_messages function
📝 (monitor.py): Add comments and improve readability in test_messages_endpoints.py
📝 (session_endpoint.py): Update endpoint paths for consistency and clarity in test_session_endpoint.py

* [autofix.ci] apply automated fixes

* fix: update SQL statement to use col() for session_id filtering in get_message_sessions function

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix: implemented cached values and temporary MCP servers on MCP component (#8628)

* Added actionCount to fetch only servers without actionCount

* Updated queries and uses to use servers without action data first, and then to fetch them

* removed comment

* updated constants

* Added loading dropdown

* Make options persist

* Implemented new value format for McpComponent and implemented saving and removing temp Mcp Server if config is existent

* Changed value type

* Implemented cache and saving the server config

* Fixed mcp server test

* fix backend formatting

* fixed lint

* Added await

* Fixed save button not appearing when no servers are available

* added condition to only show save button when options is not null

* template autofix

* change template

* update text sentiment analysis

* change basic prompt back

* change image sentiment back

* update text sentiment and twitter

* Update Twitter Thread Generator.json

* Add back the input for the chat

* add change

* fix text sentiment

* update research translation

* Update Research Translation Loop.json

---------

Co-authored-by: Eric Hare <ericrhare@gmail.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
ogabrielluiz pushed a commit to bkatya2001/langflow that referenced this pull request Jun 24, 2025
* fix chat memory

* update template

* update update outputs

* update update outputs

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
ogabrielluiz added a commit to bkatya2001/langflow that referenced this pull request Jun 24, 2025
* Update Vector Store RAG.json

* fix: make starter projects auto refactor not remove selected output (langflow-ai#8400)

* Fixed bug where starter projects were refactored incorrectly

* fix: improve handling of selected outputs in custom component template builder

- Added checks to ensure selected output is valid before attempting to set its state.
- Enhanced code readability with comments explaining the logic for selecting outputs.

* Set selected output as the previous selected output

* Update base.py

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* fix: made clean edges clean after changing dropdown of output (langflow-ai#8460)

fixed output considering all outputs not just selected one

* refactor(docker): remove --extra deploy flag from uv sync commands (langflow-ai#8485)

🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix: refactor mcp and freeze tests to be less prone to flaky results (langflow-ai#8486)

* Fixed mcp test to be less prone to errors

* Fix freeze spec

* fix: made button disabled state more congruent, made edit flow details submit on enter (langflow-ai#8339)

* Changed textarea classes

* Changed flowsettingscomponent to use form

* changed edit flow settings to use form and to submit on enter

* Reset form data on close

* Updated disabled state to have lower opacity instead of to have set background

* Fixed loading state of button

* Fix: chat memory store issue and fix output types (langflow-ai#8463)

* fix chat memory

* update template

* update update outputs

* update update outputs

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* ci: update setup-uv to possibly fix caching (langflow-ai#8490)

* update templates

* update templates

* First round of template updates

* Update templates

* fix: Update SaaS, Social Media, and YouTube json file (langflow-ai#8441)

* update SaaS, Social Media, and YouTube json file

* fix: make starter projects auto refactor not remove selected output (langflow-ai#8400)

* Fixed bug where starter projects were refactored incorrectly

* fix: improve handling of selected outputs in custom component template builder

- Added checks to ensure selected output is valid before attempting to set its state.
- Enhanced code readability with comments explaining the logic for selecting outputs.

* Set selected output as the previous selected output

* Update base.py

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* fix: made clean edges clean after changing dropdown of output (langflow-ai#8460)

fixed output considering all outputs not just selected one

* refactor(docker): remove --extra deploy flag from uv sync commands (langflow-ai#8485)

🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix: refactor mcp and freeze tests to be less prone to flaky results (langflow-ai#8486)

* Fixed mcp test to be less prone to errors

* Fix freeze spec

* fix: made button disabled state more congruent, made edit flow details submit on enter (langflow-ai#8339)

* Changed textarea classes

* Changed flowsettingscomponent to use form

* changed edit flow settings to use form and to submit on enter

* Reset form data on close

* Updated disabled state to have lower opacity instead of to have set background

* Fixed loading state of button

* Fix: chat memory store issue and fix output types (langflow-ai#8463)

* fix chat memory

* update template

* update update outputs

* update update outputs

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* ci: update setup-uv to possibly fix caching (langflow-ai#8490)

* update json

* fix custom component

* revert change

---------

Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>

* fix: templates (langflow-ai#8499)

* basic-prompting-template-updated

* show-system-message

* names

* blog-writer-tested

* financial-report-parser

* image-sentiment-analysis

* seo-keyword-generator

* seo-keyword-generator

* Merge branch 'fix-vector-search-template' into mendons-template-branch

---------

Co-authored-by: Eric Hare <ericrhare@gmail.com>

* Update Basic Prompting.json

* Update Blog Writer.json

* Further template updates

* Update Image Sentiment Analysis.json

* Update templates

* Update Financial Report Parser.json

* Update Market Research.json

* Update Market Research.json

* Update Image Sentiment Analysis.json

* Update Market Research.json

* Update image sentiment analysis template

* Update Market Research.json

* Update Custom Component Maker.json

* Update Custom Component Maker.json

* Update Hybrid Search RAG.json

* Update Hybrid Search RAG.json

* Update Hybrid Search RAG.json

* More template updates

* Update Financial Report Parser.json

* Update Custom Component Maker.json

* Template updates

* Update Custom Component Maker.json

* Template updates

* fix custom component

* Update Financial Agent.json

* More template updates

* finance report parser fix

---------

Co-authored-by: Yuqi Tang <yuqi.tang@datastax.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
ogabrielluiz added a commit to bkatya2001/langflow that referenced this pull request Jun 24, 2025
* Update Vector Store RAG.json

* fix: make starter projects auto refactor not remove selected output (langflow-ai#8400)

* Fixed bug where starter projects were refactored incorrectly

* fix: improve handling of selected outputs in custom component template builder

- Added checks to ensure selected output is valid before attempting to set its state.
- Enhanced code readability with comments explaining the logic for selecting outputs.

* Set selected output as the previous selected output

* Update base.py

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* fix: made clean edges clean after changing dropdown of output (langflow-ai#8460)

fixed output considering all outputs not just selected one

* refactor(docker): remove --extra deploy flag from uv sync commands (langflow-ai#8485)

🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix: refactor mcp and freeze tests to be less prone to flaky results (langflow-ai#8486)

* Fixed mcp test to be less prone to errors

* Fix freeze spec

* fix: made button disabled state more congruent, made edit flow details submit on enter (langflow-ai#8339)

* Changed textarea classes

* Changed flowsettingscomponent to use form

* changed edit flow settings to use form and to submit on enter

* Reset form data on close

* Updated disabled state to have lower opacity instead of to have set background

* Fixed loading state of button

* Fix: chat memory store issue and fix output types (langflow-ai#8463)

* fix chat memory

* update template

* update update outputs

* update update outputs

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* ci: update setup-uv to possibly fix caching (langflow-ai#8490)

* update templates

* update templates

* First round of template updates

* Update templates

* fix: Update SaaS, Social Media, and YouTube json file (langflow-ai#8441)

* update SaaS, Social Media, and YouTube json file

* fix: make starter projects auto refactor not remove selected output (langflow-ai#8400)

* Fixed bug where starter projects were refactored incorrectly

* fix: improve handling of selected outputs in custom component template builder

- Added checks to ensure selected output is valid before attempting to set its state.
- Enhanced code readability with comments explaining the logic for selecting outputs.

* Set selected output as the previous selected output

* Update base.py

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* fix: made clean edges clean after changing dropdown of output (langflow-ai#8460)

fixed output considering all outputs not just selected one

* refactor(docker): remove --extra deploy flag from uv sync commands (langflow-ai#8485)

🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix: refactor mcp and freeze tests to be less prone to flaky results (langflow-ai#8486)

* Fixed mcp test to be less prone to errors

* Fix freeze spec

* fix: made button disabled state more congruent, made edit flow details submit on enter (langflow-ai#8339)

* Changed textarea classes

* Changed flowsettingscomponent to use form

* changed edit flow settings to use form and to submit on enter

* Reset form data on close

* Updated disabled state to have lower opacity instead of to have set background

* Fixed loading state of button

* Fix: chat memory store issue and fix output types (langflow-ai#8463)

* fix chat memory

* update template

* update update outputs

* update update outputs

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* ci: update setup-uv to possibly fix caching (langflow-ai#8490)

* update json

* fix custom component

* revert change

---------

Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>

* fix: templates (langflow-ai#8499)

* basic-prompting-template-updated

* show-system-message

* names

* blog-writer-tested

* financial-report-parser

* image-sentiment-analysis

* seo-keyword-generator

* seo-keyword-generator

* Merge branch 'fix-vector-search-template' into mendons-template-branch

---------

Co-authored-by: Eric Hare <ericrhare@gmail.com>

* Update Basic Prompting.json

* Update Blog Writer.json

* Further template updates

* Update Image Sentiment Analysis.json

* Update templates

* Update Financial Report Parser.json

* Update Market Research.json

* Update Market Research.json

* update several templates

* Update Image Sentiment Analysis.json

* Update Market Research.json

* Update image sentiment analysis template

* Update Market Research.json

* Update Custom Component Maker.json

* Update Custom Component Maker.json

* Update Hybrid Search RAG.json

* Update Hybrid Search RAG.json

* Update Hybrid Search RAG.json

* More template updates

* Update Financial Report Parser.json

* updated templates

* change custom component maker

* Update Twitter Thread Generator.json

* updates from main

* change model

* Update Research Translation Loop.json

* expanded output component to fix tests

* update template

* autofix

* fix error

* fix change back

* change back

* ci: Skip truncated values test for refactoring (langflow-ai#8670)

* refactor: simplify init target by removing cache cleanup and adding pre-commit hook (langflow-ai#8590)

* build: add pyyaml dependency

* refactor: simplify init command by removing cache cleaning and langflow run call

* refactor: simplify init target by removing cache cleanup and adding pre-commit hook

* refactor: update langchain_core.prompts import paths to use specific modules

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* feat: update structured output to multiline input and revise system prompt (langflow-ai#8585)

* Update structured_output.py

* [autofix.ci] apply automated fixes

* Update structured_output.py

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* update to prompt

* template updates

* Update src/backend/base/langflow/components/processing/structured_output.py

* [autofix.ci] apply automated fixes

* Update src/backend/base/langflow/components/processing/structured_output.py

* Update src/backend/base/langflow/components/processing/structured_output.py

* Update src/backend/base/langflow/components/processing/structured_output.py

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* feat: add sessions endpoint with session management enhancements (langflow-ai#8596)

* 📝 (monitor.py): Add endpoint to get sessions and handle session_id encoding for API requests
📝 (use-get-messages-mutation.ts): Implement a mutation function to fetch messages with query parameters and handle session_id encoding for API requests
📝 (use-get-messages-polling.ts): Ensure proper encoding of session_id for API requests in polling mutation
📝 (use-get-messages.ts): Handle session_id encoding for API requests in messages query
📝 (new-modal.tsx): Implement functions to handle session deletion and proper encoding of session_id for API requests
📝 (utils.ts): Add functions to encode, decode, validate, format, and prepare session IDs for API requests

* 📝 (constants.ts): Add SESSIONS constant to API URLs for monitoring sessions
🔧 (use-delete-messages.ts): Add queryClient to UseRequestProcessor to invalidate sessions query
✨ (use-get-sessions-from-flow.ts): Introduce useGetSessionsFromFlowQuery to fetch sessions from flow
🔧 (use-rename-session.ts): Change refetchQueries to invalidateQueries for useGetSessionsFromFlowQuery
🔧 (custom-new-modal.tsx): Update import path for IOModal to playground-modal
🔧 (session-selector.tsx): Add setActiveSession function to handle setting active session
🔧 (sidebar-open-view.tsx): Add setActiveSession function to handle setting active session
♻️ (new-modal.tsx): Refactor IOModal into playground-modal and update functionality
♻️ (playground-modal.tsx): Refactor IOModal to handle playground-specific functionality
⬆️ (flowStore.ts): Add newChatOnPlayground state and setNewChatOnPlayground function
⬆️ (index.ts): Update FlowStoreType to include newChatOnPlayground and setNewChatOnPlayground

* 🔧 (pyproject.toml): update testpaths to point to the correct directory for tests
✨ (test_session_endpoint.py): add unit tests for sessions endpoint with flow_id filtering
♻️ (session-selector.tsx): refactor to trim editedSession before setting it
♻️ (sidebar-open-view.tsx): refactor to set visibleSession instead of activeSession

* ✨ (use-get-sessions-from-flow.ts): Always include the flow ID as the default session if it's not already present
♻️ (playground-modal.tsx): Refactor setting sessions to include currentFlowId as the default session if not present, and handle visibility of sessions more efficiently

* ♻️ (use-get-messages-mutation.ts): remove unused imports and refactor code for better readability and maintainability

* ✨ (test_session_endpoint.py): refactor test function names for better clarity and consistency

* ✨ (create-new-session-name.ts): add function to generate a new session name based on the current date and time
🔧 (playground-modal.tsx): import createNewSessionName function to dynamically set a new session name when no session is visible

* [autofix.ci] apply automated fixes

* ✨ (monitor.py): rename get_sessions endpoint to get_message_sessions for clarity and consistency
🔧 (constants.ts): remove unused SESSIONS constant from API URLs
🔧 (use-delete-messages.ts): remove commented out code and unnecessary comments
✨ (use-delete-sessions.ts): add functionality to delete sessions in frontend
🔧 (use-get-sessions-from-flow.ts): update API endpoint for getting sessions to match backend changes
🔧 (playground-modal.tsx): add functionality to delete sessions and associated messages in the UI, update UI optimistically, and handle errors appropriately

* [autofix.ci] apply automated fixes

* 🐛 (monitor.py): Fix type hinting issue in delete_messages function
📝 (monitor.py): Add comments and improve readability in test_messages_endpoints.py
📝 (session_endpoint.py): Update endpoint paths for consistency and clarity in test_session_endpoint.py

* [autofix.ci] apply automated fixes

* fix: update SQL statement to use col() for session_id filtering in get_message_sessions function

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix: implemented cached values and temporary MCP servers on MCP component (langflow-ai#8628)

* Added actionCount to fetch only servers without actionCount

* Updated queries and uses to use servers without action data first, and then to fetch them

* removed comment

* updated constants

* Added loading dropdown

* Make options persist

* Implemented new value format for McpComponent and implemented saving and removing temp Mcp Server if config is existent

* Changed value type

* Implemented cache and saving the server config

* Fixed mcp server test

* fix backend formatting

* fixed lint

* Added await

* Fixed save button not appearing when no servers are available

* added condition to only show save button when options is not null

* template autofix

* change template

* update text sentiment analysis

* change basic prompt back

* change image sentiment back

* update text sentiment and twitter

* Update Twitter Thread Generator.json

* Add back the input for the chat

* add change

* fix text sentiment

* update research translation

* Update Research Translation Loop.json

---------

Co-authored-by: Eric Hare <ericrhare@gmail.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Khurdhula-Harshavardhan pushed a commit to JigsawStack/langflow that referenced this pull request Jul 1, 2025
* Update Vector Store RAG.json

* fix: make starter projects auto refactor not remove selected output (langflow-ai#8400)

* Fixed bug where starter projects were refactored incorrectly

* fix: improve handling of selected outputs in custom component template builder

- Added checks to ensure selected output is valid before attempting to set its state.
- Enhanced code readability with comments explaining the logic for selecting outputs.

* Set selected output as the previous selected output

* Update base.py

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* fix: made clean edges clean after changing dropdown of output (langflow-ai#8460)

fixed output considering all outputs not just selected one

* refactor(docker): remove --extra deploy flag from uv sync commands (langflow-ai#8485)

🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix: refactor mcp and freeze tests to be less prone to flaky results (langflow-ai#8486)

* Fixed mcp test to be less prone to errors

* Fix freeze spec

* fix: made button disabled state more congruent, made edit flow details submit on enter (langflow-ai#8339)

* Changed textarea classes

* Changed flowsettingscomponent to use form

* changed edit flow settings to use form and to submit on enter

* Reset form data on close

* Updated disabled state to have lower opacity instead of to have set background

* Fixed loading state of button

* Fix: chat memory store issue and fix output types (langflow-ai#8463)

* fix chat memory

* update template

* update update outputs

* update update outputs

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* ci: update setup-uv to possibly fix caching (langflow-ai#8490)

* update templates

* update templates

* First round of template updates

* Update templates

* fix: Update SaaS, Social Media, and YouTube json file (langflow-ai#8441)

* update SaaS, Social Media, and YouTube json file

* fix: make starter projects auto refactor not remove selected output (langflow-ai#8400)

* Fixed bug where starter projects were refactored incorrectly

* fix: improve handling of selected outputs in custom component template builder

- Added checks to ensure selected output is valid before attempting to set its state.
- Enhanced code readability with comments explaining the logic for selecting outputs.

* Set selected output as the previous selected output

* Update base.py

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* fix: made clean edges clean after changing dropdown of output (langflow-ai#8460)

fixed output considering all outputs not just selected one

* refactor(docker): remove --extra deploy flag from uv sync commands (langflow-ai#8485)

🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix: refactor mcp and freeze tests to be less prone to flaky results (langflow-ai#8486)

* Fixed mcp test to be less prone to errors

* Fix freeze spec

* fix: made button disabled state more congruent, made edit flow details submit on enter (langflow-ai#8339)

* Changed textarea classes

* Changed flowsettingscomponent to use form

* changed edit flow settings to use form and to submit on enter

* Reset form data on close

* Updated disabled state to have lower opacity instead of to have set background

* Fixed loading state of button

* Fix: chat memory store issue and fix output types (langflow-ai#8463)

* fix chat memory

* update template

* update update outputs

* update update outputs

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* ci: update setup-uv to possibly fix caching (langflow-ai#8490)

* update json

* fix custom component

* revert change

---------

Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>

* fix: templates (langflow-ai#8499)

* basic-prompting-template-updated

* show-system-message

* names

* blog-writer-tested

* financial-report-parser

* image-sentiment-analysis

* seo-keyword-generator

* seo-keyword-generator

* Merge branch 'fix-vector-search-template' into mendons-template-branch

---------

Co-authored-by: Eric Hare <ericrhare@gmail.com>

* Update Basic Prompting.json

* Update Blog Writer.json

* Further template updates

* Update Image Sentiment Analysis.json

* Update templates

* Update Financial Report Parser.json

* Update Market Research.json

* Update Market Research.json

* Update Image Sentiment Analysis.json

* Update Market Research.json

* Update image sentiment analysis template

* Update Market Research.json

* Update Custom Component Maker.json

* Update Custom Component Maker.json

* Update Hybrid Search RAG.json

* Update Hybrid Search RAG.json

* Update Hybrid Search RAG.json

* More template updates

* Update Financial Report Parser.json

* Update Custom Component Maker.json

* Template updates

* Update Custom Component Maker.json

* Template updates

* fix custom component

* Update Financial Agent.json

* More template updates

* finance report parser fix

---------

Co-authored-by: Yuqi Tang <yuqi.tang@datastax.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
Khurdhula-Harshavardhan pushed a commit to JigsawStack/langflow that referenced this pull request Jul 1, 2025
* Update Vector Store RAG.json

* fix: make starter projects auto refactor not remove selected output (langflow-ai#8400)

* Fixed bug where starter projects were refactored incorrectly

* fix: improve handling of selected outputs in custom component template builder

- Added checks to ensure selected output is valid before attempting to set its state.
- Enhanced code readability with comments explaining the logic for selecting outputs.

* Set selected output as the previous selected output

* Update base.py

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* fix: made clean edges clean after changing dropdown of output (langflow-ai#8460)

fixed output considering all outputs not just selected one

* refactor(docker): remove --extra deploy flag from uv sync commands (langflow-ai#8485)

🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix: refactor mcp and freeze tests to be less prone to flaky results (langflow-ai#8486)

* Fixed mcp test to be less prone to errors

* Fix freeze spec

* fix: made button disabled state more congruent, made edit flow details submit on enter (langflow-ai#8339)

* Changed textarea classes

* Changed flowsettingscomponent to use form

* changed edit flow settings to use form and to submit on enter

* Reset form data on close

* Updated disabled state to have lower opacity instead of to have set background

* Fixed loading state of button

* Fix: chat memory store issue and fix output types (langflow-ai#8463)

* fix chat memory

* update template

* update update outputs

* update update outputs

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* ci: update setup-uv to possibly fix caching (langflow-ai#8490)

* update templates

* update templates

* First round of template updates

* Update templates

* fix: Update SaaS, Social Media, and YouTube json file (langflow-ai#8441)

* update SaaS, Social Media, and YouTube json file

* fix: make starter projects auto refactor not remove selected output (langflow-ai#8400)

* Fixed bug where starter projects were refactored incorrectly

* fix: improve handling of selected outputs in custom component template builder

- Added checks to ensure selected output is valid before attempting to set its state.
- Enhanced code readability with comments explaining the logic for selecting outputs.

* Set selected output as the previous selected output

* Update base.py

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* fix: made clean edges clean after changing dropdown of output (langflow-ai#8460)

fixed output considering all outputs not just selected one

* refactor(docker): remove --extra deploy flag from uv sync commands (langflow-ai#8485)

🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix: refactor mcp and freeze tests to be less prone to flaky results (langflow-ai#8486)

* Fixed mcp test to be less prone to errors

* Fix freeze spec

* fix: made button disabled state more congruent, made edit flow details submit on enter (langflow-ai#8339)

* Changed textarea classes

* Changed flowsettingscomponent to use form

* changed edit flow settings to use form and to submit on enter

* Reset form data on close

* Updated disabled state to have lower opacity instead of to have set background

* Fixed loading state of button

* Fix: chat memory store issue and fix output types (langflow-ai#8463)

* fix chat memory

* update template

* update update outputs

* update update outputs

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* ci: update setup-uv to possibly fix caching (langflow-ai#8490)

* update json

* fix custom component

* revert change

---------

Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>

* fix: templates (langflow-ai#8499)

* basic-prompting-template-updated

* show-system-message

* names

* blog-writer-tested

* financial-report-parser

* image-sentiment-analysis

* seo-keyword-generator

* seo-keyword-generator

* Merge branch 'fix-vector-search-template' into mendons-template-branch

---------

Co-authored-by: Eric Hare <ericrhare@gmail.com>

* Update Basic Prompting.json

* Update Blog Writer.json

* Further template updates

* Update Image Sentiment Analysis.json

* Update templates

* Update Financial Report Parser.json

* Update Market Research.json

* Update Market Research.json

* update several templates

* Update Image Sentiment Analysis.json

* Update Market Research.json

* Update image sentiment analysis template

* Update Market Research.json

* Update Custom Component Maker.json

* Update Custom Component Maker.json

* Update Hybrid Search RAG.json

* Update Hybrid Search RAG.json

* Update Hybrid Search RAG.json

* More template updates

* Update Financial Report Parser.json

* updated templates

* change custom component maker

* Update Twitter Thread Generator.json

* updates from main

* change model

* Update Research Translation Loop.json

* expanded output component to fix tests

* update template

* autofix

* fix error

* fix change back

* change back

* ci: Skip truncated values test for refactoring (langflow-ai#8670)

* refactor: simplify init target by removing cache cleanup and adding pre-commit hook (langflow-ai#8590)

* build: add pyyaml dependency

* refactor: simplify init command by removing cache cleaning and langflow run call

* refactor: simplify init target by removing cache cleanup and adding pre-commit hook

* refactor: update langchain_core.prompts import paths to use specific modules

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* feat: update structured output to multiline input and revise system prompt (langflow-ai#8585)

* Update structured_output.py

* [autofix.ci] apply automated fixes

* Update structured_output.py

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* update to prompt

* template updates

* Update src/backend/base/langflow/components/processing/structured_output.py

* [autofix.ci] apply automated fixes

* Update src/backend/base/langflow/components/processing/structured_output.py

* Update src/backend/base/langflow/components/processing/structured_output.py

* Update src/backend/base/langflow/components/processing/structured_output.py

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* feat: add sessions endpoint with session management enhancements (langflow-ai#8596)

* 📝 (monitor.py): Add endpoint to get sessions and handle session_id encoding for API requests
📝 (use-get-messages-mutation.ts): Implement a mutation function to fetch messages with query parameters and handle session_id encoding for API requests
📝 (use-get-messages-polling.ts): Ensure proper encoding of session_id for API requests in polling mutation
📝 (use-get-messages.ts): Handle session_id encoding for API requests in messages query
📝 (new-modal.tsx): Implement functions to handle session deletion and proper encoding of session_id for API requests
📝 (utils.ts): Add functions to encode, decode, validate, format, and prepare session IDs for API requests

* 📝 (constants.ts): Add SESSIONS constant to API URLs for monitoring sessions
🔧 (use-delete-messages.ts): Add queryClient to UseRequestProcessor to invalidate sessions query
✨ (use-get-sessions-from-flow.ts): Introduce useGetSessionsFromFlowQuery to fetch sessions from flow
🔧 (use-rename-session.ts): Change refetchQueries to invalidateQueries for useGetSessionsFromFlowQuery
🔧 (custom-new-modal.tsx): Update import path for IOModal to playground-modal
🔧 (session-selector.tsx): Add setActiveSession function to handle setting active session
🔧 (sidebar-open-view.tsx): Add setActiveSession function to handle setting active session
♻️ (new-modal.tsx): Refactor IOModal into playground-modal and update functionality
♻️ (playground-modal.tsx): Refactor IOModal to handle playground-specific functionality
⬆️ (flowStore.ts): Add newChatOnPlayground state and setNewChatOnPlayground function
⬆️ (index.ts): Update FlowStoreType to include newChatOnPlayground and setNewChatOnPlayground

* 🔧 (pyproject.toml): update testpaths to point to the correct directory for tests
✨ (test_session_endpoint.py): add unit tests for sessions endpoint with flow_id filtering
♻️ (session-selector.tsx): refactor to trim editedSession before setting it
♻️ (sidebar-open-view.tsx): refactor to set visibleSession instead of activeSession

* ✨ (use-get-sessions-from-flow.ts): Always include the flow ID as the default session if it's not already present
♻️ (playground-modal.tsx): Refactor setting sessions to include currentFlowId as the default session if not present, and handle visibility of sessions more efficiently

* ♻️ (use-get-messages-mutation.ts): remove unused imports and refactor code for better readability and maintainability

* ✨ (test_session_endpoint.py): refactor test function names for better clarity and consistency

* ✨ (create-new-session-name.ts): add function to generate a new session name based on the current date and time
🔧 (playground-modal.tsx): import createNewSessionName function to dynamically set a new session name when no session is visible

* [autofix.ci] apply automated fixes

* ✨ (monitor.py): rename get_sessions endpoint to get_message_sessions for clarity and consistency
🔧 (constants.ts): remove unused SESSIONS constant from API URLs
🔧 (use-delete-messages.ts): remove commented out code and unnecessary comments
✨ (use-delete-sessions.ts): add functionality to delete sessions in frontend
🔧 (use-get-sessions-from-flow.ts): update API endpoint for getting sessions to match backend changes
🔧 (playground-modal.tsx): add functionality to delete sessions and associated messages in the UI, update UI optimistically, and handle errors appropriately

* [autofix.ci] apply automated fixes

* 🐛 (monitor.py): Fix type hinting issue in delete_messages function
📝 (monitor.py): Add comments and improve readability in test_messages_endpoints.py
📝 (session_endpoint.py): Update endpoint paths for consistency and clarity in test_session_endpoint.py

* [autofix.ci] apply automated fixes

* fix: update SQL statement to use col() for session_id filtering in get_message_sessions function

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix: implemented cached values and temporary MCP servers on MCP component (langflow-ai#8628)

* Added actionCount to fetch only servers without actionCount

* Updated queries and uses to use servers without action data first, and then to fetch them

* removed comment

* updated constants

* Added loading dropdown

* Make options persist

* Implemented new value format for McpComponent and implemented saving and removing temp Mcp Server if config is existent

* Changed value type

* Implemented cache and saving the server config

* Fixed mcp server test

* fix backend formatting

* fixed lint

* Added await

* Fixed save button not appearing when no servers are available

* added condition to only show save button when options is not null

* template autofix

* change template

* update text sentiment analysis

* change basic prompt back

* change image sentiment back

* update text sentiment and twitter

* Update Twitter Thread Generator.json

* Add back the input for the chat

* add change

* fix text sentiment

* update research translation

* Update Research Translation Loop.json

---------

Co-authored-by: Eric Hare <ericrhare@gmail.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants