-
Notifications
You must be signed in to change notification settings - Fork 7k
feat: jigsawstack bundle integration #8832
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
base: main
Are you sure you want to change the base?
feat: jigsawstack bundle integration #8832
Conversation
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThis change introduces JigsawStack integration throughout both backend and frontend. On the backend, new components are added for various JigsawStack AI services (web scraping, search, file storage, image generation, NSFW detection, object detection, sentiment analysis, text-to-SQL, translation, and VOCR). On the frontend, a new JigsawStack icon is implemented and integrated into icon mappings and sidebar bundles. The JigsawStack Python package is added as a dependency. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Frontend
participant Backend
participant JigsawStackAPI
User->>Frontend: Initiate JigsawStack feature (e.g., AI web search)
Frontend->>Backend: Send request with user input and API key
Backend->>JigsawStackAPI: Call corresponding JigsawStack API endpoint
JigsawStackAPI-->>Backend: Return API response (success or error)
Backend-->>Frontend: Respond with processed data or error message
Frontend-->>User: Display results or error
Possibly related PRs
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
|
Hi! I'm 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:
|
e3f2057
to
433df04
Compare
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: 13
🔭 Outside diff range comments (1)
src/frontend/src/icons/JigsawStack/JigsawStackIcon.jsx (1)
1-31
: Missingisdark
prop support for theme compatibilityThe icon component doesn't implement the required
isdark
prop for supporting both light and dark modes. According to the coding guidelines, all custom icons must adapt to the theme.Apply this diff to implement theme support:
-const JigsawStackIconSVG = (props) => ( +const JigsawStackIconSVG = ({ isdark, ...props }) => ( <svg xmlns="http://www.w3.org/2000/svg" width="278" height="278" fill="none" viewBox="0 0 278 278" {...props} > <path - fill="url(#paint0_linear_102_21)" + fill={isdark ? "url(#paint0_linear_102_21_dark)" : "url(#paint0_linear_102_21)"} d="M137.362 262.02c-7.072-4.084-14.015-8.403-21.241-12.189-9.857-5.162-10.456-18.679-.674-23.989 5.93-3.217 10.307-7.977 12.023-14.746 2.414-9.503.058-17.739-7.334-24.089-7.243-6.213-15.746-7.815-24.674-4.145-9.01 3.697-13.87 10.731-14.673 20.486-.086.992-.035 1.993-.062 2.985-.28 10.578-10.759 16.642-19.988 11.398-14.83-8.429-29.553-17.029-44.314-25.577a17 17 0 0 1-2.237-1.535c-8.53-7.04-10.771-18.266-5.282-27.934a3227 3227 0 0 1 25.18-43.611c5.674-9.654 17.976-9.411 23.608.306 8.99 15.517 29.838 16.883 40.16 2.508 5.436-7.567 6.094-15.876 2.007-24.197S88.796 85.04 79.503 84.426c-2.508-.163-5.18-.16-7.455-1.063-7.475-2.947-10.588-11.369-6.572-18.529 8.512-15.193 17.135-30.348 26.172-45.23 5.842-9.623 17.467-12.541 27.69-7.78a48 48 0 0 1 3.609 1.906c13.592 7.84 27.271 15.543 40.725 23.622 4.269 2.566 8.677.123 8.526-4.968-.407-13.953 8.484-26.283 21.361-30.628 13.382-4.523 27.891-.117 36.253 11.007 8.417 11.19 8.922 26.459.582 37.806-2.763 3.753-6.601 7.086-10.641 9.43-4.087 2.367-4.235 7.378.112 9.795 14.03 7.807 27.873 15.951 41.755 24.016 9.273 5.388 13.664 14.085 11.698 23.596-.558 2.7-1.621 5.411-2.983 7.815-7.967 14.047-16.252 27.919-24.125 42.02-5.866 10.508-19.253 10.034-24.462.066-4.683-8.975-14.458-13.377-24.273-11.865-9.472 1.458-17.344 8.81-19.485 18.203-2.157 9.467 1.726 19.333 9.945 24.977 3.992 2.74 8.508 4.357 13.321 3.989 11.701-.896 18.42 11.212 12.146 21.51-8.257 13.561-15.939 27.463-23.897 41.203-7.022 12.134-19.534 15.497-31.651 8.535-6.839-3.931-13.67-7.892-20.502-11.837z" ></path> <defs> <linearGradient id="paint0_linear_102_21" x1="-2.153" x2="368.564" y1="42.449" y2="304.786" gradientUnits="userSpaceOnUse" > <stop offset="0.184" stopColor="#FA242D"></stop> <stop offset="0.958" stopColor="#EF5B3C"></stop> </linearGradient> + <linearGradient + id="paint0_linear_102_21_dark" + x1="-2.153" + x2="368.564" + y1="42.449" + y2="304.786" + gradientUnits="userSpaceOnUse" + > + <stop offset="0.184" stopColor="#FA242D"></stop> + <stop offset="0.958" stopColor="#EF5B3C"></stop> + </linearGradient> </defs> </svg> );Additionally, ensure the parent
index.tsx
file passes theisdark
prop correctly.
🧹 Nitpick comments (7)
src/backend/base/langflow/components/jigsawstack/text_translate.py (1)
65-66
: Fix incorrect commentThe comment references web scraping but this is a translation component.
- # Call web scraping + # Call text translation response = client.translate.text(params)src/backend/base/langflow/components/jigsawstack/file_read.py (1)
97-98
: Consider differentiating between ZIP and Office files.The comment mentions that ZIP magic bytes also apply to DOCX/XLSX files, but the method returns
.zip
for all. Consider checking for Office-specific patterns within ZIP files if differentiation is needed.Would you like me to implement logic to differentiate between generic ZIP files and Office documents?
src/backend/base/langflow/components/jigsawstack/ai_web_search.py (1)
127-129
: Remove unnecessary exception instantiation.Creating a new
JigsawStackError
from a string message is unnecessary since you can directly raise aValueError
or return an error message.- request_failed_msg = "Request Failed" if not response.get("success", False): - raise JigsawStackError(request_failed_msg) + return Message(text="Error: Request Failed")src/backend/base/langflow/components/jigsawstack/vocr.py (1)
92-93
: Consider supporting partial page range specification.Currently, page range is only added if both start and end are specified. Consider allowing users to specify only start (process from start to end) or only end (process from beginning to end).
- if self.page_range_start and self.page_range_end: - params["page_range"] = [self.page_range_start, self.page_range_end] + if self.page_range_start is not None or self.page_range_end is not None: + params["page_range"] = [ + self.page_range_start if self.page_range_start is not None else 1, + self.page_range_end if self.page_range_end is not None else -1 # -1 could indicate "to end" + ]src/backend/base/langflow/components/jigsawstack/file_upload.py (2)
84-86
: Complete the truncated comment.The comment on line 86 is incomplete and ends abruptly.
- # if temp_public_url is provided, use it to determine if a temporary public URL should + # if temp_public_url is provided, use it to determine if a temporary public URL should be returned
61-94
: Consider implementing async methods for better scalability.The coding guidelines recommend using async methods for components. Since this involves network I/O operations, an async implementation would improve scalability.
Would you like me to help refactor this to use async/await patterns for the file upload operation?
src/backend/base/langflow/components/jigsawstack/object_detection.py (1)
112-113
: Fix incorrect comment.The comment refers to "web scraping" but this is actually calling the object detection API.
- # Call web scraping + # Call object detection
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
src/frontend/src/icons/JigsawStack/jigsawstack-icon.svg
is excluded by!**/*.svg
📒 Files selected for processing (18)
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/file_read.py
(1 hunks)src/backend/base/langflow/components/jigsawstack/file_upload.py
(1 hunks)src/backend/base/langflow/components/jigsawstack/image_generation.py
(1 hunks)src/backend/base/langflow/components/jigsawstack/nsfw.py
(1 hunks)src/backend/base/langflow/components/jigsawstack/object_detection.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/icons/eagerIconImports.ts
(2 hunks)src/frontend/src/icons/lazyIconImports.ts
(1 hunks)src/frontend/src/utils/styleUtils.ts
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (12)
`{uv.lock,pyproject.toml}`: Use uv (>=0.4) as the Python package manager for dependency management
{uv.lock,pyproject.toml}
: Use uv (>=0.4) as the Python package manager for dependency management
📄 Source: CodeRabbit Inference Engine (.cursor/rules/backend_development.mdc)
List of files the instruction was applied to:
pyproject.toml
`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/src/icons/JigsawStack/index.tsx
src/frontend/src/icons/eagerIconImports.ts
src/frontend/src/icons/lazyIconImports.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
src/frontend/src/icons/JigsawStack/index.tsx
src/frontend/src/icons/eagerIconImports.ts
src/frontend/src/icons/lazyIconImports.ts
src/frontend/src/icons/JigsawStack/JigsawStackIcon.jsx
`src/frontend/src/icons/**/*.{ts,tsx,js,jsx}`: Use Lucide React for icons in frontend components.
src/frontend/src/icons/**/*.{ts,tsx,js,jsx}
: Use Lucide React for icons in frontend components.
📄 Source: CodeRabbit Inference Engine (.cursor/rules/frontend_development.mdc)
List of files the instruction was applied to:
src/frontend/src/icons/JigsawStack/index.tsx
src/frontend/src/icons/eagerIconImports.ts
src/frontend/src/icons/lazyIconImports.ts
src/frontend/src/icons/JigsawStack/JigsawStackIcon.jsx
`src/frontend/src/icons/*/*`: Create a new directory for your icon in `src/front...
src/frontend/src/icons/*/*
: Create a new directory for your icon insrc/frontend/src/icons/YourIconName/
and add your SVG as a React component (e.g.,YourIconName.jsx
) that uses theisdark
prop to support both light and dark mode.
📄 Source: CodeRabbit Inference Engine (.cursor/rules/icons.mdc)
List of files the instruction was applied to:
src/frontend/src/icons/JigsawStack/index.tsx
src/frontend/src/icons/JigsawStack/JigsawStackIcon.jsx
`src/frontend/src/icons/*/index.tsx`: Create an `index.tsx` in your icon directory that exports your icon using `forwardRef` and passes the `isdark` prop.
src/frontend/src/icons/*/index.tsx
: Create anindex.tsx
in your icon directory that exports your icon usingforwardRef
and passes theisdark
prop.
📄 Source: CodeRabbit Inference Engine (.cursor/rules/icons.mdc)
List of files the instruction was applied to:
src/frontend/src/icons/JigsawStack/index.tsx
`src/frontend/src/icons/lazyIconImports.ts`: Add your icon to the `lazyIconsMapp...
src/frontend/src/icons/lazyIconImports.ts
: Add your icon to thelazyIconsMapping
object insrc/frontend/src/icons/lazyIconImports.ts
with a key that matches the backend icon string exactly.
📄 Source: CodeRabbit Inference Engine (.cursor/rules/icons.mdc)
List of files the instruction was applied to:
src/frontend/src/icons/lazyIconImports.ts
`src/frontend/src/icons/*/*.jsx`: Always support both light and dark mode for custom icons by using the `isdark` prop in your SVG component.
src/frontend/src/icons/*/*.jsx
: Always support both light and dark mode for custom icons by using theisdark
prop in your SVG component.
📄 Source: CodeRabbit Inference Engine (.cursor/rules/icons.mdc)
List of files the instruction was applied to:
src/frontend/src/icons/JigsawStack/JigsawStackIcon.jsx
`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/jigsawstack/nsfw.py
src/backend/base/langflow/components/jigsawstack/image_generation.py
src/backend/base/langflow/components/jigsawstack/text_translate.py
src/backend/base/langflow/components/jigsawstack/__init__.py
src/backend/base/langflow/components/jigsawstack/file_read.py
src/backend/base/langflow/components/jigsawstack/sentiment.py
src/backend/base/langflow/components/jigsawstack/text_to_sql.py
src/backend/base/langflow/components/jigsawstack/ai_web_search.py
src/backend/base/langflow/components/jigsawstack/ai_scrape.py
src/backend/base/langflow/components/jigsawstack/file_upload.py
src/backend/base/langflow/components/jigsawstack/object_detection.py
src/backend/base/langflow/components/jigsawstack/vocr.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/jigsawstack/nsfw.py
src/backend/base/langflow/components/jigsawstack/image_generation.py
src/backend/base/langflow/components/jigsawstack/text_translate.py
src/backend/base/langflow/components/jigsawstack/__init__.py
src/backend/base/langflow/components/jigsawstack/file_read.py
src/backend/base/langflow/components/jigsawstack/sentiment.py
src/backend/base/langflow/components/jigsawstack/text_to_sql.py
src/backend/base/langflow/components/jigsawstack/ai_web_search.py
src/backend/base/langflow/components/jigsawstack/ai_scrape.py
src/backend/base/langflow/components/jigsawstack/file_upload.py
src/backend/base/langflow/components/jigsawstack/object_detection.py
src/backend/base/langflow/components/jigsawstack/vocr.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 theicon
attribute 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/jigsawstack/nsfw.py
src/backend/base/langflow/components/jigsawstack/image_generation.py
src/backend/base/langflow/components/jigsawstack/text_translate.py
src/backend/base/langflow/components/jigsawstack/__init__.py
src/backend/base/langflow/components/jigsawstack/file_read.py
src/backend/base/langflow/components/jigsawstack/sentiment.py
src/backend/base/langflow/components/jigsawstack/text_to_sql.py
src/backend/base/langflow/components/jigsawstack/ai_web_search.py
src/backend/base/langflow/components/jigsawstack/ai_scrape.py
src/backend/base/langflow/components/jigsawstack/file_upload.py
src/backend/base/langflow/components/jigsawstack/object_detection.py
src/backend/base/langflow/components/jigsawstack/vocr.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/jigsawstack/__init__.py
🧠 Learnings (18)
📓 Common learnings
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: When implementing a new component icon in Langflow, ensure the icon name is clear, recognizable, and used consistently across both backend (Python 'icon' attribute) and frontend (React/TypeScript mapping).
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.836Z
Learning: Use clear, recognizable, and consistent icon names for both backend and frontend (e.g., 'AstraDB', 'Postgres', 'OpenAI').
src/frontend/src/utils/styleUtils.ts (5)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/docs_development.mdc:0-0
Timestamp: 2025-06-30T14:40:02.667Z
Learning: Applies to docs/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/frontend_development.mdc:0-0
Timestamp: 2025-06-30T14:40:29.494Z
Learning: Applies to src/frontend/**/*.{ts,tsx,js,jsx,css,scss} : Use Tailwind CSS for styling all frontend components.
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).
src/frontend/src/icons/JigsawStack/index.tsx (13)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: Export custom icon components in React using React.forwardRef to ensure proper ref forwarding and compatibility with parent components.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.836Z
Learning: Applies to src/frontend/src/icons/*/index.tsx : Create an `index.tsx` in your icon directory that exports your icon using `forwardRef` and passes the `isdark` prop.
Learnt from: dolfim-ibm
PR: langflow-ai/langflow#8394
File: src/frontend/src/icons/Docling/index.tsx:4-6
Timestamp: 2025-06-16T11:14:04.200Z
Learning: The Langflow codebase consistently uses `React.PropsWithChildren<{}>` as the prop type for all icon components using forwardRef, rather than `React.SVGProps<SVGSVGElement>`. This is an established pattern across hundreds of icon files in src/frontend/src/icons/.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-30T14:40:29.494Z
Learning: Applies to src/frontend/src/icons/**/*.{ts,tsx,js,jsx} : Use Lucide React for icons in frontend components.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.836Z
Learning: Applies to src/frontend/src/icons/*/* : Create a new directory for your icon in `src/frontend/src/icons/YourIconName/` and add your SVG as a React component (e.g., `YourIconName.jsx`) that uses the `isdark` prop to support both light and dark mode.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-30T14:40:29.494Z
Learning: Applies to src/frontend/src/components/**/*FlowGraph.tsx : Use React Flow for flow graph visualization components.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: When implementing a new component icon in Langflow, ensure the icon name is clear, recognizable, and used consistently across both backend (Python 'icon' attribute) and frontend (React/TypeScript mapping).
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.836Z
Learning: Applies to src/frontend/src/icons/*/*.jsx : Always support both light and dark mode for custom icons by using the `isdark` prop in your SVG component.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-30T14:40:29.494Z
Learning: Applies to src/frontend/**/*.{ts,tsx} : Use React 18 with TypeScript for all UI components and frontend logic.
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: Custom SVG icon components in React should always support both light and dark mode by accepting an 'isdark' prop and adjusting colors accordingly.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-23T12:46:42.048Z
Learning: Custom React Flow node types should be implemented as memoized components, using Handle components for connection points and supporting optional icons and labels.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-23T12:46:42.048Z
Learning: React Flow should be used for flow graph visualization, with nodes and edges passed as props, and changes handled via onNodesChange and onEdgesChange callbacks.
src/frontend/src/icons/eagerIconImports.ts (11)
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-30T14:40:50.836Z
Learning: Applies to src/frontend/src/icons/*/index.tsx : Create an `index.tsx` in your icon directory that exports your icon using `forwardRef` and passes the `isdark` prop.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-30T14:40:29.494Z
Learning: Applies to src/frontend/src/icons/**/*.{ts,tsx,js,jsx} : Use Lucide React for icons in frontend components.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.836Z
Learning: Applies to src/frontend/src/icons/*/* : Create a new directory for your icon in `src/frontend/src/icons/YourIconName/` and add your SVG as a React component (e.g., `YourIconName.jsx`) that uses the `isdark` prop to support both light and dark mode.
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/*/*.jsx : Always support both light and dark mode for custom icons by using the `isdark` prop in your SVG component.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: Export custom icon components in React using React.forwardRef to ensure proper ref forwarding and compatibility with parent components.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: When implementing a new component icon in Langflow, ensure the icon name is clear, recognizable, and used consistently across both backend (Python 'icon' attribute) and frontend (React/TypeScript mapping).
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: Custom SVG icon components in React should always support both light and dark mode by accepting an 'isdark' prop and adjusting colors accordingly.
Learnt from: dolfim-ibm
PR: langflow-ai/langflow#8394
File: src/frontend/src/icons/Docling/index.tsx:4-6
Timestamp: 2025-06-16T11:14:04.200Z
Learning: The Langflow codebase consistently uses `React.PropsWithChildren<{}>` as the prop type for all icon components using forwardRef, rather than `React.SVGProps<SVGSVGElement>`. This is an established pattern across hundreds of icon files in src/frontend/src/icons/.
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: If no suitable custom icon exists, use a lucide icon from https://lucide.dev/icons.
src/frontend/src/icons/lazyIconImports.ts (10)
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-30T14:40:50.836Z
Learning: Applies to src/frontend/src/icons/*/index.tsx : Create an `index.tsx` in your icon directory that exports your icon using `forwardRef` and passes the `isdark` prop.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-30T14:40:29.494Z
Learning: Applies to src/frontend/src/icons/**/*.{ts,tsx,js,jsx} : Use Lucide React for icons in frontend components.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: The frontend icon mapping key (in 'lazyIconsMapping') must match the backend 'icon' attribute string exactly, including case sensitivity, to ensure correct icon rendering.
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/*/* : Create a new directory for your icon in `src/frontend/src/icons/YourIconName/` and add your SVG as a React component (e.g., `YourIconName.jsx`) that uses the `isdark` prop to support both light and dark mode.
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/*/*.jsx : Always support both light and dark mode for custom icons by using the `isdark` prop in your SVG component.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: When implementing a new component icon in Langflow, ensure the icon name is clear, recognizable, and used consistently across both backend (Python 'icon' attribute) and frontend (React/TypeScript mapping).
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: If a custom icon does not exist for a component, use a generic lucide icon as a fallback and request a new custom icon if needed.
Learnt from: dolfim-ibm
PR: langflow-ai/langflow#8394
File: src/frontend/src/icons/Docling/index.tsx:4-6
Timestamp: 2025-06-16T11:14:04.200Z
Learning: The Langflow codebase consistently uses `React.PropsWithChildren<{}>` as the prop type for all icon components using forwardRef, rather than `React.SVGProps<SVGSVGElement>`. This is an established pattern across hundreds of icon files in src/frontend/src/icons/.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.836Z
Learning: If no suitable custom icon exists, use a lucide icon from https://lucide.dev/icons.
src/frontend/src/icons/JigsawStack/JigsawStackIcon.jsx (9)
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/*/* : Create a new directory for your icon in `src/frontend/src/icons/YourIconName/` and add your SVG as a React component (e.g., `YourIconName.jsx`) that uses the `isdark` prop to support both light and dark mode.
Learnt from: dolfim-ibm
PR: langflow-ai/langflow#8394
File: src/frontend/src/icons/Docling/index.tsx:4-6
Timestamp: 2025-06-16T11:14:04.200Z
Learning: The Langflow codebase consistently uses `React.PropsWithChildren<{}>` as the prop type for all icon components using forwardRef, rather than `React.SVGProps<SVGSVGElement>`. This is an established pattern across hundreds of icon files in src/frontend/src/icons/.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: Custom SVG icon components in React should always support both light and dark mode by accepting an 'isdark' prop and adjusting colors accordingly.
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/*/*.jsx : Always support both light and dark mode for custom icons by using the `isdark` prop in your SVG component.
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/*/index.tsx : Create an `index.tsx` in your icon directory that exports your icon using `forwardRef` and passes the `isdark` prop.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: Export custom icon components in React using React.forwardRef to ensure proper ref forwarding and compatibility with parent components.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-30T14:40:29.494Z
Learning: Applies to src/frontend/src/icons/**/*.{ts,tsx,js,jsx} : Use Lucide React for icons in frontend 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/frontend_development.mdc:0-0
Timestamp: 2025-06-30T14:40:29.494Z
Learning: Applies to src/frontend/src/components/**/*FlowGraph.tsx : Use React Flow for flow graph visualization components.
src/backend/base/langflow/components/jigsawstack/nsfw.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/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: When implementing a new component icon in Langflow, ensure the icon name is clear, recognizable, and used consistently across both backend (Python 'icon' attribute) and frontend (React/TypeScript mapping).
src/backend/base/langflow/components/jigsawstack/image_generation.py (7)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Applies to src/backend/base/langflow/components/**/*.py : Add new backend components to the appropriate subdirectory under src/backend/base/langflow/components/
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Applies to src/backend/base/langflow/components/**/__init__.py : Update __init__.py with alphabetical imports when adding new components
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: When implementing a new component icon in Langflow, ensure the icon name is clear, recognizable, and used consistently across both backend (Python 'icon' attribute) and frontend (React/TypeScript mapping).
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Applies to src/backend/tests/unit/components/**/*.py : Create comprehensive unit tests for all new components
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.836Z
Learning: Applies to src/backend/**/*component*.py : In your Python component class, set the `icon` attribute to a string matching the frontend icon mapping exactly (case-sensitive).
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.836Z
Learning: Applies to src/backend/**/components/**/*.py : In your Python component class, set the `icon` attribute to a string matching the frontend icon mapping exactly (case-sensitive).
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/jigsawstack/text_translate.py (2)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Applies to src/backend/base/langflow/components/**/*.py : Add new backend components to the appropriate subdirectory under src/backend/base/langflow/components/
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Applies to src/backend/base/langflow/components/**/__init__.py : Update __init__.py with alphabetical imports when adding new components
src/backend/base/langflow/components/jigsawstack/__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: 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/tests/unit/components/**/*.py : Mirror the component directory structure in unit tests under src/backend/tests/unit/components/
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Applies to src/backend/tests/unit/components/**/*.py : Create comprehensive unit tests for all new components
src/backend/base/langflow/components/jigsawstack/file_read.py (2)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Applies to src/backend/base/langflow/components/**/*.py : Add new backend components to the appropriate subdirectory under src/backend/base/langflow/components/
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Applies to src/backend/base/langflow/components/**/__init__.py : Update __init__.py with alphabetical imports when adding new components
src/backend/base/langflow/components/jigsawstack/sentiment.py (2)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Applies to src/backend/base/langflow/components/**/*.py : Add new backend components to the appropriate subdirectory under src/backend/base/langflow/components/
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Applies to src/backend/base/langflow/components/**/__init__.py : Update __init__.py with alphabetical imports when adding new components
src/backend/base/langflow/components/jigsawstack/text_to_sql.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/**/*.py : Add new backend components to the appropriate subdirectory under src/backend/base/langflow/components/
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Applies to src/backend/base/langflow/components/**/__init__.py : Update __init__.py with alphabetical imports when adding new components
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/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: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Applies to src/backend/tests/unit/components/**/*.py : Create comprehensive unit tests for all new components
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 : Inherit from the appropriate ComponentTestBase class ('ComponentTestBase', 'ComponentTestBaseWithClient', or 'ComponentTestBaseWithoutClient') and provide the required fixtures: 'component_class', 'default_kwargs', and 'file_names_mapping' when adding a new component test.
src/backend/base/langflow/components/jigsawstack/ai_web_search.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/jigsawstack/ai_scrape.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/jigsawstack/file_upload.py (2)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Applies to src/backend/base/langflow/components/**/*.py : Add new backend components to the appropriate subdirectory under src/backend/base/langflow/components/
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Applies to src/backend/base/langflow/components/**/__init__.py : Update __init__.py with alphabetical imports when adding new components
src/backend/base/langflow/components/jigsawstack/object_detection.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/**/*.py : Add new backend components to the appropriate subdirectory under src/backend/base/langflow/components/
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.836Z
Learning: Applies to src/backend/**/*component*.py : In your Python component class, set the `icon` attribute to a string matching the frontend icon mapping exactly (case-sensitive).
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Applies to src/backend/base/langflow/components/**/__init__.py : Update __init__.py with alphabetical imports when adding new components
src/backend/base/langflow/components/jigsawstack/vocr.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/
🧬 Code Graph Analysis (3)
src/frontend/src/icons/JigsawStack/index.tsx (1)
src/frontend/src/icons/JigsawStack/JigsawStackIcon.jsx (1)
JigsawStackIconSVG
(1-28)
src/frontend/src/icons/eagerIconImports.ts (1)
src/frontend/src/icons/JigsawStack/index.tsx (1)
JigsawStackIcon
(4-9)
src/backend/base/langflow/components/jigsawstack/object_detection.py (2)
src/backend/base/langflow/inputs/inputs.py (4)
BoolInput
(413-425)DropdownInput
(467-491)MessageTextInput
(205-256)SecretStrInput
(285-340)src/backend/base/langflow/schema/data.py (1)
Data
(23-275)
🪛 Biome (1.9.4)
src/frontend/src/icons/JigsawStack/index.tsx
[error] 6-6: Don't use '{}' as a type.
Prefer explicitly define the object shape. '{}' means "any non-nullable value".
(lint/complexity/noBannedTypes)
🔇 Additional comments (14)
pyproject.toml (1)
129-129
: LGTM! Dependency addition follows established patterns.The jigsawstack==0.2.7 dependency is properly added to support the new JigsawStack components integration.
src/frontend/src/utils/styleUtils.ts (1)
294-294
: LGTM! Sidebar bundle integration follows established patterns.The JigsawStack entry is properly formatted and consistent with other sidebar bundle entries. The icon name matches the frontend icon mapping keys.
src/frontend/src/icons/eagerIconImports.ts (2)
115-115
: LGTM! Import follows established pattern.The JigsawStackIcon import is properly added and follows the existing import structure.
176-176
: LGTM! Icon mapping is properly integrated.The JigsawStack mapping entry follows the established pattern and maintains alphabetical ordering in the eagerIconsMapping object.
src/frontend/src/icons/lazyIconImports.ts (1)
158-161
: LGTM! Lazy icon mapping follows established patterns.The JigsawStack lazy import properly follows the established pattern for dynamic icon loading and maintains consistency with other icon mappings.
src/backend/base/langflow/components/jigsawstack/__init__.py (1)
1-23
: LGTM!The imports are properly organized in alphabetical order and the
__all__
list correctly exports all components.src/backend/base/langflow/components/jigsawstack/text_to_sql.py (1)
10-10
: JigsawStack icon registration confirmed
- Frontend icon component exists at
src/frontend/src/icons/JigsawStack/JigsawStackIcon.jsx
with correspondingindex.tsx
export.- Eager mapping in
src/frontend/src/icons/eagerIconImports.ts
includesimport { JigsawStackIcon } from "./JigsawStack"; … JigsawStack: JigsawStackIcon,- Lazy mapping in
src/frontend/src/icons/lazyIconImports.ts
includesJigsawStack: () => import("@/icons/JigsawStack").then(mod => ({ default: mod.JigsawStackIcon })),No further action required.
src/backend/base/langflow/components/jigsawstack/file_read.py (1)
36-84
: Well-structured file handling implementation.The method properly handles both binary and text content, creates temporary files with appropriate naming, and includes comprehensive error handling.
src/backend/base/langflow/components/jigsawstack/ai_scrape.py (1)
80-104
: Robust element prompts processing.The implementation handles multiple input types (string, list) and includes proper validation for the maximum number of prompts and empty values.
src/backend/base/langflow/components/jigsawstack/file_upload.py (2)
8-14
: LGTM! Component metadata is well-defined.The icon name "JigsawStack" is consistent with the frontend icon mapping requirements, and the component metadata is clear and complete.
70-94
: Excellent error handling implementation.The error handling is comprehensive with proper status updates and structured error responses. The use of context manager for file reading is also correct.
src/backend/base/langflow/components/jigsawstack/sentiment.py (1)
35-77
: Well-structured sentiment analysis implementation.The dual output approach with structured data and formatted text provides flexibility for different use cases. Error handling and response formatting are implemented correctly.
Also applies to: 78-114
src/backend/base/langflow/components/jigsawstack/object_detection.py (2)
86-97
: Excellent prompt parsing implementation.The logic correctly handles both string and list inputs, with proper comma-separated string parsing and clear error messages.
103-106
: Good input validation logic.The validation ensures that at least one of URL or file_store_key is provided, with a clear error message.
src/backend/base/langflow/components/jigsawstack/text_translate.py
Outdated
Show resolved
Hide resolved
src/backend/base/langflow/components/jigsawstack/text_translate.py
Outdated
Show resolved
Hide resolved
src/backend/base/langflow/components/jigsawstack/object_detection.py
Outdated
Show resolved
Hide resolved
53ff56c
to
ad8011e
Compare
9a6bbbc
to
dcb4649
Compare
02b2f82
to
f16f0d0
Compare
f16f0d0
to
0e225cf
Compare
0e225cf
to
4ae2819
Compare
This pull request integrates the
jigsawstack
library into the project, introducing several new components to enhance functionality for web scraping, web search, file storage operations, and more. The changes include updating dependencies, adding new component files, and implementing methods for interacting with thejigsawstack
API.Dependency Update:
jigsawstack==0.2.7
to the dependencies inpyproject.toml
. This library is now required for the new components.New Components for AI and File Operations:
AI Web Scraping and Search:
src/backend/base/langflow/components/jigsawstack/ai_scrape.py
: Added theJigsawStackAIScraperComponent
for AI-powered web scraping with structured data extraction. Includes input validation for parameters likeurl
,html
, andelement_prompts
.src/backend/base/langflow/components/jigsawstack/ai_web_search.py
: Added theJigsawStackAIWebSearchComponent
for AI-enhanced web search, supporting features like safe search, spell check, and AI-generated overviews.File Storage Operations:
src/backend/base/langflow/components/jigsawstack/file_read.py
: Added theJigsawStackFileReadComponent
for retrieving files from JigsawStack File Storage. Includes functionality to save files locally with appropriate extensions based on content.src/backend/base/langflow/components/jigsawstack/file_upload.py
: Added theJigsawStackFileUploadComponent
for uploading files to JigsawStack File Storage, with options for overwriting existing files and generating temporary public URLs.Component Initialization:
src/backend/base/langflow/components/jigsawstack/__init__.py
: Registered all new JigsawStack components for use in the application.Summary by CodeRabbit
New Features
Chores