Skip to content

feat: integration JigsawStack services into langflow.#8640

Closed
Khurdhula-Harshavardhan wants to merge 136 commits into
langflow-ai:mainfrom
JigsawStack:feat/jigsawstack-integration
Closed

feat: integration JigsawStack services into langflow.#8640
Khurdhula-Harshavardhan wants to merge 136 commits into
langflow-ai:mainfrom
JigsawStack:feat/jigsawstack-integration

Conversation

@Khurdhula-Harshavardhan
Copy link
Copy Markdown
Contributor

@Khurdhula-Harshavardhan Khurdhula-Harshavardhan commented Jun 20, 2025

This pull request integrates the jigsawstack library into the project and introduces several new components leveraging its capabilities.

Dependency Addition:

  • Added jigsawstack>=0.2.6 to the dev dependencies in pyproject.toml. This library enables AI-powered functionalities such as web scraping, sentiment analysis, and text translation.

New Components:

Web Scraping and Search:

  • JigsawStackAIScraperComponent: Implements AI-powered web scraping to extract structured data from websites without requiring CSS selectors.
  • JigsawStackAIWebSearchComponent: Provides AI-enhanced web search functionality, including safe search options and spell-checking.

AI Analysis:

  • JigsawStackSentimentComponent: Enables sentiment and emotion analysis of text, providing detailed sentence-by-sentence breakdowns.
  • JigsawStackNSFWComponent: Detects NSFW content in images, such as nudity and violence.

Text Processing:

  • JigsawStackTextToSQLComponent: Converts natural language prompts into SQL queries for various database types.
  • JigsawStackTextTranslateComponent: Translates text between languages, supporting multiple formats and ISO 639-1 language codes.

Component Registration:

  • Registered all new components in src/backend/base/langflow/components/jigsawstack/__init__.py for centralized access and management.

Summary by CodeRabbit

  • New Features

    • Introduced integration with JigsawStack AI, adding new components for sentiment analysis, AI web search, web scraping, NSFW image detection, text-to-SQL conversion, text translation, and vision OCR.
    • Added a new JigsawStack icon and sidebar entry in the user interface for easy access to these features.
  • Chores

    • Added JigsawStack as a development dependency.

@dosubot dosubot Bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Jun 20, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 20, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

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

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

Walkthrough

This change introduces a new integration with the JigsawStack API, adding multiple backend components for sentiment analysis, AI web search, web scraping, NSFW detection, text-to-SQL conversion, text translation, and vision OCR. It also adds corresponding frontend icon components and updates the sidebar configuration to include JigsawStack.

Changes

File(s) Change Summary
pyproject.toml Added jigsawstack>=0.2.6 as a development dependency.
src/backend/base/langflow/components/jigsawstack/init.py New module exporting six JigsawStack component classes.
src/backend/base/langflow/components/jigsawstack/ai_scrape.py Added JigsawStackAIScraperComponent for AI-powered web scraping via JigsawStack API.
src/backend/base/langflow/components/jigsawstack/ai_web_search.py Added JigsawStackAIWebSearchComponent for AI-powered web search via JigsawStack API.
src/backend/base/langflow/components/jigsawstack/nsfw.py Added JigsawStackNSFWComponent for NSFW image detection via JigsawStack API.
src/backend/base/langflow/components/jigsawstack/sentiment.py Added JigsawStackSentimentComponent for sentiment and emotion analysis via JigsawStack API.
src/backend/base/langflow/components/jigsawstack/text_to_sql.py Added JigsawStackTextToSQLComponent for text-to-SQL conversion via JigsawStack API.
src/backend/base/langflow/components/jigsawstack/text_translate.py Added JigsawStackTextTranslateComponent for text translation via JigsawStack API.
src/backend/base/langflow/components/jigsawstack/vocr.py Added JigsawStackVOCRComponent for vision OCR via JigsawStack API.
src/frontend/src/icons/JigsawStack/JigsawStackIcon.jsx Added new React SVG icon component for JigsawStack.
src/frontend/src/icons/JigsawStack/index.tsx Added forwardRef wrapper and export for JigsawStackIcon.
src/frontend/src/utils/styleUtils.ts Added "JigsawStack" entry to the SIDEBAR_BUNDLES array.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant LangflowComponent
    participant JigsawStackClient
    participant JigsawStackAPI

    User->>LangflowComponent: Provide input (e.g., API key, data)
    LangflowComponent->>JigsawStackClient: Initialize with API key
    LangflowComponent->>JigsawStackAPI: Call specific API (e.g., sentiment, search, scrape, etc.)
    JigsawStackAPI-->>JigsawStackClient: Return API response
    JigsawStackClient-->>LangflowComponent: Deliver response data
    LangflowComponent-->>User: Output structured results or error message
Loading
sequenceDiagram
    participant User
    participant Frontend
    participant Sidebar

    User->>Frontend: Open sidebar
    Frontend->>Sidebar: Render sidebar bundles
    Sidebar-->>User: Display "JigsawStack" with icon
Loading
✨ Finishing Touches
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Post Copyable Unit Tests in a Comment

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

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

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

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

Other keywords and placeholders

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

Documentation and Community

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

@dosubot dosubot Bot added the enhancement New feature or request label Jun 20, 2025
@autofix-ci
Copy link
Copy Markdown
Contributor

autofix-ci Bot commented Jun 20, 2025

Hi! I'm autofix logoautofix.ci, a bot that automatically fixes trivial issues such as code formatting in pull requests.

I would like to apply some automated changes to this pull request, but it looks like I don't have the necessary permissions to do so. To get this pull request into a mergeable state, please do one of the following two things:

  1. Allow edits by maintainers for your pull request, and then re-trigger CI (for example by pushing a new commit).
  2. Manually fix the issues identified for your pull request (see the GitHub Actions output for details on what I would like to change).

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jun 20, 2025
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 12

🧹 Nitpick comments (19)
pyproject.toml (1)

176-176: Consider adding an upper bound to the jigsawstack version.
Pinning only a minimum version (>=0.2.6) can risk unintended breaking changes if a future major release introduces incompatibilities.

src/backend/base/langflow/components/jigsawstack/__init__.py (2)

1-6: Sort imports alphabetically.
The import block is unsorted and fails the ruff style check.
Proposed diff:

-from .sentiment import JigsawStackSentimentComponent
-from .ai_web_search import JigsawStackAIWebSearchComponent
-from .ai_scrape import JigsawStackAIScraperComponent
-from .vocr import JigsawStackVOCRComponent
-from .nsfw import JigsawStackNSFWComponent
-from .text_to_sql import JigsawStackTextToSQLComponent
+from .ai_scrape import JigsawStackAIScraperComponent
+from .ai_web_search import JigsawStackAIWebSearchComponent
+from .nsfw import JigsawStackNSFWComponent
+from .sentiment import JigsawStackSentimentComponent
+from .text_to_sql import JigsawStackTextToSQLComponent
+from .vocr import JigsawStackVOCRComponent

8-15: Sort __all__ entries and add a trailing newline.
Ruff reports that __all__ is not alphabetized and the file is missing a newline at EOF.
Proposed diff:

__all__ = [
-    "JigsawStackSentimentComponent",
-    "JigsawStackAIWebSearchComponent",
-    "JigsawStackAIScraperComponent",
-    "JigsawStackVOCRComponent",
-    "JigsawStackNSFWComponent",
-    "JigsawStackTextToSQLComponent",
+    "JigsawStackAIScraperComponent",
+    "JigsawStackAIWebSearchComponent",
+    "JigsawStackNSFWComponent",
+    "JigsawStackSentimentComponent",
+    "JigsawStackTextToSQLComponent",
+    "JigsawStackVOCRComponent",
+]
+
src/backend/base/langflow/components/jigsawstack/text_translate.py (2)

61-61: Correct misleading comment.

The comment says "Call web scraping" but the code is actually calling translation API.

-            # Call web scraping
+            # Call translation API

1-114: Address code formatting and style issues.

The static analysis tools have identified several formatting issues that should be addressed for code consistency:

  • Remove unused imports and whitespace in blank lines
  • Fix line length violations
  • Use constants for exception messages
  • Add trailing newline

Apply these formatting fixes:

-from langflow.custom.custom_component.component import Component
 from langflow.io import Output, SecretStrInput, StrInput, MessageTextInput
 from langflow.schema.data import Data

+from langflow.custom.custom_component.component import Component


+# Error messages as constants
+JIGSAWSTACK_NOT_FOUND_ERROR = "JigsawStack package not found"
+API_UNSUCCESSFUL_ERROR = "JigsawStack API returned unsuccessful response"

 class JigsawStackTextTranslateComponent(Component):
     display_name = "Text Translate"
     description = "Translate text from one language to another with support for multiple text formats."
     documentation = "https://jigsawstack.com/docs/api-reference/ai/translate"
     icon = "JigsawStack"
     name = "JigsawStackTextTranslate"
-    
+
     inputs = [
         SecretStrInput(
             name="api_key",
             display_name="JigsawStack API Key",
             info="Your JigsawStack API key for authentication",
             required=True,
         ),
         StrInput(
             name="target_language",
             display_name="Target Language",
-            info="The language code of the target language to translate to. Language code is identified by a unique ISO 639-1 two-letter code",
+            info="The language code of the target language to translate to. "
+                 "Language code is identified by a unique ISO 639-1 two-letter code",
             required=True,
         ),
         MessageTextInput(
             name="text",
             display_name="Text",
-            info="The text to translate. This can be a single string or a list of strings. If a list is provided, each string will be translated separately.",
+            info="The text to translate. This can be a single string or a list of strings. "
+                 "If a list is provided, each string will be translated separately.",
             required=True,
             is_list=True
         ),
     ]
-
+
     outputs = [
         Output(display_name="Translation Results", name="translation_results", method="translation"),
     ]
-
+
     def translation(self) -> Data:
         try:
             from jigsawstack import JigsawStack
         except ImportError as e:
             raise ImportError(
-                "JigsawStack package not found"
+                JIGSAWSTACK_NOT_FOUND_ERROR
             ) from e
-
+
         try:
             client = JigsawStack(api_key=self.api_key)
-            
+
             #build request object
             params = {}
             if self.target_language:
                 params["target_language"] = self.target_language
-
+
             if self.text:
                 if isinstance(self.text, list):
                     params["text"] = self.text
                 else:
                     params["text"] = [self.text]
-        
+
             # Call translation API
             response = client.translate.text(params)
-            
+
             if not response.get("success", False):
-                raise ValueError("JigsawStack API returned unsuccessful response")
-            
+                raise ValueError(API_UNSUCCESSFUL_ERROR)
+
             return Data(data=response)
-            
+
         except Exception as e:
             error_data = {
                 "error": str(e),
                 "success": False
             }
-            self.status = f"Error: {str(e)}"
+            self.status = f"Error: {e!s}"
             return Data(data=error_data)
-
-
-   
+
src/backend/base/langflow/components/jigsawstack/nsfw.py (3)

2-2: Remove unused import.

IntInput is imported but never used in this component.

-from langflow.io import Output, SecretStrInput, StrInput, IntInput
+from langflow.io import Output, SecretStrInput, StrInput

48-48: Correct misleading comment.

The comment says "Call web scraping" but the code is actually calling NSFW validation API.

-            # Call web scraping
+            # Call NSFW validation API

1-65: Address formatting and style consistency.

Similar to the text translation component, this file has multiple formatting issues that should be addressed for consistency across the JigsawStack components.

The same formatting patterns should be applied here as suggested for the text_translate.py file - removing whitespace in blank lines, using constants for error messages, proper exception handling, and adding trailing newline.

src/backend/base/langflow/components/jigsawstack/sentiment.py (3)

1-1: Remove unused import.

typing.Any is imported but never used in this component.

-from typing import Any
-
 from langflow.custom.custom_component.component import Component

83-84: Fix unused variable and unnecessary f-string prefix.

The exception variable e is assigned but never used, and the f-string doesn't contain any placeholders.

-        except ImportError as e:
-            return Message(text=f"Error: JigsawStack package not found. Please install it with: pip install jigsawstack")
+        except ImportError:
+            return Message(text="Error: JigsawStack package not found. Please install it with: pip install jigsawstack")

67-67: Consider breaking long status line for readability.

The status line exceeds 120 characters. Consider formatting it for better readability.

-            self.status = f"Sentiment: {sentiment_data.get('sentiment', 'Unknown')} | Emotion: {sentiment_data.get('emotion', 'Unknown')} | Score: {sentiment_data.get('score', 0.0):.3f}"
+            sentiment = sentiment_data.get('sentiment', 'Unknown')
+            emotion = sentiment_data.get('emotion', 'Unknown')  
+            score = sentiment_data.get('score', 0.0)
+            self.status = f"Sentiment: {sentiment} | Emotion: {emotion} | Score: {score:.3f}"
src/backend/base/langflow/components/jigsawstack/ai_web_search.py (2)

1-1: Remove unused imports.

Several imports are not used in this component: typing.Any, MessageTextInput, and DataInput.

-from typing import Any
-
 from langflow.custom.custom_component.component import Component
-from langflow.io import MessageTextInput, Output, SecretStrInput, BoolInput, DropdownInput, QueryInput, DataInput
+from langflow.io import Output, SecretStrInput, BoolInput, DropdownInput, QueryInput

Also applies to: 4-4


70-79: Consider extracting duplicate search parameter logic.

The search parameter building logic is duplicated between search() and get_content_text() methods. Consider extracting this into a private method.

+    def _build_search_params(self) -> dict:
+        """Build search parameters dictionary from component inputs."""
+        search_params = {}
+        if self.query:
+            search_params["query"] = self.query
+        if self.ai_overview is not None:
+            search_params["ai_overview"] = self.ai_overview
+        if self.safe_search:
+            search_params["safe_search"] = self.safe_search
+        if self.spell_check is not None:
+            search_params["spell_check"] = self.spell_check
+        return search_params
+
     def search(self) -> Data:
         try:
             from jigsawstack import JigsawStack
         except ImportError as e:
             raise ImportError(
                 "JigsawStack package not found"
             ) from e

         try:
             client = JigsawStack(api_key=self.api_key)
             
-            #build request object
-            search_params = {}
-            if self.query:
-                search_params["query"] = self.query
-            if self.ai_overview is not None:
-                search_params["ai_overview"] = self.ai_overview
-            if self.safe_search:
-                search_params["safe_search"] = self.safe_search
-            if self.spell_check is not None:
-                search_params["spell_check"] = self.spell_check
+            search_params = self._build_search_params()

Apply similar changes to the get_content_text() method.

Also applies to: 119-128

src/backend/base/langflow/components/jigsawstack/ai_scrape.py (3)

1-6: Remove unused imports.

Multiple imports are not used: typing.Any, DataInput, CodeInput, and Message.

-from typing import Any
-
 from langflow.custom.custom_component.component import Component
-from langflow.io import MessageTextInput, Output, SecretStrInput, DataInput, StrInput, CodeInput
+from langflow.io import MessageTextInput, Output, SecretStrInput, StrInput
 from langflow.schema.data import Data
-from langflow.schema.message import Message

87-87: Replace magic number with named constant.

The maximum number of element prompts (5) should be defined as a named constant for better maintainability.

+    MAX_ELEMENT_PROMPTS = 5
+
     def scrape(self) -> Data:
         # ... existing code ...
         
-                if len(self.element_prompts) > 5:
+                if len(self.element_prompts) > self.MAX_ELEMENT_PROMPTS:
-                    raise ValueError("Maximum of 5 element prompts allowed")
+                    raise ValueError(f"Maximum of {self.MAX_ELEMENT_PROMPTS} element prompts allowed")

11-11: Break long description line.

The description line exceeds 120 characters and should be broken for better readability.

-    description = "Scrape any website instantly and get consistent structured data in seconds without writing any css selector code"
+    description = ("Scrape any website instantly and get consistent structured data "
+                   "in seconds without writing any css selector code")
src/backend/base/langflow/components/jigsawstack/vocr.py (1)

11-107: Fix formatting issues to comply with code style guidelines.

Multiple formatting issues need to be addressed for consistency with the codebase.

Apply these formatting fixes:

-    description = "Extract data from any document type in a consistent structure with fine-tuned vLLMs for the highest accuracy"
+    description = (
+        "Extract data from any document type in a consistent structure with "
+        "fine-tuned vLLMs for the highest accuracy"
+    )
     documentation = "https://jigsawstack.com/docs/api-reference/ai/vocr"
     icon = "JigsawStack"
     name = "JigsawStackVOCR"
-    
+
     inputs = [

Also remove trailing whitespace from blank lines throughout the file and add a trailing newline at the end.

src/backend/base/langflow/components/jigsawstack/text_to_sql.py (2)

35-41: Fix line length violations for better readability.

The info strings exceed the 120-character limit and should be wrapped.

-            info="The database type to generate SQL for. Supported values are postgresql, mysql, or sqlite. Specifying this parameter improves SQL generation accuracy by applying database-specific syntax and optimizations.",
+            info=(
+                "The database type to generate SQL for. Supported values are postgresql, mysql, or sqlite. "
+                "Specifying this parameter improves SQL generation accuracy by applying database-specific "
+                "syntax and optimizations."
+            ),
             required=False,
         ),
         StrInput(
             name="file_store_key",
             display_name="File Store Key",
-            info="The key used to store the database schema on Jigsawstack file Storage. Not required if sql_schema is specified.",
+            info=(
+                "The key used to store the database schema on Jigsawstack file Storage. "
+                "Not required if sql_schema is specified."
+            ),
             required=False,
         )

12-88: Fix formatting issues to comply with code style guidelines.

Multiple formatting issues need to be addressed throughout the file, similar to the VOCR component.

Remove trailing whitespace from blank lines (lines 12, 60, 71, 73, 76, 78, 88) and add a trailing newline at the end of the file.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cf985bd and 01a3646.

⛔ Files ignored due to path filters (1)
  • src/frontend/src/icons/JigsawStack/jigsawstack-icon.svg is excluded by !**/*.svg
📒 Files selected for processing (12)
  • pyproject.toml (1 hunks)
  • src/backend/base/langflow/components/jigsawstack/__init__.py (1 hunks)
  • src/backend/base/langflow/components/jigsawstack/ai_scrape.py (1 hunks)
  • src/backend/base/langflow/components/jigsawstack/ai_web_search.py (1 hunks)
  • src/backend/base/langflow/components/jigsawstack/nsfw.py (1 hunks)
  • src/backend/base/langflow/components/jigsawstack/sentiment.py (1 hunks)
  • src/backend/base/langflow/components/jigsawstack/text_to_sql.py (1 hunks)
  • src/backend/base/langflow/components/jigsawstack/text_translate.py (1 hunks)
  • src/backend/base/langflow/components/jigsawstack/vocr.py (1 hunks)
  • src/frontend/src/icons/JigsawStack/JigsawStackIcon.jsx (1 hunks)
  • src/frontend/src/icons/JigsawStack/index.tsx (1 hunks)
  • src/frontend/src/utils/styleUtils.ts (1 hunks)
🧰 Additional context used
🪛 Ruff (0.11.9)
src/backend/base/langflow/components/jigsawstack/__init__.py

8-15: __all__ is not sorted

Apply an isort-style sorting to __all__

(RUF022)


15-15: No newline at end of file

Add trailing newline

(W292)

src/backend/base/langflow/components/jigsawstack/ai_scrape.py

1-1: typing.Any imported but unused

Remove unused import: typing.Any

(F401)


4-4: langflow.io.DataInput imported but unused

Remove unused import

(F401)


4-4: langflow.io.CodeInput imported but unused

Remove unused import

(F401)


6-6: langflow.schema.message.Message imported but unused

Remove unused import: langflow.schema.message.Message

(F401)


11-11: Line too long (132 > 120)

(E501)


15-15: Blank line contains whitespace

Remove whitespace from blank line

(W293)


61-63: Avoid specifying long messages outside the exception class

(TRY003)


62-62: Exception must not use a string literal, assign to variable first

Assign to variable; remove string literal

(EM101)


67-67: Blank line contains whitespace

Remove whitespace from blank line

(W293)


76-76: Avoid specifying long messages outside the exception class

(TRY003)


76-76: Exception must not use a string literal, assign to variable first

Assign to variable; remove string literal

(EM101)


77-77: Blank line contains whitespace

Remove whitespace from blank line

(W293)


86-86: Blank line contains whitespace

Remove whitespace from blank line

(W293)


87-87: Magic value used in comparison, consider replacing 5 with a constant variable

(PLR2004)


88-88: Avoid specifying long messages outside the exception class

(TRY003)


88-88: Exception must not use a string literal, assign to variable first

Assign to variable; remove string literal

(EM101)


89-89: Unnecessary elif after raise statement

Remove unnecessary elif

(RET506)


90-90: Avoid specifying long messages outside the exception class

(TRY003)


90-90: Exception must not use a string literal, assign to variable first

Assign to variable; remove string literal

(EM101)


91-91: Blank line contains whitespace

Remove whitespace from blank line

(W293)


95-95: Blank line contains whitespace

Remove whitespace from blank line

(W293)


98-98: Blank line contains whitespace

Remove whitespace from blank line

(W293)


100-100: Avoid specifying long messages outside the exception class

(TRY003)


100-100: Exception must not use a string literal, assign to variable first

Assign to variable; remove string literal

(EM101)


102-102: Trailing whitespace

Remove trailing whitespace

(W291)


103-103: Blank line contains whitespace

Remove whitespace from blank line

(W293)


104-104: f-string without any placeholders

Remove extraneous f prefix

(F541)


105-105: Blank line contains whitespace

Remove whitespace from blank line

(W293)


107-107: Blank line contains whitespace

Remove whitespace from blank line

(W293)


108-108: Do not catch blind exception: Exception

(BLE001)


113-113: Use explicit conversion flag

Replace with conversion flag

(RUF010)


114-114: No newline at end of file

Add trailing newline

(W292)

src/backend/base/langflow/components/jigsawstack/text_translate.py

12-12: Blank line contains whitespace

Remove whitespace from blank line

(W293)


23-23: Line too long (143 > 120)

(E501)


29-29: Line too long (158 > 120)

(E501)


43-45: Avoid specifying long messages outside the exception class

(TRY003)


44-44: Exception must not use a string literal, assign to variable first

Assign to variable; remove string literal

(EM101)


49-49: Blank line contains whitespace

Remove whitespace from blank line

(W293)


60-60: Blank line contains whitespace

Remove whitespace from blank line

(W293)


63-63: Blank line contains whitespace

Remove whitespace from blank line

(W293)


65-65: Avoid specifying long messages outside the exception class

(TRY003)


65-65: Exception must not use a string literal, assign to variable first

Assign to variable; remove string literal

(EM101)


66-66: Blank line contains whitespace

Remove whitespace from blank line

(W293)


68-68: Blank line contains whitespace

Remove whitespace from blank line

(W293)


69-69: Do not catch blind exception: Exception

(BLE001)


74-74: Use explicit conversion flag

Replace with conversion flag

(RUF010)


78-78: Blank line contains whitespace

Remove whitespace from blank line

(W293)


78-78: No newline at end of file

Add trailing newline

(W292)

src/backend/base/langflow/components/jigsawstack/ai_web_search.py

1-1: typing.Any imported but unused

Remove unused import: typing.Any

(F401)


4-4: langflow.io.MessageTextInput imported but unused

Remove unused import

(F401)


4-4: langflow.io.DataInput imported but unused

Remove unused import

(F401)


15-15: Blank line contains whitespace

Remove whitespace from blank line

(W293)


63-65: Avoid specifying long messages outside the exception class

(TRY003)


64-64: Exception must not use a string literal, assign to variable first

Assign to variable; remove string literal

(EM101)


69-69: Blank line contains whitespace

Remove whitespace from blank line

(W293)


80-80: Blank line contains whitespace

Remove whitespace from blank line

(W293)


83-83: Blank line contains whitespace

Remove whitespace from blank line

(W293)


85-85: Avoid specifying long messages outside the exception class

(TRY003)


85-85: Exception must not use a string literal, assign to variable first

Assign to variable; remove string literal

(EM101)


86-86: Blank line contains whitespace

Remove whitespace from blank line

(W293)


96-96: Blank line contains whitespace

Remove whitespace from blank line

(W293)


98-98: Blank line contains whitespace

Remove whitespace from blank line

(W293)


100-100: Blank line contains whitespace

Remove whitespace from blank line

(W293)


101-101: Do not catch blind exception: Exception

(BLE001)


106-106: Use explicit conversion flag

Replace with conversion flag

(RUF010)


112-112: Local variable e is assigned to but never used

Remove assignment to unused variable e

(F841)


113-113: f-string without any placeholders

Remove extraneous f prefix

(F541)


118-118: Blank line contains whitespace

Remove whitespace from blank line

(W293)


128-128: Blank line contains whitespace

Remove whitespace from blank line

(W293)


131-131: Blank line contains whitespace

Remove whitespace from blank line

(W293)


133-133: Avoid specifying long messages outside the exception class

(TRY003)


133-133: Exception must not use a string literal, assign to variable first

Assign to variable; remove string literal

(EM101)


134-134: Blank line contains whitespace

Remove whitespace from blank line

(W293)


138-138: Blank line contains whitespace

Remove whitespace from blank line

(W293)


139-139: Do not catch blind exception: Exception

(BLE001)


140-140: Use explicit conversion flag

Replace with conversion flag

(RUF010)


140-140: No newline at end of file

Add trailing newline

(W292)

src/backend/base/langflow/components/jigsawstack/nsfw.py

2-2: langflow.io.IntInput imported but unused

Remove unused import: langflow.io.IntInput

(F401)


12-12: Blank line contains whitespace

Remove whitespace from blank line

(W293)


36-38: Avoid specifying long messages outside the exception class

(TRY003)


37-37: Exception must not use a string literal, assign to variable first

Assign to variable; remove string literal

(EM101)


42-42: Blank line contains whitespace

Remove whitespace from blank line

(W293)


47-47: Blank line contains whitespace

Remove whitespace from blank line

(W293)


50-50: Blank line contains whitespace

Remove whitespace from blank line

(W293)


52-52: Avoid specifying long messages outside the exception class

(TRY003)


52-52: Exception must not use a string literal, assign to variable first

Assign to variable; remove string literal

(EM101)


53-53: Blank line contains whitespace

Remove whitespace from blank line

(W293)


55-55: Blank line contains whitespace

Remove whitespace from blank line

(W293)


56-56: Do not catch blind exception: Exception

(BLE001)


61-61: Use explicit conversion flag

Replace with conversion flag

(RUF010)


65-65: Blank line contains whitespace

Remove whitespace from blank line

(W293)


65-65: No newline at end of file

Add trailing newline

(W292)

src/backend/base/langflow/components/jigsawstack/sentiment.py

1-1: typing.Any imported but unused

Remove unused import: typing.Any

(F401)


15-15: Blank line contains whitespace

Remove whitespace from blank line

(W293)


41-43: Avoid specifying long messages outside the exception class

(TRY003)


42-42: Exception must not use a string literal, assign to variable first

Assign to variable; remove string literal

(EM101)


48-48: Blank line contains whitespace

Remove whitespace from blank line

(W293)


51-51: Blank line contains whitespace

Remove whitespace from blank line

(W293)


53-53: Avoid specifying long messages outside the exception class

(TRY003)


53-53: Exception must not use a string literal, assign to variable first

Assign to variable; remove string literal

(EM101)


54-54: Blank line contains whitespace

Remove whitespace from blank line

(W293)


56-56: Blank line contains whitespace

Remove whitespace from blank line

(W293)


66-66: Blank line contains whitespace

Remove whitespace from blank line

(W293)


67-67: Line too long (186 > 120)

(E501)


68-68: Blank line contains whitespace

Remove whitespace from blank line

(W293)


70-70: Blank line contains whitespace

Remove whitespace from blank line

(W293)


71-71: Do not catch blind exception: Exception

(BLE001)


77-77: Use explicit conversion flag

Replace with conversion flag

(RUF010)


83-83: Local variable e is assigned to but never used

Remove assignment to unused variable e

(F841)


84-84: f-string without any placeholders

Remove extraneous f prefix

(F541)


84-84: Line too long (121 > 120)

(E501)


89-89: Blank line contains whitespace

Remove whitespace from blank line

(W293)


92-92: Blank line contains whitespace

Remove whitespace from blank line

(W293)


95-95: Blank line contains whitespace

Remove whitespace from blank line

(W293)


97-97: Blank line contains whitespace

Remove whitespace from blank line

(W293)


116-116: Line too long (147 > 120)

(E501)


119-119: Blank line contains whitespace

Remove whitespace from blank line

(W293)


120-120: Do not catch blind exception: Exception

(BLE001)


121-121: Use explicit conversion flag

Replace with conversion flag

(RUF010)


121-121: No newline at end of file

Add trailing newline

(W292)

src/backend/base/langflow/components/jigsawstack/vocr.py

1-1: typing.Any imported but unused

Remove unused import: typing.Any

(F401)


4-4: langflow.io.PromptInput imported but unused

Remove unused import: langflow.io.PromptInput

(F401)


6-6: langflow.schema.message.Message imported but unused

Remove unused import: langflow.schema.message.Message

(F401)


11-11: Line too long (128 > 120)

(E501)


15-15: Blank line contains whitespace

Remove whitespace from blank line

(W293)


65-67: Avoid specifying long messages outside the exception class

(TRY003)


66-66: Exception must not use a string literal, assign to variable first

Assign to variable; remove string literal

(EM101)


71-71: Blank line contains whitespace

Remove whitespace from blank line

(W293)


80-80: Avoid specifying long messages outside the exception class

(TRY003)


80-80: Exception must not use a string literal, assign to variable first

Assign to variable; remove string literal

(EM101)


87-87: Blank line contains whitespace

Remove whitespace from blank line

(W293)


89-89: Blank line contains whitespace

Remove whitespace from blank line

(W293)


92-92: Blank line contains whitespace

Remove whitespace from blank line

(W293)


94-94: Avoid specifying long messages outside the exception class

(TRY003)


94-94: Exception must not use a string literal, assign to variable first

Assign to variable; remove string literal

(EM101)


95-95: Blank line contains whitespace

Remove whitespace from blank line

(W293)


97-97: Blank line contains whitespace

Remove whitespace from blank line

(W293)


98-98: Do not catch blind exception: Exception

(BLE001)


103-103: Use explicit conversion flag

Replace with conversion flag

(RUF010)


107-107: Blank line contains whitespace

Remove whitespace from blank line

(W293)


107-107: No newline at end of file

Add trailing newline

(W292)

src/backend/base/langflow/components/jigsawstack/text_to_sql.py

12-12: Blank line contains whitespace

Remove whitespace from blank line

(W293)


35-35: Line too long (224 > 120)

(E501)


41-41: Line too long (131 > 120)

(E501)


54-56: Avoid specifying long messages outside the exception class

(TRY003)


55-55: Exception must not use a string literal, assign to variable first

Assign to variable; remove string literal

(EM101)


60-60: Blank line contains whitespace

Remove whitespace from blank line

(W293)


71-71: Blank line contains whitespace

Remove whitespace from blank line

(W293)


73-73: Blank line contains whitespace

Remove whitespace from blank line

(W293)


75-75: Avoid specifying long messages outside the exception class

(TRY003)


75-75: Exception must not use a string literal, assign to variable first

Assign to variable; remove string literal

(EM101)


76-76: Blank line contains whitespace

Remove whitespace from blank line

(W293)


78-78: Blank line contains whitespace

Remove whitespace from blank line

(W293)


79-79: Do not catch blind exception: Exception

(BLE001)


84-84: Use explicit conversion flag

Replace with conversion flag

(RUF010)


88-88: Blank line contains whitespace

Remove whitespace from blank line

(W293)


88-88: No newline at end of file

Add trailing newline

(W292)

🪛 GitHub Check: Ruff Style Check (3.13)
src/backend/base/langflow/components/jigsawstack/__init__.py

[failure] 15-15: Ruff (W292)
src/backend/base/langflow/components/jigsawstack/init.py:15:2: W292 No newline at end of file


[failure] 8-15: Ruff (RUF022)
src/backend/base/langflow/components/jigsawstack/init.py:8:11: RUF022 __all__ is not sorted


[failure] 1-6: Ruff (I001)
src/backend/base/langflow/components/jigsawstack/init.py:1:1: I001 Import block is un-sorted or un-formatted

src/backend/base/langflow/components/jigsawstack/ai_scrape.py

[failure] 15-15: Ruff (W293)
src/backend/base/langflow/components/jigsawstack/ai_scrape.py:15:1: W293 Blank line contains whitespace


[failure] 11-11: Ruff (E501)
src/backend/base/langflow/components/jigsawstack/ai_scrape.py:11:121: E501 Line too long (132 > 120)


[failure] 6-6: Ruff (F401)
src/backend/base/langflow/components/jigsawstack/ai_scrape.py:6:37: F401 langflow.schema.message.Message imported but unused


[failure] 4-4: Ruff (F401)
src/backend/base/langflow/components/jigsawstack/ai_scrape.py:4:88: F401 langflow.io.CodeInput imported but unused


[failure] 4-4: Ruff (F401)
src/backend/base/langflow/components/jigsawstack/ai_scrape.py:4:67: F401 langflow.io.DataInput imported but unused


[failure] 1-1: Ruff (F401)
src/backend/base/langflow/components/jigsawstack/ai_scrape.py:1:20: F401 typing.Any imported but unused


[failure] 1-6: Ruff (I001)
src/backend/base/langflow/components/jigsawstack/ai_scrape.py:1:1: I001 Import block is un-sorted or un-formatted

🪛 GitHub Actions: Ruff Style Check
src/backend/base/langflow/components/jigsawstack/__init__.py

[error] 1-1: Ruff: Import block is un-sorted or un-formatted.

🪛 Pylint (3.3.7)
src/backend/base/langflow/components/jigsawstack/ai_scrape.py

[refactor] 87-90: Unnecessary "elif" after "raise", remove the leading "el" from "elif"

(R1720)


[refactor] 57-57: Too many branches (14/12)

(R0912)


[error] 78-78: Access to member 'element_prompts' before its definition line 81

(E0203)


[error] 79-79: Access to member 'element_prompts' before its definition line 81

(E0203)


[error] 80-80: Access to member 'element_prompts' before its definition line 81

(E0203)

🔇 Additional comments (2)
src/frontend/src/utils/styleUtils.ts (1)

287-287: Verify lazy import mapping for JigsawStack.
You’ve added { display_name: "JigsawStack", name: "jigsawstack", icon: "JigsawStack" } to SIDEBAR_BUNDLES. Ensure that lazyIconImports (and any eager mappings) include a JigsawStack entry so the icon resolves correctly at runtime.

src/frontend/src/icons/JigsawStack/index.tsx (1)

1-13: Component structure looks good.
Uses forwardRef, forwards props and ref correctly, and sets displayName. No issues found.

Comment thread src/frontend/src/icons/JigsawStack/JigsawStackIcon.jsx Outdated
Comment thread src/backend/base/langflow/components/jigsawstack/text_translate.py
Comment thread src/backend/base/langflow/components/jigsawstack/ai_scrape.py Outdated
Comment thread src/backend/base/langflow/components/jigsawstack/ai_scrape.py Outdated
Comment thread src/backend/base/langflow/components/jigsawstack/vocr.py Outdated
Comment thread src/backend/base/langflow/components/jigsawstack/vocr.py
Comment thread src/backend/base/langflow/components/jigsawstack/vocr.py Outdated
Comment thread src/backend/base/langflow/components/jigsawstack/text_to_sql.py Outdated
Comment thread src/backend/base/langflow/components/jigsawstack/text_to_sql.py Outdated
Comment thread src/backend/base/langflow/components/jigsawstack/text_to_sql.py Outdated
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jun 20, 2025
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jun 20, 2025
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jun 20, 2025
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jun 20, 2025
@edwinjosechittilappilly
Copy link
Copy Markdown
Collaborator

@Khurdhula-Harshavardhan can you resolve the conflicts?

Cristhianzl and others added 5 commits July 1, 2025 16:10
…d/react/shallow to optimize re-renders

📝 (handleRenderComponent/index.tsx): Introduce isLocked state to handle locked flow functionality
📝 (handleRenderComponent/index.tsx): Update tooltip visibility based on isLocked state
📝 (handleRenderComponent/index.tsx): Update handle style based on isLocked state
📝 (PageComponent/index.tsx): Add useShallow import for zustand/react/shallow to optimize re-renders
📝 (PageComponent/index.tsx): Introduce isLocked state to handle locked flow functionality
📝 (PageComponent/index.tsx): Prevent edge click actions when flow is locked
📝 (PageComponent/index.tsx): Disable edge actions when flow is locked
📝 (PageComponent/index.tsx): Update edge actions based on isLocked state
📝 (lock-flow.spec.ts): Add test to simulate deleting edges when flow is locked
…r zustand/react/shallow to optimize re-renders"

This reverts commit 9898d1c.
Cristhianzl and others added 23 commits July 1, 2025 16:55
…gflow-ai#8767)

* 🐛 (chat-view.tsx): fix parameter name from stream_url to _stream_url to improve clarity
✨ (chat-view.tsx): add logic to handle scrolling behavior based on chat history updates and message content changes

* ♻️ (chat-view.tsx): refactor updateChat function parameters to remove unused _stream_url parameter and improve code readability
* update templates api keys

* Update src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json

Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>

* Update src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json

Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>

* Update Text Sentiment Analysis.json

* cust comp test fix

---------

Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
* update llm component

* template updates

* Update SEO Keyword Generator.json
add-note

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
* replace-aria-label-with-aria-hidden

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update docs/docs/Concepts/concepts-components.md

---------

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* initial-content

* add-faster-instructions-to-readme

* link-anchor-and-clone

* additional-make-commands

* copy-content-to-contributing-repo-file

* remove-readme-content

* remove extra file

* tests-location

* makefile-update

* cleanup-extra-make-commands

* contributing-update

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* move-run-cli

* docs-review

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
…angflow-ai#8743)

* feat(tests): add Jest configuration and setup for testing environment

- Introduced Jest configuration file to set up testing environment with TypeScript support and JSDOM.
- Added setupTests.ts for global test configurations, including mocks for ResizeObserver and IntersectionObserver.
- Updated package.json and package-lock.json to include Jest and related dependencies.
- Implemented utility functions for processing markdown content, including handling tables and <think> tags.
- Added comprehensive tests for markdown utility functions to ensure proper functionality.

* refactor(makefile): separate frontend commands into a dedicated Makefile

- Removed frontend-related targets from the main Makefile and created a new Makefile.frontend to manage frontend-specific commands.
- Updated the main Makefile to include a reference to the new frontend Makefile and added a help message for frontend commands.
- This restructuring improves organization and clarity for managing backend and frontend build processes.
* revise component overview page

* comment out 1.5 piece

* reorg

* coderabbit

---------

Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
* feat: flow_runner cleanup messages table

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* fix lint

* lint

* fix lint

* [autofix.ci] apply automated fixes

---------

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

* test: add pyleak for task and event loop block detections

* test: add pyleak for task and event loop block detections

* ci: add env variables for verbose logging

* chore: dummy sleep to shwocase error

* chore: dummy sleep to showcase error

* chore: remove dummy sleep
…meter render logic (langflow-ai#8493)

* fix: enhance dropdown component with refresh button and clean up parameter render logic

- Added a refresh button to the dropdown component, improving user interaction.
- Refactored parameter render component to remove unnecessary wrapping around the render function.
- Updated package-lock.json to remove extraneous dependencies.

* [autofix.ci] apply automated fixes

* refactor(OutputComponent): replace DropdownMenu with Popover and Command components

- Updated OutputComponent to use Popover and Command components for improved UI interaction.
- Refactored dropdown logic to enhance accessibility and user experience.
- Added a reference for the button to manage focus visibility.

* refactor: update Memory Chatbot configuration and remove unused RefreshParameterComponent

- Changed display names and output methods in Memory Chatbot JSON configuration for clarity and consistency.
- Introduced a new output method for retrieving messages as text.
- Removed the RefreshParameterComponent and its references from the parameter render component to streamline the codebase.

* refactor: update dropdown component layout for improved styling

- Changed the layout classes in the dropdown component to enhance responsiveness and visual consistency.
- Adjusted flex properties to ensure proper alignment and spacing based on the presence of filtered metadata.

* refactor: streamline dropdown component structure and enhance button functionality

- Removed redundant rendering functions for refresh and custom option dialogs, integrating them directly into the dropdown's main structure.
- Improved layout and styling for better responsiveness and visual consistency.
- Adjusted class names for better alignment and spacing, particularly in relation to filtered metadata.
- Ensured the refresh button is consistently displayed based on dialog input conditions.

* refactor: enhance dropdown component styling for better readability

- Updated text size in dropdown options for improved visibility.
- Increased padding in command items for better touch targets and visual consistency.

* refactor: adjust dropdown component styling for improved usability

- Reduced padding in the search input for a more compact design.
- Updated text size in the search input for better readability.
- Enhanced layout of filtered metadata display for clearer visibility.

* refactor: enhance dropdown component rendering and styling

- Added console log for filtered metadata to assist in debugging.
- Adjusted class names in dropdown options for better responsiveness based on filtered metadata length.

* feat: add data-testid attributes for refresh buttons and simplify memoization in ParameterRenderComponent

- Added data-testid attributes to refresh buttons in Dropdown component for improved testability.
- Removed unnecessary useMemo in ParameterRenderComponent to streamline rendering logic.
- Introduced a new test for the refresh dropdown list functionality to ensure proper behavior.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
✨ (frontend): add CustomTermsLinks component to GeneralPage to display custom terms links in the settings page.
@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Jul 1, 2025
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 1, 2025
@Khurdhula-Harshavardhan
Copy link
Copy Markdown
Contributor Author

@edwinjosechittilappilly These conflicts are getting complicated. May I please create a new PR and close this for simplicity? Please let me know. Thanks.

@Khurdhula-Harshavardhan
Copy link
Copy Markdown
Contributor Author

Hi @edwinjosechittilappilly,
Closing this PR as it's outdated. We've opened a new one without any conflicts. Could you please help review it? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.