Skip to content

ref: prompt and parser component#8305

Merged
edwinjosechittilappilly merged 6 commits into
mainfrom
fix-prompt-component
May 30, 2025
Merged

ref: prompt and parser component#8305
edwinjosechittilappilly merged 6 commits into
mainfrom
fix-prompt-component

Conversation

@edwinjosechittilappilly
Copy link
Copy Markdown
Collaborator

@edwinjosechittilappilly edwinjosechittilappilly commented May 30, 2025

Summary by CodeRabbit

  • Style

    • Updated the icon for all Prompt components from "prompts" to "braces" for improved visual consistency.
    • Changed output display name from "Prompt Message" to "Prompt" across all relevant components and starter projects.
    • Simplified and clarified descriptions and labels in Parser components for a more concise interface.
  • Bug Fixes

    • Corrected UI test selectors to match the updated output display name and icon, ensuring tests interact with the correct elements.
  • Refactor

    • Reordered and updated inputs for Parser components, improving usability and clarity without altering core functionality.

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label May 30, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 30, 2025

Walkthrough

This change updates both backend and frontend components related to "Prompt" and "Parser" functionality. It standardizes the icon and output display name for Prompt components across Python and JSON files, and reorders as well as simplifies the input configuration and description for Parser components. Test selectors are also updated to match these naming changes.

Changes

Files / Paths Change Summary
src/backend/base/langflow/components/processing/parser.py Reordered ParserComponent inputs, simplified description, removed duplicate input declaration.
src/backend/base/langflow/components/prompts/prompt.py Changed PromptComponent icon from "prompts" to "braces"; output display name from "Prompt Message" to "Prompt".
src/backend/base/langflow/initial_setup/starter_projects/... (multiple JSON files) Updated Prompt components: icon set to "braces", output display name to "Prompt"; updated embedded code. Parser components: reordered inputs, simplified description, adjusted defaults and visibility logic.
src/frontend/tests/core/integrations/decisionFlow.spec.ts
src/frontend/tests/extended/regression/generalBugs-shard-10.spec.ts
Updated test selectors to use "prompt" instead of "prompt message" in test IDs.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant UI
    participant Backend

    User->>UI: Interacts with Prompt/Parser node
    UI->>Backend: Sends input data/config (with new icon, output name, input order)
    Backend->>Backend: ParserComponent processes input (new order/description)
    Backend->>Backend: PromptComponent returns output ("Prompt", icon "braces")
    Backend->>UI: Returns processed result/output
    UI->>User: Displays updated node with new icon/output label
Loading

Possibly related PRs

Suggested labels

refactor, enhancement

Suggested reviewers

  • edwinjosechittilappilly

📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between fd73cdc and 8f2d95b.

📒 Files selected for processing (27)
  • src/backend/base/langflow/components/processing/parser.py (1 hunks)
  • src/backend/base/langflow/components/prompts/prompt.py (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Basic Prompt Chaining.json (9 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Blog Writer.json (5 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Custom Component Maker.json (3 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Diet Analysis.json (3 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Document Q&A.json (3 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Financial Agent.json (6 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Hybrid Search RAG.json (4 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Image Sentiment Analysis.json (3 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json (9 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Invoice Summarizer.json (3 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json (6 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Memory Chatbot.json (3 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Portfolio Website Code Generator.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Research Agent.json (12 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Research Translation Loop.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/SEO Keyword Generator.json (6 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/SaaS Pricing.json (3 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks Agents.json (9 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Text Sentiment Analysis.json (9 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Twitter Thread Generator.json (3 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Vector Store RAG.json (3 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Youtube Analysis.json (3 hunks)
  • src/frontend/tests/core/integrations/decisionFlow.spec.ts (1 hunks)
  • src/frontend/tests/extended/regression/generalBugs-shard-10.spec.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (11)
  • GitHub Check: Run Frontend Tests / Playwright Tests - Shard 5/10
  • GitHub Check: Run Frontend Tests / Playwright Tests - Shard 9/10
  • GitHub Check: Run Frontend Tests / Playwright Tests - Shard 8/10
  • GitHub Check: Run Frontend Tests / Playwright Tests - Shard 7/10
  • GitHub Check: Run Frontend Tests / Playwright Tests - Shard 1/10
  • GitHub Check: Run Frontend Tests / Playwright Tests - Shard 2/10
  • GitHub Check: Run Frontend Tests / Playwright Tests - Shard 10/10
  • GitHub Check: Run Frontend Tests / Playwright Tests - Shard 6/10
  • GitHub Check: Run Frontend Tests / Playwright Tests - Shard 4/10
  • GitHub Check: Run Frontend Tests / Playwright Tests - Shard 3/10
  • GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 1
🔇 Additional comments (83)
src/backend/base/langflow/components/prompts/prompt.py (2)

12-12: LGTM! Icon standardization improves consistency.

The icon change from "prompts" to "braces" aligns with the broader component standardization effort mentioned in the PR objectives.


28-28: LGTM! Display name simplification enhances clarity.

Changing the output display name from "Prompt Message" to "Prompt" provides a cleaner, more concise label while maintaining clarity.

src/frontend/tests/extended/regression/generalBugs-shard-10.spec.ts (1)

38-38:

Details

✅ Verification successful

Verify test selector alignment with backend changes.

The test selector update from "handle-prompt-shownode-prompt message-right" to "handle-prompt-shownode-prompt-right" appears to align with the backend display name change from "Prompt Message" to "Prompt".

Run this script to verify the selector change aligns with the frontend component rendering:


🏁 Script executed:

#!/bin/bash
# Description: Verify that test selectors align with component display names
# Expected: Find references to the new selector pattern in frontend code

echo "Searching for the new test selector pattern..."
rg -A 2 -B 2 "handle-prompt-shownode-prompt-right"

echo "Searching for any remaining old selector patterns..."
rg -A 2 -B 2 "handle-prompt-shownode-prompt message-right"

Length of output: 1187


Test selectors updated consistently

All instances of the old selector "handle-prompt-shownode-prompt message-right" have been removed and replaced with "handle-prompt-shownode-prompt-right":

  • src/frontend/tests/extended/regression/generalBugs-shard-10.spec.ts
  • src/frontend/tests/core/integrations/decisionFlow.spec.ts

No occurrences of the old pattern remain. Tests should now correctly align with the backend’s updated display name.

src/frontend/tests/core/integrations/decisionFlow.spec.ts (1)

284-284: LGTM! Consistent test selector update.

This test selector update matches the same change made in the regression test file, ensuring consistency across the test suite and alignment with the backend display name changes.

src/backend/base/langflow/components/processing/parser.py (2)

17-17: LGTM! Description simplification improves clarity.

The updated description "Extracts text using a template." is more concise and direct compared to the previous detailed multi-sentence explanation.


21-27: LGTM! Input reordering improves user experience.

Moving the input_data HandleInput to the first position prioritizes the primary data input, which enhances the user interface flow. Since inputs are accessed by name throughout the component methods, this reordering doesn't affect functionality.

src/backend/base/langflow/initial_setup/starter_projects/Vector Store RAG.json (3)

603-609: Standardize Prompt component icon
Updating the "icon" field from "prompts" to "braces" aligns with the new naming convention for Prompt components across all starter projects.


616-622: Simplify Prompt output display name
Changing "display_name" to "Prompt" streamlines the UI label and matches the abstraction elsewhere in the configuration.


646-652: Update embedded PromptComponent class metadata
The embedded Python code now reflects the updated display_name = "Prompt" and icon = "braces", ensuring consistency between the JSON metadata and the PromptComponent definition.

src/backend/base/langflow/initial_setup/starter_projects/Image Sentiment Analysis.json (3)

841-841: Ensure icon resource availability
The Prompt component’s "icon" field has been changed from "prompts" to "braces". Verify that the "braces" icon exists in the shared icon library to avoid runtime rendering errors.


849-850: Align Prompt output display name
The output’s "display_name" has been updated from "Prompt Message" to "Prompt". Confirm that all UI labels, test selectors, and documentation referring to the old name are updated to prevent inconsistencies.


880-880: Validate embedded PromptComponent code update
The JSON-escaped Python in the "code" field was revised to include icon = "braces" and Output(display_name="Prompt", ...). Make sure the code string is still syntactically valid when deserialized and that no indentation or escape issues were introduced.

src/backend/base/langflow/initial_setup/starter_projects/Twitter Thread Generator.json (2)

1550-1550: Update Prompt node icon to “braces”
The icon property for the Prompt node has been updated from "prompts" to "braces", ensuring consistency with the new standardized icon set across all Prompt components.


1559-1559: Simplify Prompt output display name
The display_name for the Prompt output has been changed from "Prompt Message" to "Prompt", aligning with the naming conventions used in both backend components and frontend tests.

src/backend/base/langflow/initial_setup/starter_projects/Document Q&A.json (3)

1063-1063: Consistent icon update for Prompt component

The JSON node for Prompt correctly updates the icon property from "prompts" to "braces", aligning with the standardized icon set across starter projects.


1076-1076: Standardize output display name

The outputs entry now uses display_name: "Prompt" instead of the previous "Prompt Message", simplifying the label and matching the updated UI terminology.


1129-1130: Confirm embedded PromptComponent code

The embedded Python PromptComponent in the code field has been updated to set icon = "braces" and define its output with display_name="Prompt". This mirrors the JSON properties above and maintains consistency.

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

1814-1814: Icon updated for Prompt component

The icon for the Prompt node has been standardized from "prompts" to "braces", aligning with the updated convention across all starter projects.


1828-1828: Output display name simplified

The Prompt component’s output display name has been changed from "Prompt Message" to "Prompt", matching the streamlined naming convention used throughout the codebase.

src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting.json (2)

395-395: Consistent component icon update
The Prompt node’s icon attribute is correctly updated to "braces", matching the core PromptComponent.


403-403: Standardized output display name
The output display_name has been simplified from "Prompt Message" to "Prompt", aligning with other component definitions.

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

3688-3688: Update Prompt node icon to 'braces'
The icon property for the Prompt component (node Prompt-er8QV) has been updated from "prompts" to "braces" to align with the standardized icon set.


3701-3701: Standardize Prompt output display_name
The display_name for the prompt output has been changed from "Prompt Message" to "Prompt", making it more concise and consistent with the component name.


3730-3730: Ensure internal PromptComponent Python class reflects icon update
The embedded Python code in this JSON now sets icon = "braces" in the PromptComponent definition. This matches the JSON-level update and introduces no logic changes.


3864-3864: Update second Prompt node icon to 'braces'
Similarly, the icon property for the Prompt component (node Prompt-AdpTy) has been updated to "braces".


3877-3877: Standardize second Prompt output display_name
The display_name for the second prompt output has been updated to "Prompt", ensuring consistency across both Prompt nodes.


3908-3908: Validate Python code in second PromptComponent definition
The Python code block for the second PromptComponent has been synchronized to use icon = "braces" and the updated template. Confirmed no unintended changes to functionality.

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

1074-1074: Standardize Prompt icon to “braces”.
The icon field for the Prompt node has been updated from "prompts" to "braces" to match the new design guidelines. This change looks good—please ensure that all other starter project JSON files follow the same convention.


1087-1087: Align output display_name with component name.
The output’s display_name was simplified from "Prompt Message" to "Prompt" for consistency with the component’s display_name. Verify that any UI tests, selectors, or serialization logic that reference the old name are updated accordingly.

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

847-847: Icon update for Prompt node is correct
The Prompt node’s icon field has been changed from "prompts" to "braces", aligning with the new standard across starter projects.


861-861: Prompt output display name standardized
The output’s display_name is now "Prompt" instead of "Prompt Message", which matches the component’s display_name.


891-891: Embedded PromptComponent code reflects icon/display_name changes
Within the JSON-embedded Python snippet, icon = "braces" and Output(display_name="Prompt", …) correctly mirror the JSON fields above.


2292-2292: Icon update for the second Prompt node is correct
This instance of the Prompt node also adopts icon = "braces", ensuring consistency across all Prompt nodes in the flow.


2306-2306: Prompt output display name standardized
The second Prompt node’s output now uses display_name = "Prompt", matching the code and JSON convention.


2336-2336: Embedded PromptComponent code reflects icon/display_name changes
The duplicated Python definition of PromptComponent at this location also has icon = "braces" and Output(display_name="Prompt", …) correctly updated.

src/backend/base/langflow/initial_setup/starter_projects/Diet Analysis.json (3)

424-424: Updated Prompt icon to "braces"
This change standardizes the Prompt component’s icon across all starter projects. Please verify that the front-end icon set includes "braces" so that the icon renders correctly.


438-438: Simplified output display name to "Prompt"
The output label has been shortened from "Prompt Message" to "Prompt" to match the new naming convention. Ensure any UI code or tests that reference the old label are updated accordingly.


468-488: Embedded PromptComponent class updated with new icon & display_name
Within the embedded Python definition, display_name and icon now reflect the updated values ("Prompt" and "braces"). There are no functional or logic changes—this is purely cosmetic to align with the JSON metadata.

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

497-497: Update Prompt component icon
The icon for the Prompt node has been correctly changed from "prompts" to "braces", aligning with the new standard.


506-506: Simplify Prompt output display name
The output’s display_name has been updated from "Prompt Message" to "Prompt", matching the simplified naming convention used across starter projects.

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

172-172: Standardize Prompt component icon
The icon for the Prompt node has been updated from "prompts" to "braces" to align with the new icon convention across starter projects. This change is purely cosmetic and maintains consistency in the UI.


185-185: Simplify Prompt output display name
The output display name has been streamlined from "Prompt Message" to "Prompt", matching the standardized naming scheme used in other starter templates.

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

116-116: Icon update: from “prompts” to “braces”
The Prompt node’s icon has been changed to braces. This aligns with the new UI standard. Please verify that the frontend supports this icon name and that there are no mismatches in the icon registry.


125-125: Output label simplified: “Prompt”
The output display_name was shortened from “Prompt Message” to “Prompt” for consistency across starter projects. Ensure that any downstream code or tests referencing the old "Prompt Message" label are updated accordingly.


155-155: Embedded PromptComponent code synced
The Python snippet now sets icon = "braces" and Output(display_name="Prompt") to mirror the JSON config. Confirm that these changes are reflected in the component registry and that existing tests or UI selectors are adjusted to the new naming.

src/backend/base/langflow/initial_setup/starter_projects/Basic Prompt Chaining.json (6)

219-219: Update Prompt component icon to "braces"
The icon property on the Prompt node (Prompt-4IOgm) has been updated from "prompts" to "braces", matching the revised design specification for prompt components.


228-228: Standardize output display_name to "Prompt"
The output’s display_name has been changed from "Prompt Message" to "Prompt", ensuring consistency with other Prompt components across the project.


258-258: Embed updated PromptComponent code string
The embedded Python code in the JSON now reflects the same icon = "braces" and uses Output(display_name="Prompt", …), keeping the JSON‐serialized component in sync with the code implementation.


945-945: Update second Prompt component icon to "braces"
The icon property on the Prompt node (Prompt-FRjO8) has likewise been updated to "braces", mirroring the change in the first Prompt node.


954-954: Standardize second Prompt output display_name to "Prompt"
The output’s display_name in the second Prompt node has been renamed to "Prompt", aligning its labeling with the other Prompt components.


984-984: Embed updated PromptComponent code string for second instance
The code string under the value field for the second Prompt component now correctly sets icon = "braces" and Output(display_name="Prompt", …), keeping both JSON configurations consistent.

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

315-315: Update Prompt Component Icon and Output Display Name
The JSON node for Prompt-I3JbF correctly changes icon to "braces" and updates the output display_name to "Prompt". This aligns with the PR objective of standardizing Prompt components.

Also applies to: 324-324


354-362: Embedded Python Code Updated
Within the code value, the PromptComponent now uses icon = "braces" and Output(display_name="Prompt"). The underlying logic is unaltered.


763-763: Update Prompt Component Icon and Output Display Name
Node Prompt-o2zd8 has its icon set to "braces" and outputs.display_name to "Prompt", maintaining consistency.

Also applies to: 774-774


803-810: Embedded Python Code Updated
The embedded PromptComponent code string reflects the updated icon and output display name for Prompt-o2zd8.


1596-1596: Update Prompt Component Icon and Output Display Name
Node Prompt-saNk6 now shows icon: "braces" and output display_name: "Prompt", consistent with other instances.

Also applies to: 1605-1605


1620-1627: Embedded Python Code Updated
The PromptComponent code block string has been updated to use "braces" as the icon and "Prompt" as the output display name.


1723-1723: Update Prompt Component Icon and Output Display Name
Node Prompt-z31Nf correctly updates the icon to "braces" and outputs.display_name to "Prompt".

Also applies to: 1732-1732


1758-1764: Embedded Python Code Updated
Embedded code string for Prompt-z31Nf now uses icon = "braces" and Output(display_name="Prompt") as intended.

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

612-622: Align PromptComponent icon and output label (Prompt-R71s9)
The JSON for node Prompt-R71s9 now uses "icon": "braces" and updates the output display_name to "Prompt". The embedded Python snippet under "value" reflects this with icon = "braces" and Output(display_name="Prompt", ...). These updates standardize prompt UI across projects. Please verify that corresponding frontend selectors and tests reference the new display_name.

Also applies to: 651-652


891-901: Align PromptComponent icon and output label (Prompt-LCAlG)
Similar updates for the Prompt-LCAlG node: the "icon" is now "braces" and its output’s display_name is "Prompt", with the class property in the embedded code updated accordingly. Confirm that integration tests and UI components have been updated to use the new naming.

Also applies to: 929-932


1967-1977: Align PromptComponent icon and output label (Prompt-ZA2H7)
For the Prompt-ZA2H7 node, the icon has been changed to "braces" and the output display_name to "Prompt", and the embedded code snippet updated to match. Ensure all downstream references—including tests and frontend selectors—are aligned with these changes.

Also applies to: 2006-2009

src/backend/base/langflow/initial_setup/starter_projects/Text Sentiment Analysis.json (6)

537-551: Update PromptComponent icon and output display name for Prompt-nmNbi

The prompt node Prompt-nmNbi has been updated to use the "braces" icon and the output label "Prompt", aligning with the new UI standard for prompt components. This change is purely cosmetic and does not affect any underlying logic.


581-581: This line shows the embedded Python code for the PromptComponent; it remains unchanged by this PR.


690-704: Standardize PromptComponent icon and output display name for Prompt-AJxY8

The prompt node Prompt-AJxY8 icon has been changed to "braces" and its output display name is now "Prompt", ensuring consistency with other starter projects and the updated design guidelines.


734-734: This line contains the serialized PromptComponent code block; there are no functional updates here.


1623-1637: Apply UI standard to PromptComponent icon and output label for Prompt-LXvg7

The prompt node Prompt-LXvg7 now uses the "braces" icon and "Prompt" as its output display name, matching the updated naming and iconography standards across all prompt components.


1667-1667: Embedded PromptComponent code is unchanged in this PR; no review needed for functionality.

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

1586-1586: Standardize Prompt component icon and output name
The PromptComponent’s icon is correctly updated to "braces" and the output display_name to "Prompt", matching the new standardized branding.

Also applies to: 1599-1600


1719-1719: Apply consistent naming for second Prompt node
The second Prompt node now uses icon: "braces" and its output display_name: "Prompt", ensuring uniform appearance across all starter projects.

Also applies to: 1732-1733


1855-1855: Align third Prompt node with updated branding
The third Prompt node’s icon and output display_name have been synchronized ("braces" and "Prompt"), maintaining consistency in the UI and data model.

Also applies to: 1868-1869

src/backend/base/langflow/initial_setup/starter_projects/SEO Keyword Generator.json (2)

121-130: Standardize Prompt icon and output naming
The icon field is updated from "prompts" to "braces" and the output’s display_name is now "Prompt", matching the conventions used in other starter projects.


421-430: Apply the same Prompt updates to the second node
Consistent with the first node, the second Prompt node’s icon is set to "braces" and its output display_name simplified to "Prompt".

src/backend/base/langflow/initial_setup/starter_projects/Blog Writer.json (5)

176-176: Standardized Prompt icon updated
The icon for the Prompt node has been correctly changed from "prompts" to "braces", aligning with the new icon convention across starter projects.


185-185: Unified Prompt output display name
The display_name for the Prompt output has been simplified from "Prompt Message" to "Prompt", making it more concise and consistent with other components.


215-216: Embedded PromptComponent code reflects metadata changes
Within the embedded Python code, the PromptComponent class correctly uses

display_name: str = "Prompt"
icon = "braces"

ensuring runtime behavior matches the updated JSON metadata.


1156-1156: Simplified Parser description
The Parser’s description has been streamlined to "Extracts text using a template.", which is clear and concise while retaining its intent.


1209-1209: Embedded ParserComponent code reflects input reorder
The embedded ParserComponent Python code now lists HandleInput(name="input_data", ...) first in its inputs array, matching the updated JSON field_order. Also verify icon = "braces" is set.

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

1483-1483: Concise description update
The description field has been shortened to “Extracts text using a template.”, which is clear and aligns nicely with other starter‐project definitions.


1536-1536: Sync embedded ParserComponent code with actual implementation
The JSON-embedded "value" for the ParserComponent class has been replaced to reflect the new input ordering (HandleInput before TabInput) and the dynamic show/hide logic. Please verify that this multi‐line string exactly matches your parser.py implementation (including indentation) and that it loads without JSON parsing errors.

src/backend/base/langflow/initial_setup/starter_projects/Hybrid Search RAG.json (2)

2037-2037: ParserComponent description simplified appropriately
The new description "Extracts text using a template." is concise and accurately reflects the component’s purpose. Great improvement for readability and consistency.


2088-2088: Ensure JSON template "type": "code" is set correctly
Updating this field to "code" aligns with how the UI should render the embedded Python snippet. It matches the component’s configuration and looks correct.

src/backend/base/langflow/initial_setup/starter_projects/Portfolio Website Code Generator.json (1)

2106-2107: Description Simplified for Clarity
The updated description (“Extracts text using a template.”) is concise and aligns with the high-level intent of this component. It maintains readability without unnecessary detail.

✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 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:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels May 30, 2025
@edwinjosechittilappilly edwinjosechittilappilly changed the title @coderabbit ref: prompt component May 30, 2025
Copy link
Copy Markdown
Contributor

@Yukiyukiyeah Yukiyukiyeah 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 May 30, 2025
@edwinjosechittilappilly edwinjosechittilappilly changed the title ref: prompt component ref: prompt and parser component May 30, 2025
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels May 30, 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: 1

🔭 Outside diff range comments (1)
src/backend/base/langflow/initial_setup/starter_projects/Portfolio Website Code Generator.json (1)

2110-2115: ⚠️ Potential issue

Field order keys mismatch input names.

The field_order is set to ["stringify", "template", "input_data", "sep"] but the inputs are named "mode", "pattern", "input_data", and "sep". This discrepancy will break the UI ordering and dynamic show/hide logic. Please update it to use the actual input names, for example:

- "field_order": ["stringify", "template", "input_data", "sep"],
+ "field_order": ["input_data", "mode", "pattern", "sep"],
🧹 Nitpick comments (1)
src/backend/base/langflow/initial_setup/starter_projects/Memory Chatbot.json (1)

1117-1124: Embedded PromptComponent code reflects naming changes
The PromptComponent class in the embedded code now uses display_name = "Prompt" and icon = "braces", and its output is correctly labeled "Prompt". Everything aligns with the JSON node properties.

Optional: For consistency with other components, you may remove the type annotation on display_name:

-class PromptComponent(Component):
-    display_name: str = "Prompt"
+class PromptComponent(Component):
+    display_name = "Prompt"
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between fd73cdc and 8f2d95b.

📒 Files selected for processing (27)
  • src/backend/base/langflow/components/processing/parser.py (1 hunks)
  • src/backend/base/langflow/components/prompts/prompt.py (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Basic Prompt Chaining.json (9 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Blog Writer.json (5 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Custom Component Maker.json (3 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Diet Analysis.json (3 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Document Q&A.json (3 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Financial Agent.json (6 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Hybrid Search RAG.json (4 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Image Sentiment Analysis.json (3 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json (9 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Invoice Summarizer.json (3 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json (6 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Memory Chatbot.json (3 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Portfolio Website Code Generator.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Research Agent.json (12 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Research Translation Loop.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/SEO Keyword Generator.json (6 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/SaaS Pricing.json (3 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks Agents.json (9 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Text Sentiment Analysis.json (9 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Twitter Thread Generator.json (3 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Vector Store RAG.json (3 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Youtube Analysis.json (3 hunks)
  • src/frontend/tests/core/integrations/decisionFlow.spec.ts (1 hunks)
  • src/frontend/tests/extended/regression/generalBugs-shard-10.spec.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (15)
  • GitHub Check: Run Frontend Tests / Playwright Tests - Shard 5/10
  • GitHub Check: Run Frontend Tests / Playwright Tests - Shard 9/10
  • GitHub Check: Run Frontend Tests / Playwright Tests - Shard 8/10
  • GitHub Check: Run Frontend Tests / Playwright Tests - Shard 7/10
  • GitHub Check: Run Frontend Tests / Playwright Tests - Shard 1/10
  • GitHub Check: Run Frontend Tests / Playwright Tests - Shard 2/10
  • GitHub Check: Run Frontend Tests / Playwright Tests - Shard 10/10
  • GitHub Check: Run Frontend Tests / Playwright Tests - Shard 6/10
  • GitHub Check: Run Frontend Tests / Playwright Tests - Shard 4/10
  • GitHub Check: Run Frontend Tests / Playwright Tests - Shard 3/10
  • GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 5
  • GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 2
  • GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 3
  • GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 4
  • GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 1
🔇 Additional comments (89)
src/frontend/tests/extended/regression/generalBugs-shard-10.spec.ts (1)

38-38: LGTM! Test selector correctly updated.

The selector change aligns with the backend refactoring where the Prompt component's output display name was changed from "Prompt Message" to "Prompt". This ensures the test continues to function correctly.

src/frontend/tests/core/integrations/decisionFlow.spec.ts (1)

284-284: LGTM! Consistent test selector update.

This selector change is consistent with the same update in the other test file and properly reflects the backend Prompt component's display name change.

src/backend/base/langflow/components/prompts/prompt.py (2)

12-12: LGTM! Icon standardization improves consistency.

The icon change from "prompts" to "braces" better represents the component's functionality with template variables and aligns with the standardization effort across the codebase.


28-28: LGTM! Simplified display name improves clarity.

The change from "Prompt Message" to "Prompt" reduces verbosity while maintaining clarity. This change is properly reflected in the corresponding frontend test selector updates.

src/backend/base/langflow/components/processing/parser.py (3)

17-17: LGTM! Simplified description improves clarity.

The concise description "Extracts text using a template." effectively communicates the component's purpose without unnecessary verbosity.


18-18: LGTM! Icon standardization maintains consistency.

The "braces" icon is appropriate for the Parser component since it works with template variables, maintaining consistency with the Prompt component icon changes.


21-27: LGTM! Input reordering improves user experience.

Moving the primary "input_data" HandleInput to the beginning of the inputs list makes logical sense, as users typically want to connect the main data source before configuring other parameters.

src/backend/base/langflow/initial_setup/starter_projects/Vector Store RAG.json (3)

606-606: Update component icon from “prompts” to “braces”
This change correctly swaps the Prompt component’s icon to match the new design system. It’s consistent with the PR objective to standardize on “braces.”


619-619: Simplify output display name to “Prompt”
Changing the display_name from “Prompt Message” to “Prompt” aligns the UI terminology and removes redundancy. Good clarity improvement.


648-650: Sync embedded Python metadata with JSON updates
The PromptComponent class’s display_name and icon fields have been updated to reflect the JSON changes, ensuring consistency between backend code and starter‐project configuration.

src/backend/base/langflow/initial_setup/starter_projects/Document Q&A.json (1)

1063-1063:

Details

✅ Verification successful

Standardize Prompt icon to "braces"
The icon for the Prompt node has been updated from "prompts" to "braces", aligning with the new styling conventions across all components.

Please verify there are no remaining references to the old "prompts" icon in other starter project files:


🏁 Script executed:

#!/bin/bash
# Find any starter project JSON still using the old icon
rg -l '"icon": "prompts"' -g 'src/backend/base/langflow/initial_setup/starter_projects/*.json'

Length of output: 96


Standardize Prompt icon to "braces"
The icon for the Prompt node has been updated from "prompts" to "braces", aligning with the new styling conventions across all components.
All starter project JSON files have been verified; no remaining references to "prompts" were found.

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

116-116: Standardize Prompt icon
Updated the component icon property from "prompts" to "braces". This aligns with the PR objective and standardizes the UI across all starter projects.


125-125: Simplify output display name
Changed the output display_name from "Prompt Message" to "Prompt" to match the updated naming convention. Consistent with the PR objectives and other JSON starter projects.


155-155: Sync embedded component code
The embedded PromptComponent class in the "value" string now uses icon = "braces" and Output(display_name="Prompt"), matching the JSON metadata. Verify there are no remaining references to the old icon or display name within this code snippet.

src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting.json (3)

395-395: Approve icon update for Prompt node
The node-level icon field has been updated from "prompts" to "braces", matching the change in the core PromptComponent.


403-403: Approve output display_name update
The output display name has been standardized to "Prompt", replacing the previous "Prompt Message", and aligns with the updated component API.


433-433: Approve embedded PromptComponent code update
The JSON-embedded Python code block reflects the updated PromptComponent class (icon = "braces" and output signature). The change is consistent and correctly encoded.

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

1586-1586: Icon standardized to "braces"
The Prompt node icon has been updated from "prompts" to "braces" for visual consistency with other components.


1599-1599: Output display_name simplified to "Prompt"
The output display name for the Prompt node has been changed from "Prompt Message" to "Prompt", making it more concise.


1629-1629: Embedded PromptComponent code updated
The embedded Python code for PromptComponent now uses icon = "braces" and sets its output display_name to "Prompt", matching the JSON changes.


1719-1719: Icon standardized to "braces" (second instance)
Consistent update of the Prompt icon in the second Prompt node.


1732-1732: Output display_name simplified to "Prompt" (second instance)
Consistent naming for the second Prompt node’s output.


1855-1855: Icon standardized to "braces" (third instance)
Consistent update of the Prompt icon in the third Prompt node.


1868-1868: Output display_name simplified to "Prompt" (third instance)
Consistent naming for the third Prompt node’s output.

src/backend/base/langflow/initial_setup/starter_projects/SEO Keyword Generator.json (5)

121-121: Icon property updated correctly
Changed the icon value from "prompts" to "braces" for the Prompt node. This aligns with the updated design tokens.


130-130: Output display_name simplified
Modified the output display_name from "Prompt Message" to "Prompt", which improves consistency across components.


160-160: Embedded Python code synchronization
The value field now embeds the updated PromptComponent definition (using icon = "braces" and Output(display_name="Prompt")). Verify that the JSON string escapes and formatting remain valid so the code can be deserialized correctly.


421-421: Duplicate node icon update
Second instance of the Prompt node also has icon updated to "braces", ensuring consistency in duplicated nodes.


430-430: Duplicate output display_name update
Second instance of the output has its display_name changed to "Prompt", matching the primary Prompt node.

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

1074-1074: Update icon for Prompt node
The node's "icon" property has been correctly switched from "prompts" to "braces" to standardize the Prompt component's icon across starter projects.


1087-1087: Standardize Prompt output display name
The output display name has been updated from "Prompt Message" to "Prompt" as intended, ensuring consistency with UI labels and tests.

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

497-497: Standardized icon value on Prompt node
The icon property has been updated from "prompts" to "braces" to match the new visual standard for Prompt components across the project. This aligns with the PR objectives and ensures consistency.


506-506: Updated output display name for Prompt node
The output display name has been simplified from "Prompt Message" to "Prompt", ensuring uniform naming in both backend definitions and frontend tests.


651-651: Aligned embedded PromptComponent Python code
Within the embedded component template, the PromptComponent class now declares icon = "braces" and uses Output(display_name="Prompt", ...), mirroring the JSON-level updates for complete consistency.

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

847-847: Icon updated to braces
The Prompt component’s icon property has been changed from "prompts" to "braces", aligning with the updated visual naming conventions.


861-861: Output display name updated to “Prompt”
The Prompt component’s output display_name is now "Prompt" instead of "Prompt Message", matching the PR objectives and corresponding frontend test updates.


891-954: Embedded PromptComponent class updated consistently
The Python code string in the JSON now defines PromptComponent with the standardized display_name, icon, and Output(display_name="Prompt"). Core logic remains untouched.


2292-2292: Icon updated to braces (second node)
The second Prompt node’s icon property has likewise been switched to "braces", ensuring consistency across all Prompt nodes.


2306-2306: Output display name updated to “Prompt” (second node)
The second Prompt node’s output display_name now reads "Prompt", in line with the unified naming scheme.


2336-2425: Second embedded PromptComponent class updated consistently
The embedded Python code for the second Prompt node reflects the same display_name, icon, and output renaming. No changes to business logic.

src/backend/base/langflow/initial_setup/starter_projects/Image Sentiment Analysis.json (3)

841-841: Updated icon for Prompt node
Changed icon from "prompts" to "braces" for the Prompt component—this aligns with the standardized icon convention across starter projects.


850-850: Standardized output display name
Updated the prompt output display_name from "Prompt Message" to "Prompt" to match the new naming scheme consistently.


880-880: Embedded PromptComponent code updated
The PromptComponent class in the JSON template now uses icon = "braces" and Output(display_name="Prompt", ...). This mirrors the external metadata changes and maintains consistency.

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

3688-3689: Standardize Prompt node icon
The node’s "icon" property has been updated from "prompts" to "braces" to match the standardized icon set for Prompt components. This is purely metadata and does not affect execution.


3701-3702: Update Prompt output display name
The output’s "display_name" has been changed from "Prompt Message" to "Prompt" for consistency across starter projects. This is a cosmetic update only.


3732-3733: Mirror metadata updates in component code
Inside the embedded PromptComponent class, the icon attribute is now set to "braces", and the Output display name has been updated to "Prompt". These align the code snippet with the JSON metadata changes and have no functional impact.

src/backend/base/langflow/initial_setup/starter_projects/Twitter Thread Generator.json (3)

1549-1550: Ensure the “braces” icon is supported in the UI

The JSON node definition’s "icon" property was updated from "prompts" to "braces". Please verify that the braces icon exists in the frontend icon library to prevent broken or missing icons at runtime.


1558-1559: Update output display_name to “Prompt”

The output’s "display_name" was changed from "Prompt Message" to "Prompt" for standardization across starter projects. Confirm that all downstream templates, frontend selectors, and tests have been updated to reference "Prompt" instead of the old label.


1727-1727: Align embedded PromptComponent code with JSON changes

The embedded Python code now sets icon = "braces" and uses Output(display_name="Prompt", ...), matching the JSON configuration. Implementation looks correct and consistent.

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

612-613: Icon and output display name updated for Prompt component
The first Prompt node now uses the "braces" icon and its output display name has been standardized to "Prompt", aligning with the updated conventions.

Also applies to: 621-622


891-892: Standardize icon and output naming in second Prompt component
Applied the "braces" icon and changed the output display name to "Prompt" for the second Prompt node, ensuring consistency across components.

Also applies to: 900-901


1967-1968: Apply icon and display name updates to third Prompt component
The third Prompt node has also been updated to use the "braces" icon and its output display name set to "Prompt", matching the project-wide standard.

Also applies to: 1976-1977

src/backend/base/langflow/initial_setup/starter_projects/Diet Analysis.json (2)

424-424: Standardize Prompt component icon
The icon property for the Prompt node has been updated from "prompts" to "braces", aligning this starter project with the core component’s change.


438-438: Update Prompt output display_name
The output’s display_name has been changed from "Prompt Message" to "Prompt" to maintain consistency across all Prompt components.

src/backend/base/langflow/initial_setup/starter_projects/Basic Prompt Chaining.json (3)

219-229: Standardize Prompt component icon and output name
The icon for the Prompt node has been updated from "prompts" to "braces", and the output display_name has been simplified from "Prompt Message" to "Prompt". These changes align with the updated component naming conventions.


945-955: Standardize Prompt component icon and output name
The icon for the Prompt node has been updated from "prompts" to "braces", and the output display_name has been simplified from "Prompt Message" to "Prompt". These changes align with the updated component naming conventions.


1072-1082: Standardize Prompt component icon and output name
The icon for the Prompt node has been updated from "prompts" to "braces", and the output display_name has been simplified from "Prompt Message" to "Prompt". These changes align with the updated component naming conventions.

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

315-324: Consistent icon and output display_name update for first Prompt node
The icon has been updated from "prompts" to "braces", and the output’s display_name has been simplified from "Prompt Message" to "Prompt". This matches the core PromptComponent changes and ensures uniformity in the flow.


764-773: Consistent icon and output display_name update for second Prompt node
Similarly, the icon and output display_name here have been updated to "braces" and "Prompt" respectively, keeping this node in sync with the overall Prompt component standard.


1596-1605: Consistent icon and output display_name update for third Prompt node
Again, the icon change to "braces" and the output display_name change to "Prompt" are applied correctly for this instance of the Prompt component.


1723-1732: Consistent icon and output display_name update for fourth Prompt node
The updates to icon: "braces" and display_name: "Prompt" for the output are correctly applied here as well, ensuring all Prompt nodes follow the same naming conventions.

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

172-172: Standardize Prompt component icon to “braces”
This change aligns the JSON starter project with the updated PromptComponent.icon in the backend.


185-185: Simplify Prompt output display name to “Prompt”
Matches the new Output(display_name="Prompt", …) in the PromptComponent and keeps consistency across starter projects.

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

1814-1814: Standardize Prompt component icon
The icon property for the Prompt node has been updated from "prompts" to "braces", aligning with the new icon naming convention across all starter projects.


1828-1828: Simplify Prompt output display name
The output display_name has been changed from "Prompt Message" to "Prompt" for clarity and consistency with other components.


1870-1870:

Details

✅ Verification successful

Sync embedded PromptComponent code
The embedded Python code block now reflects icon = "braces" and Output(display_name="Prompt"). Ensure the JSON-encoded code string remains valid and that no unintended functional changes were introduced.


🏁 Script executed:

#!/bin/bash
# Verify Prompt component icon and display_name in JSON
jq -r '.data.nodes[] | select(.data.id=="Prompt-UAMac").data.node.icon' "src/backend/base/langflow/initial_setup/starter_projects/Youtube Analysis.json"
jq -r '.data.nodes[] | select(.data.id=="Prompt-UAMac").data.node.outputs[] | select(.name=="prompt").display_name' "src/backend/base/langflow/initial_setup/starter_projects/Youtube Analysis.json"

Length of output: 367


Verified Prompt component configuration
The JSON matches the embedded Python block:

  • icon is set to braces
  • prompt output’s display_name is Prompt

The JSON string remains valid and no unintended functional changes were introduced.

src/backend/base/langflow/initial_setup/starter_projects/Text Sentiment Analysis.json (9)

537-537: Standardize Prompt component icon
Changed the Prompt node’s icon from "prompts" to "braces" to align with the updated naming convention.


551-551: Simplify Prompt output display name
Updated the Prompt component’s output display_name from "Prompt Message" to "Prompt" for consistency across flows.


581-581: Update embedded PromptComponent code block
Verified that the embedded PromptComponent class’s code string now uses icon = "braces" and Output(display_name="Prompt"), matching the JSON metadata changes.


690-690: Standardize Prompt component icon
Changed the Prompt node’s icon from "prompts" to "braces" to align with the updated naming convention.


704-704: Simplify Prompt output display name
Updated the Prompt component’s output display_name from "Prompt Message" to "Prompt" for consistency across flows.


734-734: Update embedded PromptComponent code block
Verified that the embedded PromptComponent class’s code string now uses icon = "braces" and Output(display_name="Prompt"), matching the JSON metadata changes.


1623-1623: Standardize Prompt component icon
Changed the Prompt node’s icon from "prompts" to "braces" to align with the updated naming convention.


1637-1637: Simplify Prompt output display name
Updated the Prompt component’s output display_name from "Prompt Message" to "Prompt" for consistency across flows.


1667-1667: Update embedded PromptComponent code block
Verified that the embedded PromptComponent class’s code string now uses icon = "braces" and Output(display_name="Prompt"), matching the JSON metadata changes.

src/backend/base/langflow/initial_setup/starter_projects/Hybrid Search RAG.json (4)

2037-2037: Simplified description for ParserComponent – ✅
The node’s description has been trimmed to "Extracts text using a template.", which aligns neatly with the core component’s simplified description and improves clarity.


2088-2088: Reordered inputs in embedded ParserComponent code – verify
The Python snippet now defines inputs = [input_data, mode, pattern, sep], matching the intended reordering. Please confirm this change aligns with the component’s runtime behavior in the starter flow.


2516-2516: Consistent description update for second ParserComponent – ✅
The second instance’s description has been updated identically to the first ("Extracts text using a template."), ensuring uniformity across nodes.


2552-2552: Embedded code snippet check for second ParserComponent – verify
Make sure the code block under this ParserComponent also reflects the input reordering and matches the latest core implementation.

src/backend/base/langflow/initial_setup/starter_projects/Blog Writer.json (6)

176-176: Prompt node icon updated
Changed the Prompt node’s icon from "prompts" to "braces" to match the core component. Ensure this is consistent across all starter projects and frontend icon mappings.


185-185: Prompt output label standardized
Updated the Prompt output’s display_name from "Prompt Message" to "Prompt". Confirm that frontend tests and selectors are updated accordingly to use the new label.


215-215: Verify embedded PromptComponent code
The JSON’s embedded PromptComponent code block was refreshed. Make sure it matches the latest src/backend/base/langflow/components/prompts/prompt.py definition (icon, outputs, method names, imports).


1156-1156: Parser description simplified
Replaced the verbose Parser description with “Extracts text using a template.” This aligns with core component docs.


1167-1167: Parser node icon updated
Changed the Parser node’s icon to "braces" for consistency with the Prompt icon update. Ensure all starter projects use the same icon mapping.


1208-1208: Review embedded ParserComponent code
The ParserComponent’s code block was updated (inputs reordered, imports simplified). Verify that the JSON’s UI field_order and the class inputs definition remain in sync so that the node renders fields in the intended order.

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

1483-1483: Streamline ParserComponent description
The description has been concise to “Extracts text using a template,” which improves readability and aligns with the updated backend definition of ParserComponent.


1536-1536: Sync ParserComponent template code with implementation
The embedded Python snippet now reflects the reordered inputs (input_data, mode, pattern, sep) and streamlined parsing logic. This ensures the starter‐project node matches the updated ParserComponent in the backend.

src/backend/base/langflow/initial_setup/starter_projects/Portfolio Website Code Generator.json (2)

2106-2106: Description simplified appropriately.

The new description "Extracts text using a template." is concise and aligns with the changes in other starter projects. This improves readability and consistency.


2159-2238: Verify the updated ParserComponent template code.

The component template value has been overhauled—introducing _clean_args, refined convert_to_string, and dynamic pattern visibility. Please ensure:

  • DataFrame vs Data handling works as expected.
  • The "Stringify" mode returns a Message object.
  • The clean_data toggle correctly cleans rows and lines.

Also confirm that any downstream starter projects or tests referencing ParserComponent align with these changes.

"allows_loop": false,
"cache": true,
"display_name": "Prompt Message",
"display_name": "Prompt",
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

Update Prompt output display name to "Prompt"
The output display name has been changed from "Prompt Message" to "Prompt" for a cleaner, consistent UX.

Ensure that all frontend selectors, tests, and documentation referencing "Prompt Message" have been updated accordingly:


🏁 Script executed:

#!/bin/bash
# Search for any lingering references to the old display name
rg -l 'Prompt Message' -g 'src/**/*'

Length of output: 185


Update lingering test references from “Prompt Message” to “Prompt”
Found instances of the old display name in test data and assets—these need to be updated to match the change:

• src/backend/tests/data/MemoryChatbotNoLLM.json
• src/frontend/tests/assets/outdated_flow.json
• src/frontend/tests/assets/flow_test_drag_and_drop.json

Please replace all occurrences of "Prompt Message" with "Prompt" in these files and rerun the test suite to confirm there are no failures.

🤖 Prompt for AI Agents
In src/backend/base/langflow/initial_setup/starter_projects/Document Q&A.json at
line 1076, the output display name was changed from "Prompt Message" to "Prompt"
for consistency. To fix the issue, update all references of "Prompt Message" to
"Prompt" in the test files src/backend/tests/data/MemoryChatbotNoLLM.json,
src/frontend/tests/assets/outdated_flow.json, and
src/frontend/tests/assets/flow_test_drag_and_drop.json. After making these
replacements, rerun the test suite to ensure no tests fail.

@edwinjosechittilappilly edwinjosechittilappilly added this pull request to the merge queue May 30, 2025
Merged via the queue into main with commit da3542e May 30, 2025
40 of 41 checks passed
@edwinjosechittilappilly edwinjosechittilappilly deleted the fix-prompt-component branch May 30, 2025 23:15
ogabrielluiz pushed a commit to bkatya2001/langflow that referenced this pull request Jun 24, 2025
* update prompt component

* template update

* update parser

* [autofix.ci] apply automated fixes

* update in template

---------

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

lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants