docs: link components to docs pages#8850
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThis change introduces a new Changes
Sequence Diagram(s)No sequence diagrams are generated since the changes are limited to adding static documentation attributes and do not affect control flow or interactions. Possibly related PRs
Suggested labels
✨ Finishing Touches🧪 Generate Unit Tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 3
🔭 Outside diff range comments (2)
src/backend/base/langflow/components/processing/lambda_filter.py (2)
128-130: Regex too restrictive – will miss valid lambda formatsThe current pattern only matches single-line lambdas with one positional parameter and no parentheses.
It fails for common variants such as
lambda x, y: x + yorlambda _: _.upper()and for multi-line lambdas returned with line-breaks.- lambda_match = re.search(r"lambda\s+\w+\s*:.*?(?=\n|$)", response_text) + lambda_match = re.search(r"lambda\s+[^:]+:\s*.*", response_text, re.S)The
re.Sflag allows.to span newlines, and[^:]+captures any valid parameter list.
142-144: Un-sandboxedevalon LLM output is a critical RCE vectorDirectly evaluating arbitrary code produced by a model is extremely dangerous.
At minimum, run the evaluation in a restricted globals dict to strip built-ins:- fn: Callable[[Any], Any] = eval(lambda_text) # noqa: S307 + safe_globals: dict[str, Any] = {"__builtins__": {}} + fn: Callable[[Any], Any] = eval(lambda_text, safe_globals) # noqa: S307Even this is not bullet-proof; consider using
ast.parse+evalon the resulting AST or a dedicated sandbox likerestrictedpython.
🧹 Nitpick comments (15)
src/backend/base/langflow/components/data/news_search.py (1)
15-15: Double-check the docs URL slugThe slug
components-data#news-searchdeviates from the folder structure mandated in the docs guidelines (docs/components/**). Please verify the link resolves (no 404) and update to the canonical path if necessary, e.g.
"https://docs.langflow.org/components/data#news-search".If the current URL is correct, no action needed.
src/backend/base/langflow/components/agents/mcp_component.py (1)
95-99: Confirm docs URL & naming convention
documentationattribute is a welcome addition. Please double-check that
https://docs.langflow.org/mcp-clientmatches the actual path generated by the docs build (per docs/*/components/** template rules) and returns 200; otherwise update to the canonical location to avoid dead links.src/backend/base/langflow/components/processing/structured_output.py (1)
21-21: Consider de-duplicating hard-coded docs URLsDirectly embedding the full URL string in every component can lead to drift if the docs domain or path ever changes. A small constant (e.g.
DOCS_BASE_URL) or helper on theComponentbase class would keep all links consistent and easier to update.- documentation: str = "https://docs.langflow.org/components-processing#structured-output" + # Assumes DOCS_BASE_URL = "https://docs.langflow.org/" + documentation: str = f"{DOCS_BASE_URL}components-processing#structured-output"This is optional, but it scales better as more components gain links.
src/backend/base/langflow/components/data/webhook.py (1)
10-10: Documentation link looks fine—please confirm the slug is correctThe added
documentationURL uses the slugcomponents-data#webhook. Other component pages usually follow thecomponents/<category>#<anchor>convention (e.g.,components/data#file). Double-check that this exact slug resolves and the page contains the expected “Overview / Configuration / Usage Example / Common Issues” sections so the link doesn’t 404.src/backend/base/langflow/components/processing/llm_router.py (1)
18-22: UseClassVarfor class-level immutable metadataMinor style nit: marking class-level constants with
typing.ClassVarclarifies thatdocumentationisn’t intended to be overridden on instances and keeps static analysers quiet.from typing import Any +from typing import ClassVar @@ - documentation: str = "https://docs.langflow.org/components-processing#llm-router" + documentation: ClassVar[str] = "https://docs.langflow.org/components-processing#llm-router"No functional change; feel free to ignore if the existing convention intentionally omits
ClassVar.src/backend/base/langflow/components/processing/converter.py (1)
51-55: Unify attribute-style with existing class constantsOther component-level constants (
display_name,description,icon) are plain assignments without type annotations, whiledocumentationis declared with a type hint.
For consistency (and to avoid accidental treatment as a dataclass/attrs field in future refactors) consider dropping the annotation:- documentation: str = "https://docs.langflow.org/components-processing#type-convert" + documentation = "https://docs.langflow.org/components-processing#type-convert"src/backend/base/langflow/components/data/api_request.py (1)
46-50: Minor: keep constant declarations stylistically consistentSame remark as for other components: remove the explicit
: strto match neighbouring constants unless you plan to annotate all of them across the codebase.- documentation: str = "https://docs.langflow.org/components-data#api-request" + documentation = "https://docs.langflow.org/components-data#api-request"src/backend/base/langflow/components/logic/loop.py (1)
11-15: Consistency & link check
- Style – drop the type hint to align with other class attributes (
display_name,icon).- Please double-check that the fragment
#loopmatches the actual heading id on the docs page – anchors are case-sensitive.- documentation: str = "https://docs.langflow.org/components-logic#loop" + documentation = "https://docs.langflow.org/components-logic#loop"src/backend/base/langflow/components/helpers/current_date.py (1)
12-16: Follow the same constant styleFor uniformity across components:
- documentation: str = "https://docs.langflow.org/components-helpers#current-date" + documentation = "https://docs.langflow.org/components-helpers#current-date"src/backend/base/langflow/components/models/embedding_model.py (1)
21-25: URL slug & style inconsistencies
- Style – consider removing the type annotation as in other files.
- The URL diverges from the
<category>#<component>pattern used elsewhere (components-data#api-request, etc.). Verify the correct docs path/anchor (perhapscomponents-models#embedding-model).- documentation: str = "https://docs.langflow.org/components-embedding-models" + documentation = "https://docs.langflow.org/components-models#embedding-model"src/backend/base/langflow/components/processing/data_operations.py (1)
36-37: Nit: validate documentation linkSame recommendation—ensure the
components-processing#data-operationsanchor exists.No other issues with the addition.
src/backend/base/langflow/components/helpers/memory.py (1)
19-20: URL checkPlease verify that
components-helpers#message-historyis the correct anchor – earlier helper pages sometimes live undercomponents/helpers.src/backend/base/langflow/components/input_output/chat.py (1)
22-23: Confirm docs anchor
components-io#chat-inputlooks fine, but give it a quick hit check for 200 OK to avoid broken in-app links.src/backend/base/langflow/components/input_output/text.py (1)
9-9: Same note about link validity & duplicationConfirm that
components-io#text-inputexists and consider re-using a shared constant for the docs base URL to avoid future divergence.src/backend/base/langflow/components/input_output/chat_output.py (1)
25-25: Confirm docs anchor and avoid hard-coding URL string
- Ensure
components-io#chat-outputis a live anchor.- Repeating raw URLs in every class can become a maintenance burden; recommend factoring out a helper or at least a module-level constant.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (33)
src/backend/base/langflow/components/agents/mcp_component.py(1 hunks)src/backend/base/langflow/components/data/api_request.py(1 hunks)src/backend/base/langflow/components/data/directory.py(1 hunks)src/backend/base/langflow/components/data/file.py(1 hunks)src/backend/base/langflow/components/data/news_search.py(1 hunks)src/backend/base/langflow/components/data/rss.py(1 hunks)src/backend/base/langflow/components/data/sql_executor.py(1 hunks)src/backend/base/langflow/components/data/web_search.py(1 hunks)src/backend/base/langflow/components/data/webhook.py(1 hunks)src/backend/base/langflow/components/helpers/calculator_core.py(1 hunks)src/backend/base/langflow/components/helpers/current_date.py(1 hunks)src/backend/base/langflow/components/helpers/memory.py(1 hunks)src/backend/base/langflow/components/input_output/chat.py(1 hunks)src/backend/base/langflow/components/input_output/chat_output.py(1 hunks)src/backend/base/langflow/components/input_output/text.py(1 hunks)src/backend/base/langflow/components/input_output/text_output.py(1 hunks)src/backend/base/langflow/components/logic/conditional_router.py(1 hunks)src/backend/base/langflow/components/logic/loop.py(1 hunks)src/backend/base/langflow/components/logic/run_flow.py(1 hunks)src/backend/base/langflow/components/models/embedding_model.py(1 hunks)src/backend/base/langflow/components/models/language_model.py(1 hunks)src/backend/base/langflow/components/processing/batch_run.py(1 hunks)src/backend/base/langflow/components/processing/converter.py(1 hunks)src/backend/base/langflow/components/processing/data_operations.py(1 hunks)src/backend/base/langflow/components/processing/dataframe_operations.py(1 hunks)src/backend/base/langflow/components/processing/lambda_filter.py(1 hunks)src/backend/base/langflow/components/processing/llm_router.py(1 hunks)src/backend/base/langflow/components/processing/parser.py(1 hunks)src/backend/base/langflow/components/processing/prompt.py(1 hunks)src/backend/base/langflow/components/processing/python_repl_core.py(1 hunks)src/backend/base/langflow/components/processing/save_file.py(1 hunks)src/backend/base/langflow/components/processing/split_text.py(1 hunks)src/backend/base/langflow/components/processing/structured_output.py(1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
`src/backend/base/langflow/components/**/*.py`: Add new backend components to th...
src/backend/base/langflow/components/**/*.py: Add new backend components to the appropriate subdirectory under src/backend/base/langflow/components/
Implement async component methods using async def and await for asynchronous operations
Use asyncio.create_task for background work in async components and ensure proper cleanup on cancellation
Use asyncio.Queue for non-blocking queue operations in async components and handle timeouts appropriately
📄 Source: CodeRabbit Inference Engine (.cursor/rules/backend_development.mdc)
List of files the instruction was applied to:
src/backend/base/langflow/components/processing/prompt.pysrc/backend/base/langflow/components/helpers/current_date.pysrc/backend/base/langflow/components/data/api_request.pysrc/backend/base/langflow/components/data/sql_executor.pysrc/backend/base/langflow/components/logic/conditional_router.pysrc/backend/base/langflow/components/logic/loop.pysrc/backend/base/langflow/components/data/web_search.pysrc/backend/base/langflow/components/data/directory.pysrc/backend/base/langflow/components/processing/python_repl_core.pysrc/backend/base/langflow/components/processing/save_file.pysrc/backend/base/langflow/components/logic/run_flow.pysrc/backend/base/langflow/components/input_output/chat_output.pysrc/backend/base/langflow/components/processing/converter.pysrc/backend/base/langflow/components/helpers/calculator_core.pysrc/backend/base/langflow/components/processing/data_operations.pysrc/backend/base/langflow/components/data/webhook.pysrc/backend/base/langflow/components/processing/lambda_filter.pysrc/backend/base/langflow/components/processing/llm_router.pysrc/backend/base/langflow/components/data/news_search.pysrc/backend/base/langflow/components/agents/mcp_component.pysrc/backend/base/langflow/components/input_output/chat.pysrc/backend/base/langflow/components/processing/dataframe_operations.pysrc/backend/base/langflow/components/processing/batch_run.pysrc/backend/base/langflow/components/input_output/text_output.pysrc/backend/base/langflow/components/input_output/text.pysrc/backend/base/langflow/components/models/embedding_model.pysrc/backend/base/langflow/components/processing/split_text.pysrc/backend/base/langflow/components/processing/structured_output.pysrc/backend/base/langflow/components/data/file.pysrc/backend/base/langflow/components/processing/parser.pysrc/backend/base/langflow/components/models/language_model.pysrc/backend/base/langflow/components/helpers/memory.pysrc/backend/base/langflow/components/data/rss.py
`src/backend/**/*.py`: Run make format_backend to format Python code early and often Run make lint to check for linting issues in backend Python code
src/backend/**/*.py: Run make format_backend to format Python code early and often
Run make lint to check for linting issues in backend Python code
📄 Source: CodeRabbit Inference Engine (.cursor/rules/backend_development.mdc)
List of files the instruction was applied to:
src/backend/base/langflow/components/processing/prompt.pysrc/backend/base/langflow/components/helpers/current_date.pysrc/backend/base/langflow/components/data/api_request.pysrc/backend/base/langflow/components/data/sql_executor.pysrc/backend/base/langflow/components/logic/conditional_router.pysrc/backend/base/langflow/components/logic/loop.pysrc/backend/base/langflow/components/data/web_search.pysrc/backend/base/langflow/components/data/directory.pysrc/backend/base/langflow/components/processing/python_repl_core.pysrc/backend/base/langflow/components/processing/save_file.pysrc/backend/base/langflow/components/logic/run_flow.pysrc/backend/base/langflow/components/input_output/chat_output.pysrc/backend/base/langflow/components/processing/converter.pysrc/backend/base/langflow/components/helpers/calculator_core.pysrc/backend/base/langflow/components/processing/data_operations.pysrc/backend/base/langflow/components/data/webhook.pysrc/backend/base/langflow/components/processing/lambda_filter.pysrc/backend/base/langflow/components/processing/llm_router.pysrc/backend/base/langflow/components/data/news_search.pysrc/backend/base/langflow/components/agents/mcp_component.pysrc/backend/base/langflow/components/input_output/chat.pysrc/backend/base/langflow/components/processing/dataframe_operations.pysrc/backend/base/langflow/components/processing/batch_run.pysrc/backend/base/langflow/components/input_output/text_output.pysrc/backend/base/langflow/components/input_output/text.pysrc/backend/base/langflow/components/models/embedding_model.pysrc/backend/base/langflow/components/processing/split_text.pysrc/backend/base/langflow/components/processing/structured_output.pysrc/backend/base/langflow/components/data/file.pysrc/backend/base/langflow/components/processing/parser.pysrc/backend/base/langflow/components/models/language_model.pysrc/backend/base/langflow/components/helpers/memory.pysrc/backend/base/langflow/components/data/rss.py
`src/backend/**/components/**/*.py`: In your Python component class, set the `icon` attribute to a string matching the frontend icon mapping exactly (case-sensitive).
src/backend/**/components/**/*.py: In your Python component class, set theiconattribute to a string matching the frontend icon mapping exactly (case-sensitive).
📄 Source: CodeRabbit Inference Engine (.cursor/rules/icons.mdc)
List of files the instruction was applied to:
src/backend/base/langflow/components/processing/prompt.pysrc/backend/base/langflow/components/helpers/current_date.pysrc/backend/base/langflow/components/data/api_request.pysrc/backend/base/langflow/components/data/sql_executor.pysrc/backend/base/langflow/components/logic/conditional_router.pysrc/backend/base/langflow/components/logic/loop.pysrc/backend/base/langflow/components/data/web_search.pysrc/backend/base/langflow/components/data/directory.pysrc/backend/base/langflow/components/processing/python_repl_core.pysrc/backend/base/langflow/components/processing/save_file.pysrc/backend/base/langflow/components/logic/run_flow.pysrc/backend/base/langflow/components/input_output/chat_output.pysrc/backend/base/langflow/components/processing/converter.pysrc/backend/base/langflow/components/helpers/calculator_core.pysrc/backend/base/langflow/components/processing/data_operations.pysrc/backend/base/langflow/components/data/webhook.pysrc/backend/base/langflow/components/processing/lambda_filter.pysrc/backend/base/langflow/components/processing/llm_router.pysrc/backend/base/langflow/components/data/news_search.pysrc/backend/base/langflow/components/agents/mcp_component.pysrc/backend/base/langflow/components/input_output/chat.pysrc/backend/base/langflow/components/processing/dataframe_operations.pysrc/backend/base/langflow/components/processing/batch_run.pysrc/backend/base/langflow/components/input_output/text_output.pysrc/backend/base/langflow/components/input_output/text.pysrc/backend/base/langflow/components/models/embedding_model.pysrc/backend/base/langflow/components/processing/split_text.pysrc/backend/base/langflow/components/processing/structured_output.pysrc/backend/base/langflow/components/data/file.pysrc/backend/base/langflow/components/processing/parser.pysrc/backend/base/langflow/components/models/language_model.pysrc/backend/base/langflow/components/helpers/memory.pysrc/backend/base/langflow/components/data/rss.py
`src/backend/**/*component*.py`: In your Python component class, set the `icon` attribute to a string matching the frontend icon mapping exactly (case-sensitive).
src/backend/**/*component*.py: In your Python component class, set theiconattribute to a string matching the frontend icon mapping exactly (case-sensitive).
📄 Source: CodeRabbit Inference Engine (.cursor/rules/icons.mdc)
List of files the instruction was applied to:
src/backend/base/langflow/components/agents/mcp_component.py
🧠 Learnings (20)
📓 Common learnings
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/docs_development.mdc:0-0
Timestamp: 2025-06-30T14:40:02.667Z
Learning: Applies to docs/docs/**/*.{md,mdx} : Use consistent terminology: always capitalize 'Langflow', 'Component', and 'Flow' when referring to Langflow concepts; always uppercase 'API' and 'JSON'.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/docs_development.mdc:0-0
Timestamp: 2025-06-30T14:40:02.667Z
Learning: Applies to docs/docs/components/**/*.{md,mdx} : Component documentation pages must follow the provided template, including sections for Overview, Configuration (Inputs/Outputs), Usage Example, and Common Issues.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/docs_development.mdc:0-0
Timestamp: 2025-06-30T14:40:02.667Z
Learning: Internal links in documentation must be functional and tested.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/docs_development.mdc:0-0
Timestamp: 2025-06-30T14:40:02.667Z
Learning: Applies to docs/docs/**/*.{md,mdx} : All documentation content must be placed within the 'docs/' directory, organized into subdirectories such as 'getting-started', 'components', 'integrations', 'administration', 'contributing', and 'api-reference'.
src/backend/base/langflow/components/processing/prompt.py (1)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/docs_development.mdc:0-0
Timestamp: 2025-06-30T14:40:02.667Z
Learning: Applies to docs/docs/components/**/*.{md,mdx} : Component documentation pages must follow the provided template, including sections for Overview, Configuration (Inputs/Outputs), Usage Example, and Common Issues.
src/backend/base/langflow/components/data/sql_executor.py (3)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.836Z
Learning: Applies to src/backend/**/*component*.py : In your Python component class, set the `icon` attribute to a string matching the frontend icon mapping exactly (case-sensitive).
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: When implementing a new component icon in Langflow, ensure the icon name is clear, recognizable, and used consistently across both backend (Python 'icon' attribute) and frontend (React/TypeScript mapping).
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.836Z
Learning: Applies to src/backend/**/components/**/*.py : In your Python component class, set the `icon` attribute to a string matching the frontend icon mapping exactly (case-sensitive).
src/backend/base/langflow/components/logic/loop.py (1)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Applies to src/backend/base/langflow/components/**/__init__.py : Update __init__.py with alphabetical imports when adding new components
src/backend/base/langflow/components/data/directory.py (4)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Applies to src/backend/base/langflow/components/**/*.py : Add new backend components to the appropriate subdirectory under src/backend/base/langflow/components/
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Applies to src/backend/tests/unit/components/**/*.py : Mirror the component directory structure in unit tests under src/backend/tests/unit/components/
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.836Z
Learning: Applies to src/backend/**/*component*.py : In your Python component class, set the `icon` attribute to a string matching the frontend icon mapping exactly (case-sensitive).
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.836Z
Learning: Applies to src/backend/**/components/**/*.py : In your Python component class, set the `icon` attribute to a string matching the frontend icon mapping exactly (case-sensitive).
src/backend/base/langflow/components/processing/python_repl_core.py (2)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.836Z
Learning: Applies to src/backend/**/*component*.py : In your Python component class, set the `icon` attribute to a string matching the frontend icon mapping exactly (case-sensitive).
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.836Z
Learning: Applies to src/backend/**/components/**/*.py : In your Python component class, set the `icon` attribute to a string matching the frontend icon mapping exactly (case-sensitive).
src/backend/base/langflow/components/logic/run_flow.py (4)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Applies to src/backend/base/langflow/components/**/__init__.py : Update __init__.py with alphabetical imports when adding new components
Learnt from: ogabrielluiz
PR: langflow-ai/langflow#0
File: :0-0
Timestamp: 2025-06-26T19:43:18.260Z
Learning: In langflow custom components, the `module_name` parameter is now propagated through template building functions to add module metadata and code hashes to frontend nodes for better component tracking and debugging.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Applies to src/backend/base/langflow/components/**/*.py : Add new backend components to the appropriate subdirectory under src/backend/base/langflow/components/
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: When implementing a new component icon in Langflow, ensure the icon name is clear, recognizable, and used consistently across both backend (Python 'icon' attribute) and frontend (React/TypeScript mapping).
src/backend/base/langflow/components/processing/converter.py (1)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: When implementing a new component icon in Langflow, ensure the icon name is clear, recognizable, and used consistently across both backend (Python 'icon' attribute) and frontend (React/TypeScript mapping).
src/backend/base/langflow/components/processing/data_operations.py (1)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: When implementing a new component icon in Langflow, ensure the icon name is clear, recognizable, and used consistently across both backend (Python 'icon' attribute) and frontend (React/TypeScript mapping).
src/backend/base/langflow/components/data/webhook.py (3)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: When implementing a new component icon in Langflow, ensure the icon name is clear, recognizable, and used consistently across both backend (Python 'icon' attribute) and frontend (React/TypeScript mapping).
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.836Z
Learning: Applies to src/backend/**/*component*.py : In your Python component class, set the `icon` attribute to a string matching the frontend icon mapping exactly (case-sensitive).
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.836Z
Learning: Applies to src/backend/**/components/**/*.py : In your Python component class, set the `icon` attribute to a string matching the frontend icon mapping exactly (case-sensitive).
src/backend/base/langflow/components/processing/lambda_filter.py (1)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: When implementing a new component icon in Langflow, ensure the icon name is clear, recognizable, and used consistently across both backend (Python 'icon' attribute) and frontend (React/TypeScript mapping).
src/backend/base/langflow/components/processing/llm_router.py (1)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: When implementing a new component icon in Langflow, ensure the icon name is clear, recognizable, and used consistently across both backend (Python 'icon' attribute) and frontend (React/TypeScript mapping).
src/backend/base/langflow/components/data/news_search.py (3)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Applies to src/backend/base/langflow/components/**/__init__.py : Update __init__.py with alphabetical imports when adding new components
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: When implementing a new component icon in Langflow, ensure the icon name is clear, recognizable, and used consistently across both backend (Python 'icon' attribute) and frontend (React/TypeScript mapping).
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.836Z
Learning: Applies to src/backend/**/*component*.py : In your Python component class, set the `icon` attribute to a string matching the frontend icon mapping exactly (case-sensitive).
src/backend/base/langflow/components/input_output/chat.py (1)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-06-30T14:41:58.837Z
Learning: Applies to {src/backend/tests/**/*.py,tests/**/*.py} : Test Langflow's 'Message' objects and chat functionality by asserting correct properties and structure.
src/backend/base/langflow/components/input_output/text.py (1)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: When implementing a new component icon in Langflow, ensure the icon name is clear, recognizable, and used consistently across both backend (Python 'icon' attribute) and frontend (React/TypeScript mapping).
src/backend/base/langflow/components/models/embedding_model.py (2)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: When implementing a new component icon in Langflow, ensure the icon name is clear, recognizable, and used consistently across both backend (Python 'icon' attribute) and frontend (React/TypeScript mapping).
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.836Z
Learning: Applies to src/backend/**/*component*.py : In your Python component class, set the `icon` attribute to a string matching the frontend icon mapping exactly (case-sensitive).
src/backend/base/langflow/components/processing/structured_output.py (1)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/docs_development.mdc:0-0
Timestamp: 2025-06-30T14:40:02.667Z
Learning: Applies to docs/docs/components/**/*.{md,mdx} : Component documentation pages must follow the provided template, including sections for Overview, Configuration (Inputs/Outputs), Usage Example, and Common Issues.
src/backend/base/langflow/components/data/file.py (2)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Applies to src/backend/base/langflow/components/**/*.py : Add new backend components to the appropriate subdirectory under src/backend/base/langflow/components/
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: When implementing a new component icon in Langflow, ensure the icon name is clear, recognizable, and used consistently across both backend (Python 'icon' attribute) and frontend (React/TypeScript mapping).
src/backend/base/langflow/components/processing/parser.py (1)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/docs_development.mdc:0-0
Timestamp: 2025-06-30T14:40:02.667Z
Learning: Applies to docs/docs/components/**/*.{md,mdx} : Component documentation pages must follow the provided template, including sections for Overview, Configuration (Inputs/Outputs), Usage Example, and Common Issues.
src/backend/base/langflow/components/models/language_model.py (5)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/docs_development.mdc:0-0
Timestamp: 2025-06-30T14:40:02.667Z
Learning: Applies to docs/docs/**/*.{md,mdx} : Use consistent terminology: always capitalize 'Langflow', 'Component', and 'Flow' when referring to Langflow concepts; always uppercase 'API' and 'JSON'.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-06-30T14:41:58.837Z
Learning: Applies to {src/backend/tests/**/*.py,tests/**/*.py} : Use 'MockLanguageModel' for testing language model components without external API calls.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Applies to src/backend/base/langflow/components/**/*.py : Add new backend components to the appropriate subdirectory under src/backend/base/langflow/components/
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Applies to src/backend/base/langflow/components/**/__init__.py : Update __init__.py with alphabetical imports when adding new components
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: When implementing a new component icon in Langflow, ensure the icon name is clear, recognizable, and used consistently across both backend (Python 'icon' attribute) and frontend (React/TypeScript mapping).
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Optimize new Python code in this PR
🔇 Additional comments (15)
src/backend/base/langflow/components/processing/prompt.py (1)
12-12: Verify the new documentation URL actually resolves.Great to see every component linking directly to its docs. Per our docs guidelines, internal links must be functional; please double-check that
https://docs.langflow.org/components-promptsreturns a 200 and the expected page content (no redirect loop / 404).src/backend/base/langflow/components/data/directory.py (1)
12-12: Nice addition—documentation link in place.The
documentationattribute cleanly surfaces the docs URL and follows the pattern introduced across components. No further action needed here.src/backend/base/langflow/components/data/sql_executor.py (1)
21-21: Documentation attribute correctly added – no further action needed
URL is well-formed and the change is fully isolated from runtime logic.src/backend/base/langflow/components/processing/split_text.py (1)
14-14: Documentation URL VerifiedThe link
https://docs.langflow.org/components-processing#split-textresponds with HTTP 200 OK.
No further action needed.src/backend/base/langflow/components/processing/save_file.py (1)
21-24: Documentation link validated
The URLhttps://docs.langflow.org/components-processing#save-filereturns HTTP 200. No further changes required.src/backend/base/langflow/components/processing/lambda_filter.py (1)
19-19: Verify the documentation URL anchorDouble-check that
https://docs.langflow.org/components-processing#smart-functionis the final, stable slug generated by Docusaurus.
A broken anchor will surface only at runtime and defeats the goal of this PR.src/backend/base/langflow/components/processing/parser.py (1)
13-13: Documentation link verified: URL and anchor both valid
The URLhttps://docs.langflow.org/components-processing#parserreturns HTTP 200 and contains theid="parser"anchor. No changes required.Verified location:
- src/backend/base/langflow/components/processing/parser.py (line 13)
src/backend/base/langflow/components/processing/dataframe_operations.py (1)
18-18: Documentation Anchor ConfirmedThe
#dataframe-operationsanchor exists in docs/docs/Components/components-processing.md (line 18: ## DataFrame operations), so the link is valid.src/backend/base/langflow/components/logic/run_flow.py (1)
16-16: Adds clear documentation link – looks goodDirect link will improve DX; no further action needed.
src/backend/base/langflow/components/helpers/calculator_core.py (1)
14-14: Documentation URL added correctlyKeeps style consistent across components. 👍
src/backend/base/langflow/components/models/language_model.py (1)
20-22: Nice cleanup & doc linkTrimmed description and new
documentationattribute are both fine.src/backend/base/langflow/components/logic/conditional_router.py (1)
11-11: Good addition ofdocumentationattributeMaintains the emerging convention.
src/backend/base/langflow/components/data/file.py (1)
19-19: Consistent documentation link addedChange is harmless and aligns with project guidelines.
src/backend/base/langflow/components/processing/batch_run.py (1)
19-20: Documentation URL VerifiedThe URL
https://docs.langflow.org/components-processing#batch-runreturns HTTP 200 OK, so no changes are needed.src/backend/base/langflow/components/processing/python_repl_core.py (1)
13-15: Docs link and icon spelling are correct
- The documentation URL returns HTTP 200.
- The icon string
"square-terminal"exists in the frontend mapping (src/frontend/src/utils/styleUtils.ts:466).No changes required.
edwinjosechittilappilly
left a comment
There was a problem hiding this comment.
Approving with comments
Add documentation links to core component classes in the
langflowbackend, making it easier for developers to access relevant information about each component.Supersedes #8766
Summary by CodeRabbit