-
Notifications
You must be signed in to change notification settings - Fork 8.2k
ref: sidebar experience improvement with new bundles #8824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 update introduces or refines Changes
Sequence Diagram(s)sequenceDiagram
participant Importer
participant PackageInit
participant Component
Importer->>PackageInit: import from package (e.g., from baidu import QianfanChatEndpoint)
PackageInit->>Component: import Component (e.g., QianfanChatEndpoint)
PackageInit-->>Importer: expose only components listed in __all__
Suggested labels
Suggested reviewers
✨ 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
🧹 Nitpick comments (7)
src/backend/base/langflow/components/zep/__init__.py (1)
1-3: Consider lazy import to avoid heavy optional dependencyImporting
ZepChatMemoryimmediately pullszep_python,httpx, etc. Any user merely doingimport langflowwill now need those extras installed even if they never use Zep.-from .zep import ZepChatMemory - -__all__ = ["ZepChatMemory"] +# Lazy import defers the heavy dependency until the class is first accessed +import importlib + +def _lazy(): + return getattr(importlib.import_module(__name__ + ".zep"), "ZepChatMemory") + +class _Proxy: + def __getattr__(self, item): + return getattr(_lazy(), item) + +ZepChatMemory = _Proxy() # type: ignore +__all__ = ["ZepChatMemory"]This keeps current semantics (
from ..zep import ZepChatMemorystill works) but spares downstream projects from unwanted dependencies.src/backend/base/langflow/components/redis/__init__.py (1)
1-3: Name collision risk & eager dependency load
redisis also the top-level PyPI package name. Having a sibling fileredis.pycreates two different module names (langflow.components.redisvsredis). Inside that file any unqualifiedimport redisstatement will import itself, not the external driver. Please double-check the implementation.Similar to the Zep comment, importing
RedisIndexChatMemoryupfront forces theredisdriver andlangchainextras to be present. A lazy import pattern can avoid this.src/backend/base/langflow/components/baidu/__init__.py (1)
1-3: Optional: defer heavy Baidu SDK import
QianfanChatEndpointlikely drags huge Baidu SDKs; exporting via a small lazy wrapper (see Zep example) will make the base package lighter for users who do not need Baidu.src/backend/base/langflow/components/openrouter/__init__.py (1)
1-3: Optional: adopt lazy import for OpenRouterSame reasoning: the OpenRouter component depends on
httpx,openai, etc. Consider a deferred import to keep the base install lean.src/backend/base/langflow/components/groq/__init__.py (1)
1-3: Nit: keep__all__entries alphabetised when >1 appearRight now there’s only one symbol, so no issue. Just a reminder for future additions.
src/backend/base/langflow/components/mistral/__init__.py (1)
1-2: Reorder imports alphabetically by component name.According to the coding guidelines, imports should be in alphabetical order when adding new components. The imports should be ordered by the component name being imported.
Apply this diff to fix the import order:
-from .mistral import MistralAIModelComponent -from .mistral_embeddings import MistralAIEmbeddingsComponent +from .mistral_embeddings import MistralAIEmbeddingsComponent +from .mistral import MistralAIModelComponentsrc/backend/base/langflow/components/cohere/__init__.py (1)
1-3: Reorder imports alphabetically by component name.The imports should be ordered alphabetically by the component name being imported, consistent with the coding guidelines.
Apply this diff to fix the import order:
-from .cohere_embeddings import CohereEmbeddingsComponent -from .cohere_models import CohereComponent +from .cohere_models import CohereComponent +from .cohere_embeddings import CohereEmbeddingsComponent
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (21)
src/backend/base/langflow/components/baidu/__init__.py(1 hunks)src/backend/base/langflow/components/cloudflare/__init__.py(1 hunks)src/backend/base/langflow/components/cohere/__init__.py(1 hunks)src/backend/base/langflow/components/cohere/cohere_models.py(1 hunks)src/backend/base/langflow/components/deepseek/__init__.py(1 hunks)src/backend/base/langflow/components/embeddings/__init__.py(1 hunks)src/backend/base/langflow/components/groq/__init__.py(1 hunks)src/backend/base/langflow/components/languagemodels/__init__.py(0 hunks)src/backend/base/langflow/components/lmstudio/__init__.py(1 hunks)src/backend/base/langflow/components/maritalk/__init__.py(1 hunks)src/backend/base/langflow/components/mem0/__init__.py(1 hunks)src/backend/base/langflow/components/memories/__init__.py(0 hunks)src/backend/base/langflow/components/mistral/__init__.py(1 hunks)src/backend/base/langflow/components/novita/__init__.py(1 hunks)src/backend/base/langflow/components/openrouter/__init__.py(1 hunks)src/backend/base/langflow/components/perplexity/__init__.py(1 hunks)src/backend/base/langflow/components/redis/__init__.py(1 hunks)src/backend/base/langflow/components/sambanova/__init__.py(1 hunks)src/backend/base/langflow/components/xai/__init__.py(1 hunks)src/backend/base/langflow/components/zep/__init__.py(1 hunks)src/frontend/src/utils/styleUtils.ts(1 hunks)
💤 Files with no reviewable changes (2)
- src/backend/base/langflow/components/memories/init.py
- src/backend/base/langflow/components/languagemodels/init.py
🧰 Additional context used
📓 Path-based instructions (6)
`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/lmstudio/__init__.pysrc/backend/base/langflow/components/groq/__init__.pysrc/backend/base/langflow/components/cloudflare/__init__.pysrc/backend/base/langflow/components/perplexity/__init__.pysrc/backend/base/langflow/components/zep/__init__.pysrc/backend/base/langflow/components/openrouter/__init__.pysrc/backend/base/langflow/components/deepseek/__init__.pysrc/backend/base/langflow/components/novita/__init__.pysrc/backend/base/langflow/components/mem0/__init__.pysrc/backend/base/langflow/components/baidu/__init__.pysrc/backend/base/langflow/components/mistral/__init__.pysrc/backend/base/langflow/components/cohere/__init__.pysrc/backend/base/langflow/components/embeddings/__init__.pysrc/backend/base/langflow/components/xai/__init__.pysrc/backend/base/langflow/components/cohere/cohere_models.pysrc/backend/base/langflow/components/maritalk/__init__.pysrc/backend/base/langflow/components/redis/__init__.pysrc/backend/base/langflow/components/sambanova/__init__.py
`src/backend/base/langflow/components/**/__init__.py`: Update __init__.py with alphabetical imports when adding new components
src/backend/base/langflow/components/**/__init__.py: Update init.py with alphabetical imports when adding new components
📄 Source: CodeRabbit Inference Engine (.cursor/rules/backend_development.mdc)
List of files the instruction was applied to:
src/backend/base/langflow/components/lmstudio/__init__.pysrc/backend/base/langflow/components/groq/__init__.pysrc/backend/base/langflow/components/cloudflare/__init__.pysrc/backend/base/langflow/components/perplexity/__init__.pysrc/backend/base/langflow/components/zep/__init__.pysrc/backend/base/langflow/components/openrouter/__init__.pysrc/backend/base/langflow/components/deepseek/__init__.pysrc/backend/base/langflow/components/novita/__init__.pysrc/backend/base/langflow/components/mem0/__init__.pysrc/backend/base/langflow/components/baidu/__init__.pysrc/backend/base/langflow/components/mistral/__init__.pysrc/backend/base/langflow/components/cohere/__init__.pysrc/backend/base/langflow/components/embeddings/__init__.pysrc/backend/base/langflow/components/xai/__init__.pysrc/backend/base/langflow/components/maritalk/__init__.pysrc/backend/base/langflow/components/redis/__init__.pysrc/backend/base/langflow/components/sambanova/__init__.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/lmstudio/__init__.pysrc/backend/base/langflow/components/groq/__init__.pysrc/backend/base/langflow/components/cloudflare/__init__.pysrc/backend/base/langflow/components/perplexity/__init__.pysrc/backend/base/langflow/components/zep/__init__.pysrc/backend/base/langflow/components/openrouter/__init__.pysrc/backend/base/langflow/components/deepseek/__init__.pysrc/backend/base/langflow/components/novita/__init__.pysrc/backend/base/langflow/components/mem0/__init__.pysrc/backend/base/langflow/components/baidu/__init__.pysrc/backend/base/langflow/components/mistral/__init__.pysrc/backend/base/langflow/components/cohere/__init__.pysrc/backend/base/langflow/components/embeddings/__init__.pysrc/backend/base/langflow/components/xai/__init__.pysrc/backend/base/langflow/components/cohere/cohere_models.pysrc/backend/base/langflow/components/maritalk/__init__.pysrc/backend/base/langflow/components/redis/__init__.pysrc/backend/base/langflow/components/sambanova/__init__.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/lmstudio/__init__.pysrc/backend/base/langflow/components/groq/__init__.pysrc/backend/base/langflow/components/cloudflare/__init__.pysrc/backend/base/langflow/components/perplexity/__init__.pysrc/backend/base/langflow/components/zep/__init__.pysrc/backend/base/langflow/components/openrouter/__init__.pysrc/backend/base/langflow/components/deepseek/__init__.pysrc/backend/base/langflow/components/novita/__init__.pysrc/backend/base/langflow/components/mem0/__init__.pysrc/backend/base/langflow/components/baidu/__init__.pysrc/backend/base/langflow/components/mistral/__init__.pysrc/backend/base/langflow/components/cohere/__init__.pysrc/backend/base/langflow/components/embeddings/__init__.pysrc/backend/base/langflow/components/xai/__init__.pysrc/backend/base/langflow/components/cohere/cohere_models.pysrc/backend/base/langflow/components/maritalk/__init__.pysrc/backend/base/langflow/components/redis/__init__.pysrc/backend/base/langflow/components/sambanova/__init__.py
`src/frontend/**/*.{ts,tsx}`: Use React 18 with TypeScript for all UI components and frontend logic.
src/frontend/**/*.{ts,tsx}: Use React 18 with TypeScript for all UI components and frontend logic.
📄 Source: CodeRabbit Inference Engine (.cursor/rules/frontend_development.mdc)
List of files the instruction was applied to:
src/frontend/src/utils/styleUtils.ts
`src/frontend/**/*.{ts,tsx,js,jsx,css,scss}`: Use Tailwind CSS for styling all frontend components.
src/frontend/**/*.{ts,tsx,js,jsx,css,scss}: Use Tailwind CSS for styling all frontend components.
📄 Source: CodeRabbit Inference Engine (.cursor/rules/frontend_development.mdc)
List of files the instruction was applied to:
src/frontend/src/utils/styleUtils.ts
🧠 Learnings (20)
📓 Common learnings
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/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/
src/backend/base/langflow/components/lmstudio/__init__.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: 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: 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/services/database/models/**/*.py : Place database models in src/backend/base/langflow/services/database/models/ and its subdirectories
src/backend/base/langflow/components/groq/__init__.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/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Applies to src/backend/base/langflow/services/database/models/**/*.py : Place database models in src/backend/base/langflow/services/database/models/ and its subdirectories
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/
src/backend/base/langflow/components/cloudflare/__init__.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/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: 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.
src/backend/base/langflow/components/perplexity/__init__.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: 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: 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/services/database/models/**/*.py : Place database models in src/backend/base/langflow/services/database/models/ and its subdirectories
src/backend/base/langflow/components/zep/__init__.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/**/__init__.py : Update __init__.py with alphabetical imports when adding new 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/**/*.py : Add new backend components to the appropriate subdirectory under src/backend/base/langflow/components/
src/backend/base/langflow/components/openrouter/__init__.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/**/__init__.py : Update __init__.py with alphabetical imports when adding new 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/**/*.py : Add new backend components to the appropriate subdirectory under src/backend/base/langflow/components/
src/backend/base/langflow/components/deepseek/__init__.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/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/services/database/models/**/*.py : Place database models in src/backend/base/langflow/services/database/models/ and its subdirectories
src/backend/base/langflow/components/novita/__init__.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: 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: 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/services/database/models/**/*.py : Place database models in src/backend/base/langflow/services/database/models/ and its subdirectories
src/backend/base/langflow/components/mem0/__init__.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/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: 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.
src/backend/base/langflow/components/baidu/__init__.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/**/__init__.py : Update __init__.py with alphabetical imports when adding new 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/**/*.py : Add new backend components to the appropriate subdirectory under src/backend/base/langflow/components/
src/backend/base/langflow/components/mistral/__init__.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/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: 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.
src/backend/base/langflow/components/cohere/__init__.py (5)
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/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/**/*.py : Implement async component methods using async def and await for asynchronous operations
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/testing.mdc:0-0
Timestamp: 2025-06-30T14:41:58.837Z
Learning: Applies to {src/backend/tests/**/*.py,tests/**/*.py} : Test backward compatibility across Langflow versions by mapping component files to supported versions using 'VersionComponentMapping'.
src/backend/base/langflow/components/embeddings/__init__.py (6)
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/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/**/*.py : Implement async component methods using async def and await for asynchronous operations
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/testing.mdc:0-0
Timestamp: 2025-06-30T14:41:58.837Z
Learning: Applies to {src/backend/tests/**/*.py,tests/**/*.py} : Test backward compatibility across Langflow versions by mapping component files to supported versions using 'VersionComponentMapping'.
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/services/database/models/**/*.py : Place database models in src/backend/base/langflow/services/database/models/ and its subdirectories
src/backend/base/langflow/components/xai/__init__.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: 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: 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/services/database/models/**/*.py : Place database models in src/backend/base/langflow/services/database/models/ and its subdirectories
src/backend/base/langflow/components/cohere/cohere_models.py (8)
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/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: 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/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} : Test backward compatibility across Langflow versions by mapping component files to supported versions using 'VersionComponentMapping'.
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/services/database/models/**/*.py : Place database models in src/backend/base/langflow/services/database/models/ and its subdirectories
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.
src/backend/base/langflow/components/maritalk/__init__.py (5)
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/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/services/database/models/**/*.py : Place database models in src/backend/base/langflow/services/database/models/ and its subdirectories
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: 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.
src/backend/base/langflow/components/redis/__init__.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/**/__init__.py : Update __init__.py with alphabetical imports when adding new 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/**/*.py : Add new backend components to the appropriate subdirectory under src/backend/base/langflow/components/
src/backend/base/langflow/components/sambanova/__init__.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/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: 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.
src/frontend/src/utils/styleUtils.ts (4)
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/sidebars.js : Sidebar navigation must be configured and updated in 'docs/sidebars.js' to reflect the current documentation structure.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.836Z
Learning: Use clear, recognizable, and consistent icon names for both backend and frontend (e.g., 'AstraDB', 'Postgres', 'OpenAI').
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/frontend/src/icons/lazyIconImports.ts : Add your icon to the `lazyIconsMapping` object in `src/frontend/src/icons/lazyIconImports.ts` with a key that matches the backend icon string exactly.
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).
🧬 Code Graph Analysis (11)
src/backend/base/langflow/components/lmstudio/__init__.py (2)
src/backend/base/langflow/components/lmstudio/lmstudioembeddings.py (1)
LMStudioEmbeddingsComponent(13-91)src/backend/base/langflow/components/lmstudio/lmstudiomodel.py (1)
LMStudioModelComponent(14-129)
src/backend/base/langflow/components/cloudflare/__init__.py (1)
src/backend/base/langflow/components/cloudflare/cloudflare.py (1)
CloudflareWorkersAIEmbeddingsComponent(8-81)
src/backend/base/langflow/components/zep/__init__.py (1)
src/backend/base/langflow/components/zep/zep.py (1)
ZepChatMemory(6-44)
src/backend/base/langflow/components/openrouter/__init__.py (1)
src/backend/base/langflow/components/openrouter/openrouter.py (1)
OpenRouterComponent(20-202)
src/backend/base/langflow/components/deepseek/__init__.py (1)
src/backend/base/langflow/components/deepseek/deepseek.py (1)
DeepSeekModelComponent(13-136)
src/backend/base/langflow/components/novita/__init__.py (1)
src/backend/base/langflow/components/novita/novita.py (1)
NovitaModelComponent(21-130)
src/backend/base/langflow/components/mem0/__init__.py (1)
src/backend/base/langflow/components/mem0/mem0_chat_memory.py (1)
Mem0MemoryComponent(18-142)
src/backend/base/langflow/components/mistral/__init__.py (2)
src/backend/base/langflow/components/mistral/mistral.py (1)
MistralAIModelComponent(9-114)src/backend/base/langflow/components/mistral/mistral_embeddings.py (1)
MistralAIEmbeddingsComponent(9-58)
src/backend/base/langflow/components/embeddings/__init__.py (2)
src/backend/base/langflow/components/cloudflare/cloudflare.py (1)
CloudflareWorkersAIEmbeddingsComponent(8-81)src/backend/base/langflow/components/mistral/mistral_embeddings.py (1)
MistralAIEmbeddingsComponent(9-58)
src/backend/base/langflow/components/xai/__init__.py (1)
src/backend/base/langflow/components/xai/xai.py (1)
XAIModelComponent(22-167)
src/backend/base/langflow/components/redis/__init__.py (1)
src/backend/base/langflow/components/redis/redis.py (1)
RedisIndexChatMemory(10-43)
🪛 Pylint (3.3.7)
src/backend/base/langflow/components/perplexity/__init__.py
[error] 1-1: No name 'PerplexityModelComponent' in module 'langflow.components.perplexity.perplexity'
(E0611)
src/backend/base/langflow/components/maritalk/__init__.py
[error] 1-1: No name 'MariTalkModel' in module 'langflow.components.maritalk.maritalk'
(E0611)
src/backend/base/langflow/components/sambanova/__init__.py
[error] 1-1: No name 'SambaNovaModelComponent' in module 'langflow.components.sambanova.sambanova'
(E0611)
🪛 GitHub Check: Ruff Style Check (3.13)
src/backend/base/langflow/components/embeddings/__init__.py
[failure] 2-2: Ruff (TID252)
src/backend/base/langflow/components/embeddings/init.py:2:1: TID252 Prefer absolute imports over relative imports from parent modules
[failure] 1-1: Ruff (TID252)
src/backend/base/langflow/components/embeddings/init.py:1:1: TID252 Prefer absolute imports over relative imports from parent modules
🪛 Ruff (0.11.9)
src/backend/base/langflow/components/embeddings/__init__.py
1-1: Prefer absolute imports over relative imports from parent modules
Replace relative imports from parent modules with absolute imports
(TID252)
2-2: Prefer absolute imports over relative imports from parent modules
Replace relative imports from parent modules with absolute imports
(TID252)
🪛 GitHub Actions: Ruff Style Check
src/backend/base/langflow/components/embeddings/__init__.py
[error] 1-1: Ruff TID252: Prefer absolute imports over relative imports from parent modules.
🔇 Additional comments (11)
src/backend/base/langflow/components/lmstudio/__init__.py (1)
1-4: Imports &__all__look good
- Alphabetical order of both imports and
__all__entries is correct (EmbeddingsbeforeModel).- No stray symbols are leaked.
No further action required.
src/backend/base/langflow/components/cohere/cohere_models.py (1)
11-15: Check downstream references to the newdisplay_nameChanging
display_nameto “Cohere Language Models” is harmless here, but double-check:
- Any frontend mapping that relies on an exact string match (tooltips, docs links, analytics).
- Tests that assert
display_name.If none exist, you’re good to go.
src/backend/base/langflow/components/xai/__init__.py (1)
1-3: Single-purpose re-export is correctNothing to add—import is alphabetical (single item) and
__all__is consistent.src/backend/base/langflow/components/novita/__init__.py (1)
1-3: Public API looks goodSingle export, correctly named, matches the component implementation shown in
novita.py. No issues spotted.src/backend/base/langflow/components/deepseek/__init__.py (1)
1-3: Component correctly re-exported
DeepSeekModelComponentexists indeepseek.py; the re-export complies with our packaging guideline. ✅src/backend/base/langflow/components/cloudflare/__init__.py (1)
1-3: Re-export aligns with new package structure
CloudflareWorkersAIEmbeddingsComponentis present incloudflare.py; the__all__list is accurate. Good job.src/backend/base/langflow/components/mem0/__init__.py (1)
1-3: Mem0 component exposed correctlyImport path and
__all__entry are consistent withmem0_chat_memory.py.src/backend/base/langflow/components/mistral/__init__.py (1)
4-4: LGTM - all list is correctly alphabetized.The export list follows alphabetical ordering as required by the coding guidelines.
src/backend/base/langflow/components/cohere/__init__.py (1)
5-5: LGTM - all list is correctly alphabetized.The export list follows alphabetical ordering as required by the coding guidelines.
src/backend/base/langflow/components/embeddings/__init__.py (1)
6-11: LGTM - Export list correctly reflects the component reorganization.The all list properly exports the remaining components after the migration of CohereEmbeddingsComponent and LMStudioEmbeddingsComponent to their dedicated packages.
src/frontend/src/utils/styleUtils.ts (1)
230-289: LGTM - Frontend sidebar correctly reflects backend component reorganization.The SIDEBAR_BUNDLES updates properly align with the backend component package restructuring. The new entries for components like Baidu, Cloudflare, DeepSeek, Groq, LMStudio, MariTalk, Mem0, MistralAI, Novita, OpenRouter, Perplexity, Redis, SambaNova, xAI, and Zep correspond to the newly introduced backend component packages with their own
__init__.pyfiles.The structure is consistent across all entries, maintaining the required
display_name,name, andiconproperties. This change supports the modularization effort described in the PR objectives for sidebar experience improvement.
| from .sambanova import SambaNovaModelComponent | ||
|
|
||
| __all__ = ["SambaNovaModelComponent"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Import likely to fail – symbol not found
Pylint flags SambaNovaModelComponent as missing from .sambanova. If the class is actually named differently (e.g., SambaNovaComponent) or lives in another file, every import langflow.components.sambanova will raise at import-time, breaking the entire package initialisation.
-from .sambanova import SambaNovaModelComponent
+# Adjust the module / symbol to the real name or location
+from .sambanova_model import SambaNovaModelComponent # examplePlease verify the real class name & path across the repo.
🏁 Script executed:
#!/bin/bash
# Confirm the symbol exists exactly once
rg -n $'class\\s+SambaNovaModelComponent' | headLength of output: 48
🏁 Script executed:
#!/bin/bash
# List files in the sambanova component directory and show class definitions
echo "Files in sambanova directory:"
ls src/backend/base/langflow/components/sambanova
echo
echo "Class definitions in sambanova files:"
rg -n "class " src/backend/base/langflow/components/sambanova/*.py || true
echo
echo "Occurrences of ‘SambaNova’ across the repo:"
rg -n "SambaNova" . || trueLength of output: 4461
Fix import in sambanova init.py to use the real class name
The __init__.py in components/sambanova is importing SambaNovaModelComponent, but the class defined in sambanova.py is actually named SambaNovaComponent. This will cause all imports of this package to fail at startup.
• Location: src/backend/base/langflow/components/sambanova/__init__.py
• Change the import and __all__ to reference SambaNovaComponent
Proposed diff:
-from .sambanova import SambaNovaModelComponent
-__all__ = ["SambaNovaModelComponent"]
+from .sambanova import SambaNovaComponent
+
+__all__ = ["SambaNovaComponent"]After this change, verify that all downstream imports (e.g., in model_input_constants.py) continue to use SambaNovaComponent.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| from .sambanova import SambaNovaModelComponent | |
| __all__ = ["SambaNovaModelComponent"] | |
| from .sambanova import SambaNovaComponent | |
| __all__ = ["SambaNovaComponent"] |
🧰 Tools
🪛 Pylint (3.3.7)
[error] 1-1: No name 'SambaNovaModelComponent' in module 'langflow.components.sambanova.sambanova'
(E0611)
🤖 Prompt for AI Agents
In src/backend/base/langflow/components/sambanova/__init__.py lines 1 to 3, the
import and __all__ list incorrectly reference SambaNovaModelComponent instead of
the actual class name SambaNovaComponent defined in sambanova.py. Update both
the import statement and the __all__ list to use SambaNovaComponent. After
making this change, verify that all downstream imports, such as those in
model_input_constants.py, also use SambaNovaComponent to avoid import errors.
| from .perplexity import PerplexityModelComponent | ||
|
|
||
| __all__ = ["PerplexityModelComponent"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import path may be wrong – static analysis can’t find PerplexityModelComponent
Pylint error E0611: No name 'PerplexityModelComponent' in module 'langflow.components.perplexity.perplexity' suggests the class lives in a differently named module (e.g. perplexity_model.py).
Proposed fix – adjust the import to the actual file name:
-from .perplexity import PerplexityModelComponent
+from .perplexity_model import PerplexityModelComponent(or whichever module houses the class).
Please verify the module name and update tests accordingly.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| from .perplexity import PerplexityModelComponent | |
| __all__ = ["PerplexityModelComponent"] | |
| from .perplexity_model import PerplexityModelComponent | |
| __all__ = ["PerplexityModelComponent"] |
🧰 Tools
🪛 Pylint (3.3.7)
[error] 1-1: No name 'PerplexityModelComponent' in module 'langflow.components.perplexity.perplexity'
(E0611)
🤖 Prompt for AI Agents
In src/backend/base/langflow/components/perplexity/__init__.py at lines 1 to 3,
the import statement for PerplexityModelComponent uses an incorrect module path
causing a pylint E0611 error. Verify the actual module file where
PerplexityModelComponent is defined (likely perplexity_model.py or similar),
then update the import statement to import from that correct module. Also,
update any related tests to reflect the corrected import path.
| from .maritalk import MariTalkModel | ||
|
|
||
| __all__ = ["MariTalkModel"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Import path/Class name appears wrong – module will raise at import-time
pylint reports that MariTalkModel cannot be found inside langflow.components.maritalk.maritalk. Either the file is not named maritalk.py or the class is defined under a different name. The package will fail to import and break any runtime that references langflow.components.maritalk.
-from .maritalk import MariTalkModel
+# FIXME: adjust the module name to where MariTalkModel is actually defined
+# from .mari_talk_model import MariTalkModelRun the quick scan below to locate the correct definition and update the import accordingly:
🏁 Script executed:
#!/bin/bash
# Locate the real definition of MariTalkModel
rg -n --heading $'^class\s+MariTalkModel\b'Length of output: 43
🏁 Script executed:
#!/bin/bash
# Inspect the maritalk component directory for file names and class definitions
COMP_DIR="src/backend/base/langflow/components/maritalk"
echo "1) Listing all Python files in $COMP_DIR"
fd -e py . "$COMP_DIR"
echo -e "\n2) Showing all class definitions in $COMP_DIR"
rg -n "class " "$COMP_DIR"
echo -e "\n3) Searching for any 'MariTalk' references in $COMP_DIR"
rg -n "MariTalk" "$COMP_DIR"Length of output: 1196
Incorrect import in maritalk component – update to match class name
The __init__.py is importing MariTalkModel, but the class is actually defined as MaritalkModelComponent in maritalk.py. Please update the import and __all__ accordingly.
• File: src/backend/base/langflow/components/maritalk/init.py
-from .maritalk import MariTalkModel
-__all__ = ["MariTalkModel"]
+from .maritalk import MaritalkModelComponent
+__all__ = ["MaritalkModelComponent"]📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| from .maritalk import MariTalkModel | |
| __all__ = ["MariTalkModel"] | |
| from .maritalk import MaritalkModelComponent | |
| __all__ = ["MaritalkModelComponent"] |
🧰 Tools
🪛 Pylint (3.3.7)
[error] 1-1: No name 'MariTalkModel' in module 'langflow.components.maritalk.maritalk'
(E0611)
🤖 Prompt for AI Agents
In src/backend/base/langflow/components/maritalk/__init__.py at lines 1 to 3,
the import statement and __all__ list incorrectly reference MariTalkModel, but
the actual class name in maritalk.py is MaritalkModelComponent. Update the
import to import MaritalkModelComponent from .maritalk and change the __all__
list to ["MaritalkModelComponent"] to match the correct class name.
| from ..cloudflare.cloudflare import CloudflareWorkersAIEmbeddingsComponent | ||
| from ..mistral.mistral_embeddings import MistralAIEmbeddingsComponent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix relative import violations by using absolute imports.
The static analysis tools are correctly flagging TID252 violations. Relative imports from parent modules should be replaced with absolute imports for better maintainability and clarity.
Apply this diff to fix the import violations:
-from ..cloudflare.cloudflare import CloudflareWorkersAIEmbeddingsComponent
-from ..mistral.mistral_embeddings import MistralAIEmbeddingsComponent
+from langflow.components.cloudflare.cloudflare import CloudflareWorkersAIEmbeddingsComponent
+from langflow.components.mistral.mistral_embeddings import MistralAIEmbeddingsComponent📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| from ..cloudflare.cloudflare import CloudflareWorkersAIEmbeddingsComponent | |
| from ..mistral.mistral_embeddings import MistralAIEmbeddingsComponent | |
| from langflow.components.cloudflare.cloudflare import CloudflareWorkersAIEmbeddingsComponent | |
| from langflow.components.mistral.mistral_embeddings import MistralAIEmbeddingsComponent |
🧰 Tools
🪛 GitHub Check: Ruff Style Check (3.13)
[failure] 2-2: Ruff (TID252)
src/backend/base/langflow/components/embeddings/init.py:2:1: TID252 Prefer absolute imports over relative imports from parent modules
[failure] 1-1: Ruff (TID252)
src/backend/base/langflow/components/embeddings/init.py:1:1: TID252 Prefer absolute imports over relative imports from parent modules
🪛 Ruff (0.11.9)
1-1: Prefer absolute imports over relative imports from parent modules
Replace relative imports from parent modules with absolute imports
(TID252)
2-2: Prefer absolute imports over relative imports from parent modules
Replace relative imports from parent modules with absolute imports
(TID252)
🪛 GitHub Actions: Ruff Style Check
[error] 1-1: Ruff TID252: Prefer absolute imports over relative imports from parent modules.
🤖 Prompt for AI Agents
In src/backend/base/langflow/components/embeddings/__init__.py at lines 1 to 2,
replace the relative imports of CloudflareWorkersAIEmbeddingsComponent and
MistralAIEmbeddingsComponent with their absolute import paths. Change the import
statements to use the full module path from the project root instead of using
'..' to navigate up directories, ensuring compliance with import style
guidelines and improving code clarity.
|
@ogabrielluiz @mfortman11 @coderabbitai May I know however, I tr,y the agent category is missing,
|
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain@edwinjosechittilappilly Let me check the current state of the sidebar bundles and search for any agent-related categories that might be missing. 🏁 Script executed: Length of output: 9683 Let me check what's in the agents directory and compare the current sidebar bundles with what should be there: Now I can see the issue! Looking at the output:
@edwinjosechittilappilly You're absolutely right! The "Agents" category is indeed missing from the
You should add back the Agents entry to the { display_name: "Agents", name: "agents", icon: "Bot" },This entry should be added to the 🏁 Script executed: Length of output: 1267 Interesting! The grep shows there IS an "Agents" entry on line 209. Let me check the exact context to see where this appears: @edwinjosechittilappilly It looks like there might be some confusion here. According to the grep results, there IS an "Agents" entry in the file at line 209. Let me get the exact context to see where it appears and whether it's actually in the correct SIDEBAR_BUNDLES array or somewhere else in the file. 🏁 Script executed: Length of output: 2037 Now I understand the confusion! Let me get the complete SIDEBAR_BUNDLES array to confirm: @edwinjosechittilappilly Now I see what happened! There are two different arrays in the file:
The "Agents" entry you're referring to is in
If you're looking for agents in the sidebar and they're not showing up, the issue might be:
Could you clarify which sidebar section you're expecting to see agents in? Are you looking for:
This will help me better understand what exactly is missing and where it should appear. 🏁 Script executed: Length of output: 7491 Perfect! Now I can see the complete picture. You're absolutely right to be concerned, but there's good news: Summary of the situation:The "Agents" category IS present - it's in { display_name: "Agents", name: "agents", icon: "Bot" },Two different arrays serve different purposes:
The issue might be:Since the "Agents" category exists in the code but you're not seeing it in the UI, this could be:
Next steps:Could you check:
The "Agents" category definition is definitely there in the code, so if it's not showing up in the UI, there might be a frontend logic issue rather than a missing configuration. |
|
Tip For best results, initiate chat on the files or code changes. @edwinjosechittilappilly Great to hear that you've resolved the agent category issue! 🎉 Thanks for sharing the Loom video as well - that's helpful for context. It looks like you were able to identify and fix whatever was causing the agents to not appear properly in the sidebar. Since you mentioned it's solved, I assume you either:
Is there anything else you'd like me to help you with regarding this sidebar refactoring PR? If you found this review helpful, would you consider giving us a shout-out on X? Thank you for using CodeRabbit! |
…etter readability and efficiency ✨ (filterEdge-shard-1.spec.ts): Update model names for better clarity and consistency 🐛 (duckduckgo.spec.ts): Update selector for search button to match changes in the frontend 🐛 (generalBugs-shard-11.spec.ts): Update selector for search button to match changes in the frontend
Cristhianzl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
* cohere sidebar * side bar embeddings * move memories * sort style utils * [autofix.ci] apply automated fixes * serach components add * Update __init__.py * Update styleUtils.ts * [autofix.ci] apply automated fixes * Update model_input_constants.py * fix lint * update to wikipedia * ✨ (tableInputComponent.spec.ts): Refactor test to use for loops for better readability and efficiency ✨ (filterEdge-shard-1.spec.ts): Update model names for better clarity and consistency 🐛 (duckduckgo.spec.ts): Update selector for search button to match changes in the frontend 🐛 (generalBugs-shard-11.spec.ts): Update selector for search button to match changes in the frontend * [autofix.ci] apply automated fixes * update tests path * update tests * Update test_arxiv_component.py * [autofix.ci] apply automated fixes * make embeddings functions --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: cristhianzl <[email protected]>
This pull request includes updates to the
langflowcomponent structure to improve modularity and maintainability by introducing explicit imports and__all__declarations in various component__init__.pyfiles. Additionally, it includes a file renaming and a minor update to a component's metadata.Component Initialization Updates:
__all__declarations in the__init__.pyfiles for the following components:arxiv,baidu,bing,cloudflare,cohere,deepseek,duckduckgo,exa, andglean. This ensures better encapsulation and clarity for each module. [1] [2] [3] [4] [5] [6] [7] [8] [9]File Organization and Metadata Update:
src/backend/base/langflow/components/languagemodels/cohere.pytosrc/backend/base/langflow/components/cohere/cohere_models.pyto better align with the modular structure. Updated thedisplay_nameof theCohereComponentclass to "Cohere Language Models" for improved clarity.Embeddings Component Adjustments:
src/backend/base/langflow/components/embeddings/__init__.pyto reflect the new modular structure, removing unused imports forCohereEmbeddingsComponentandLMStudioEmbeddingsComponent. This simplifies the embeddings module.