Commit graph

14,764 commits

Author SHA1 Message Date
Cristhian Zanforlin Lousa
201d6c7639
fix: Fix tool mode switch state persistence in NodeToolbarComponent (#5316)
 (toggleShadComponent/index.tsx): Refactor ToggleShadComponent to wrap Switch component in a div to prevent event propagation
📝 (nodeToolbarComponent/index.tsx): Add ShortcutDisplay component to display keyboard shortcuts for tool mode button
📝 (nodeToolbarComponent/index.tsx): Remove unused imports (CodeAreaModal, ConfirmationModal, EditNodeModal, ShareModal) from NodeToolbarComponent
📝 (nodeToolbarComponent/index.tsx): Remove duplicated declaration of updateNodeInternals function in NodeToolbarComponent
📝 (nodeToolbarComponent/index.tsx): Refactor handleActivateToolMode function to update tool mode value and node data more efficiently
📝 (nodeToolbarComponent/index.tsx): Refactor handleNodeClass function to handle node class changes more efficiently
📝 (nodeToolbarComponent/index.tsx): Refactor postToolModeValue function to post tool mode value to API more efficiently
📝 (nodeToolbarComponent/index.tsx): Refactor renderToolbarButtons to include ShortcutDisplay component for tool mode button and improve button functionality

 (tool-mode.spec.ts): Add test for user interaction with components as tools in the application to ensure proper functionality and user experience.
2024-12-17 22:00:37 +00:00
Cristhian Zanforlin Lousa
b3b5290598
feat: introduce BundleItem component and memoize sidebar groups for performance (#5312)
 (index.tsx): introduce MemoizedSidebarGroup component to improve performance by memoizing sorted bundles calculation and rendering
📝 (bundleItems/index.tsx): add BundleItem component to render individual bundle items in the sidebar with collapsible functionality
2024-12-17 21:43:03 +00:00
Cristhian Zanforlin Lousa
5aa87ee41e
feat: improve chat scroll behavior during tab switches (#5308)
* 📝 (newChatMessage.tsx): add event listener to handle tab visibility change and update state accordingly
📝 (newChatMessage.tsx): remove event listener when component unmounts to prevent memory leaks

*  (use-tab-visibility.tsx): introduce custom hook useTabVisibility to track tab visibility changes in the browser
📝 (newChatMessage.tsx, newChatView.tsx): import and use useTabVisibility hook to handle tab visibility changes and update chat behavior accordingly

* 📝 (newChatMessage.tsx): remove duplicate import of useTabVisibility and update import path
📝 (newChatView.tsx): remove duplicate import of useTabVisibility and update import path
 (use-tab-visibility.tsx): create a new custom hook to track tab visibility changes in the browser

* refactor: Update logic to clear chat value when tab is hidden

The code changes in newChatView.tsx refactor the logic for clearing the chat value when the tab is hidden. Previously, the chat value was only cleared when there were no messages and the chat was not locked. Now, the chat value will also be cleared if the tab is hidden. This ensures that the chat input is empty when the user switches tabs.

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2024-12-17 21:20:38 +00:00
anovazzi1
02fbb450db
feature: Add message feedback and update frontend interface (#5022)
* add style for message feedback

* add backend suprot to new feature

* update frontend interface and add handle function

* [autofix.ci] apply automated fixes

* Update tooltip content for bot messages

* Update evaluation icons styling

* Add custom thumb icons for thumbs up and thumbs down

* Add custom thumb icons for thumbs up and thumbs down

* Update thumb icons based on evaluation value

* [autofix.ci] apply automated fixes

* Update property name for positive feedback

* Update property name for positive feedback

* feat: Add data-testid attributes to helpful and not helpful buttons and update test of playground to include new functionality

* update test to include new message features
2024-12-17 19:09:06 +00:00
Ítalo Johnny
4be6b04d8c
fix: validate and test database connection URLs (#5178)
* test: add unit test for database url validation

* feat: add function to validate database urls

* refactor: use new database url validation function

* fix: ruff errors

* refactor: validate database urls using sqlalchemy

* test: add more cases for database url validation
2024-12-17 17:29:53 +00:00
Lucas Oliveira
e15730173f
fix: update font size of prompt when validated (#5214)
Fixed prompt after validation not showing up correctly

Co-authored-by: Eric Hare <ericrhare@gmail.com>
2024-12-17 09:10:42 -08:00
Feng
3755e642b9
fix: Properly handle invalid endpoint parameters in Baidu Qianfan component (#5272)
* fix baidu qianfan model calling error

* update tests

* remove invalid tests

* [autofix.ci] apply automated fixes

* fix test issue

* ak sk secret string fix

* fix format

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
2024-12-17 08:36:24 -08:00
Cristhian Zanforlin Lousa
2a95b52e06
perf: Optimize component with memoization and selective store subscriptions (#5296)
*  (NodeOutputfield/index.tsx): Introduce memoization for IconComponent, Button components, and OutputComponent for performance optimization
🔧 (NodeOutputfield/index.tsx): Change the import of 'useEffect' to 'useCallback' for better performance and to prevent unnecessary re-renders
🔧 (NodeOutputfield/index.tsx): Refactor the 'NodeOutputField' component to use useMemo for selective store subscriptions and computed values to improve performance and avoid unnecessary recalculations
🔧 (NodeOutputfield/index.tsx): Refactor the 'handleUpdateOutputHide' function to use useCallback for better performance and to prevent unnecessary re-renders
🔧 (NodeOutputfield/index.tsx): Refactor the 'useEffect' hook to include dependencies and prevent unnecessary re-renders
🔧 (NodeOutputfield/index.tsx): Refactor the 'Handle' component to use useMemo for memoization and performance optimization

 (NodeOutputfield/index.tsx): Refactor NodeOutputField component to improve readability and maintainability by extracting button and tooltip components into separate reusable components, and optimizing the structure of the output field rendering.

📝 (RenderInputParameters/index.tsx): Move sortToolModeFields import to the top of the file for better organization and readability.

 (GenericNode/index.tsx): Introduce memoization to optimize rendering performance by memoizing components and values
🔧 (GenericNode/index.tsx): Add useCallback to handleUpdateCode and handleUpdateCodeWShortcut functions for better performance and prevent unnecessary re-renders

📝 (GenericNode/index.tsx): Refactor code to use useEffect and useCallback hooks for better performance and readability
📝 (GenericNode/index.tsx): Refactor code to improve component structure and readability by extracting repeated logic into separate functions using useCallback
📝 (GenericNode/index.tsx): Refactor code to optimize rendering logic and improve maintainability by using memoization with React.memo

 (sort-tool-mode-field.ts): introduce a new helper function sortToolModeFields to sort fields based on tool mode status and field order array

* 📝 (NodeOutputfield/index.tsx): add missing newline before ShadTooltip component for better code readability

 (handleRenderComponent/index.tsx): Add memoization to HandleContent component for performance optimization
♻️ (handleRenderComponent/index.tsx): Refactor HandleContent component to use useCallback and useMemo hooks for better code readability and maintainability

🔧 (handleRenderComponent/index.tsx): Refactor code to improve readability and maintainability by updating function signatures, using hooks more efficiently, and organizing code structure.

 (file.ts): refactor handleMouseDown function to use useCallback hook for better performance and memoization
♻️ (file.ts): refactor handleClick function to use useCallback hook for better performance and memoization

♻️ (handleRenderComponent/index.tsx): Refactor handleRenderComponent to improve code readability and maintainability by extracting callback functions into separate useCallback hooks and using memoization for validation function.

* improve memo in several components

*  (handleRenderComponent/index.tsx): add data-testid attribute to handle element for improved testing and accessibility

*  (toolbar-button.tsx): add data-testid prop to ToolbarButton component for better testing capabilities
📝 (index.tsx): add data-testid attribute to various ToolbarButton components for better testability

*  (NodeOutputfield/index.tsx): Add onClick event handler to the InspectButton component to trigger a function when the button is clicked.

*  (freeze.spec.ts): add test case for clicking on "Close" button in the modal to ensure proper functionality

* 📝 (nodeToolbarComponent/index.tsx): remove unnecessary dataTestId attribute from freeze-path-button to clean up code and improve readability

* 🐛 (GenericNode/index.tsx): Fix potential error when outputs is null or undefined by adding optional chaining
🐛 (auto-save-off.spec.ts): Update selector for "Saved" text to target the last occurrence
🐛 (auto-save-off.spec.ts): Update selector for "Unsaved changes will be permanently lost." text to handle dynamic rendering
🐛 (auto-save-off.spec.ts): Update selector for "NVIDIA" text to ensure it is not visible
🐛 (auto-save-off.spec.ts): Update drag and drop logic for NVIDIA model to ensure correct behavior
🐛 (auto-save-off.spec.ts): Update hover logic and add component button handling for NVIDIA model to ensure correct behavior

*  (parameterRenderComponent/index.tsx): Refactor ParameterRenderComponent to improve performance by memoizing components and props, and using useCallback and useMemo for better optimization.

📝 (ui/disclosure.tsx): Update imports and add new React hooks for better code organization and performance
📝 (ui/disclosure.tsx): Refactor DisclosureProvider component to use useCallback and useMemo for better performance
📝 (ui/disclosure.tsx): Refactor DisclosureTrigger component to use useCallback and useMemo for better performance
📝 (ui/disclosure.tsx): Refactor DisclosureContent component to use useCallback and useMemo for better performance
📝 (ui/disclosure.tsx): Refactor Disclosure component to use memo for better performance
📝 (ui/disclosure.tsx): Refactor DisclosureTrigger component to use memo for better performance
📝 (ui/disclosure.tsx): Refactor DisclosureContent component to use memo for better performance
📝 (ui/disclosure.tsx): Refactor DisclosureProvider component to use memo for better performance
📝 (nodeToolbarComponent/index.tsx): Refactor NodeToolbarComponent to use useCallback and useMemo for better performance

*  (use-handle-new-value.tsx): Memoize postTemplateValue and updateNodeState functions to prevent unnecessary re-renders and improve performance
📝 (use-handle-new-value.tsx): Memoize handleOnNewValue function to optimize performance by preventing unnecessary re-renders and improve code readability

---------

Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
2024-12-17 14:05:13 +00:00
Cristhian Zanforlin Lousa
3fdb4e87ba
chore: remove console logs and unused imports (#5299) 2024-12-17 13:52:12 +00:00
Gabriel Luiz Freitas Almeida
c97450dcf2
feat: add pydantic-ai and update dependencies to support it (#5297)
* chore: update weaviate-client version and add pydantic-ai dependency in pyproject.toml

- Updated weaviate-client from version 4.9.6 to 4.10.2.
- Added pydantic-ai dependency with a minimum version of 0.0.12.

* chore: update pydantic version in pyproject.toml from 2.7.0 to 2.10.0

* chore: update package versions and add new dependencies

- Added eval-type-backport version 0.2.0.
- Added griffe version 1.5.1 with colorama as a dependency.
- Updated grpcio-health-checking and grpcio-tools from version 1.62.3 to 1.68.1.
- Updated pydantic_core from version 2.18.4 to 2.27.1.
- Updated weaviate-client from version 4.9.6 to 4.10.2.

* chore: update pydantic version in dependency files

- Updated pydantic version from 2.10.0 to 2.10.1 in both uv.lock and pyproject.toml to ensure compatibility with the latest features and fixes.
2024-12-17 05:41:06 -08:00
Gabriel Luiz Freitas Almeida
89febb2da8
chore: update changes filter to include new lock files and project structure (#5304)
chore: Update changes-filter.yaml to include new lock files and project structure

- Added 'uv.lock' and 'src/backend/base/uv.lock' to the changes filter.
- Included 'src/backend/base/pyproject.toml' for tracking changes in the base directory.
- Adjusted paths to ensure proper monitoring of relevant files in the backend.
2024-12-17 13:23:55 +00:00
Jordan Frazier
39b0d6dd1e
fix: move blocking io ops to async method on dbservice init (#5291)
* move blocking io ops to async method on init

* [autofix.ci] apply automated fixes

* use correct lib

* imports

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Christophe Bornet <cbornet@hotmail.com>
2024-12-17 13:21:33 +00:00
Gabriel Luiz Freitas Almeida
03d64d21b4
ci: Update Python version matrix in CI workflows to exclude 3.13 (#5305)
ci: Update Python versions in GitHub Actions workflows to remove 3.13

- Modified the Python version matrix in both `nightly_build.yml` and `python_test.yml` to exclude Python 3.13, ensuring compatibility and streamlining the testing process.
- This change enhances the clarity of the supported Python versions in the CI configuration.
2024-12-17 04:07:31 -08:00
Saurabh Misra
a97c29fb39
refactor: ️ Speed up function find_cycle_vertices by 324% (#5262) 2024-12-16 23:33:37 -03:00
Eric Hare
a3d238c280
FIX: Clean up the advanced parameters in Astra DB Vector Store Component (#5298)
* fix: Clean up the list of params in AstraDB

* Clean up some more parameters

* Update Vector Store RAG.json

* [autofix.ci] apply automated fixes

* Update Vector Store RAG.json

* [autofix.ci] apply automated fixes

* Update Vector Store RAG.json

* Update astradb.py

* [autofix.ci] apply automated fixes

* Update Vector Store RAG.json

* [autofix.ci] apply automated fixes

* Update Vector Store RAG.json

* [autofix.ci] apply automated fixes

* Error if no file provided

* Fix base file value to be empty

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-17 02:33:07 +00:00
anovazzi1
ba75a15548
Refactor: update selectItem component and remove unused imports (#5124) 2024-12-17 02:12:03 +00:00
Gabriel Luiz Freitas Almeida
cebf4b103b
ci: Add Python version input to setup-uv action and update workflow configuration (#5288)
* feat: add input for Python version in setup-uv action

* Introduced a new input parameter 'python-version' to allow users to specify the Python version for the setup-uv action, defaulting to 3.12.
* Updated the action to use the new input instead of relying on a version file.

* fix: update Python version setup in GitHub Actions workflow

* Changed the Python version setup in the GitHub Actions workflow to use a matrix input instead of a version file, enhancing flexibility and allowing for dynamic version specification.
* This change applies to both the main job and the test job in the workflow configuration.

* chore: update Python version in GitHub Actions workflow to 3.12

* Changed the Python version setup in the GitHub Actions workflow from using a version file to directly specifying Python 3.12, ensuring consistency and clarity in the environment configuration.

* chore: add environment variables for OpenAI and Astra DB in GitHub Actions workflow

* Introduced new environment variables for OPENAI_API_KEY, ASTRA_DB_API_ENDPOINT, and ASTRA_DB_APPLICATION_TOKEN in the store_pytest_durations.yml workflow file to enhance integration capabilities and secure access to necessary APIs.
2024-12-17 01:48:50 +00:00
Gabriel Luiz Freitas Almeida
ac356ec32f
chore: Fix audit vulnerabilities and update dependencies (#5257)
chore: fix audit vulnerabilities

- Updated "shadcn-ui" from version 0.8.0 to 0.9.4.
- Upgraded "@swc/cli" from version 0.3.12 to 0.5.2.
- Various other dependency updates and removals in package-lock.json to ensure compatibility and improve performance.

These changes enhance the project's dependency management and ensure the latest features and fixes are included.
2024-12-16 22:19:53 +00:00
Saurabh Misra
e8d3714dc6
refactor: ️ Speed up function find_last_node by 29,891% (#5261)
️ Speed up function `find_last_node` by 29,891%
Certainly! We can optimize the existing code by minimizing the checks inside the loop and improving the lookup operations. Here's an optimized version of the program.



### Explanation.
1. **Set for Fast Lookup**: We first create a set of all source IDs from the edges. This is efficient because checking for membership in a set is on average O(1) time complexity.
2. **Iterate Through Nodes**: We loop through each node and check if its ID is not in the set of source IDs. If a node's ID is not found in the set, it means this node has no outgoing edges and is the "last node".

This approach ensures we only iterate over the edges once to create the set and then do a fast lookup for each node, improving the overall efficiency.

Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
2024-12-16 21:58:32 +00:00
Gabriel Luiz Freitas Almeida
cd602c8403
ci: Improve TypeScript test workflow logging (#5260)
* ci: Update TypeScript test workflow to improve output logging

- Enhanced logging in the TypeScript test workflow by modifying the output of the changes filter to use JSON formatting for better readability.
- Added logging for the release input to provide clearer context during the build process.

* ci: Enable Langflow deactivated tracing in TypeScript test workflow

- Added LANGFLOW_DEACTIVE_TRACING environment variable set to "true" in the TypeScript test workflow configuration to enhance debugging capabilities.
2024-12-16 21:20:51 +00:00
dhlidongming
1ec63800b2
feat: implement pagination for transaction log queries (#5281)
* Add pagination support for transaction logs.

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Replace 'TransactionData' with 'data' variable.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-16 21:04:30 +00:00
anovazzi1
4736aaed8c
fix: update message update logic and add comment (#5295)
* refactor: Simplify message update logic in aupdate_messages function

* add comment
2024-12-16 12:05:54 -08:00
Edwin Jose
5b6bfcafe2
fix: Update stored message to give out only the latest message (#4954)
* Update store_message.py

update stored message to give out only the latest message

* Update store_message.py

* Update store_message.py

* Update store_message.py

update with error handling
2024-12-16 18:56:37 +00:00
Edwin Jose
4fc7b187c4
fix: fixes tool metadata order and update issue, resolves agent tool metadata update failure (#5248)
This pull request includes several changes to the langflow project, focusing on deprecating the agent_description feature and enhancing the tools' metadata handling. The most important changes include marking the agent_description as deprecated, updating the tools' metadata management, and adding tags to tools.
2024-12-16 18:33:35 +00:00
VICTOR CORREA GOMES
ef6226d25d
feat: Enhance ConditionalRouterComponent with Regex Matching and UI Improvements (#5217)
* fix: revert response return type to Message for compatibility

* Change the max_iterations and case_sensitive advanced options

* feat: add regex matching and real-time refresh functionality

* Refactor evaluate_condition method to use elif statements for clarity

- Changed if statements to elif in the evaluate_condition method to improve readability and indicate mutually exclusive conditions.

- Removed redundant advanced=True line from BoolInput for case sensitivity.

* [autofix.ci] apply automated fixes

* Format code using make format

- Applied code formatting to ensure consistency and adherence to style guidelines.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
2024-12-16 10:13:25 -08:00
anovazzi1
dffc2d51cd
feature: Improve Table customization to enhance ux on tool mode (#5216)
* refactor: Add field validation options to TableOptions

* refactor: Add field validation options and trigger text/icon to TableMixin

* refactor: Add field validation options and trigger text/icon to TableMixin

* refactor: Add field validation options and trigger text/icon to TableMixin

* update table trigger for toolmode usage

* Refactor table trigger and field validation options

- Updated the table trigger for toolmode usage
- Added field validation options and trigger text/icon to TableMixin
- Modified TableOptions to block certain actions and hide options

* Refactor TableOptionsTypeAPI field names for blocking actions

* Refactor TableOptions default values for blocking actions

* Refactor TableOptions default values for blocking actions

* Refactor TableOptions component to include tableOptions prop

* Refactor table selection and pagination options

* Refactor TOOL_TABLE_SCHEMA to disable sorting and filtering for the "name" and "description" fields

* Refactor TableOptions to allow blocking hiding of fields

* Refactor TableModal and TableNodeComponent to include support for block hiding columns

* Refactor Column model to include support for different edit modes

* Refactor TableOptions to include support for field parsers

* Refactor TableOptions to include support for field parsers and blocking hiding of fields

* Refactor TableOptions to include support for inline editing of fields

* Refactor App.css to style large text inputs and text areas in AgGrid

* update types

* Update table modal to prevent closing the the modal while editing cell

* Refactor string manipulation utilities to support parsing and transforming strings based on specified field parsers

* add inline input support

* Refactor TextModal component to remove close button in the footer

* add field parser in context

* format code

* format code

* Add disable_edit field to Column class

* Refactor TableNodeComponent to exclude columns with disable_edit field from being editable

* [autofix.ci] apply automated fixes

* Fix casing in selector text for "Open table" in tableInputComponent tests

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-12-16 17:50:00 +00:00
Edwin Jose
13a468027b
fix: fixes agents issue by removing depreciated feature output parser from the LLM Model Components (#5242)
* remove depreciated output parser

* Update model.py

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Update model.py

* Update src/backend/base/langflow/base/models/model.py

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-12-16 16:04:24 +00:00
Lucas Oliveira
f9c2c270da
fix: update hidden secret_str load_from_db when adding flow (#5289)
* Added updateGlobalVariables again to update the hidden secretstr parameters

* Fixed updateGroupRecursion calls
2024-12-16 15:45:48 +00:00
Christophe Bornet
8d66754380
ref: Remove unused build_lc_memory (#5228) 2024-12-16 15:34:48 +00:00
Jan Heimes
e8667009b7
feat: add needle as custom component (#4657)
* init: add needle as custom component

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* stage changes

* upgrate: langchain-community

* lint

* [autofix.ci] apply automated fixes

* techdebt: package-lock.json

* [autofix.ci] apply automated fixes

* techdebt: lint with working needle

* techdebt: use Component class and Integrate with other components

* techdebt: adjust needle component

* [autofix.ci] apply automated fixes

* lint

* fix: package json & lock not in sync

* chore: remove outdated dependencies from pyproject.toml

* Removed pyautogen and several langchain-related packages to streamline dependencies and reduce potential conflicts.

* [autofix.ci] apply automated fixes

* refactor: simplify needle component API key handling and clean up imports

* Streamlined API key retrieval by removing unnecessary SecretStr usage, defaulting to empty strings if keys are not provided.
* Consolidated import statements for better readability and organization.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-12-16 15:11:31 +00:00
Rodrigo Nader
c82aeb2536
feat: improve component configuration and input clarity (#5267)
* Add tool mode to structured output component

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
2024-12-16 14:39:33 +00:00
Cristhian Zanforlin Lousa
0bdf317fe0
fix: add notifications UI and add integration test (#5286)
 (appHeaderComponent/index.tsx): Refactor AppHeader component to use AlertDropdown for notifications and improve user interaction with notifications tab
 (notifications.spec.ts): Add end-to-end test for user interaction with notifications tab in the frontend application
2024-12-16 14:30:01 +00:00
Christophe Bornet
ddb53ab83d
fix: Put back some sync methods for backward compatibility. (#5269)
* Put back some sync methods for backward compatibility.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-16 14:18:16 +00:00
Cristhian Zanforlin Lousa
b50b6e2adb
fix: enhance confirmation modal with new UI properties (#5283)
 (nodeToolbarComponent/index.tsx): add new props 'cancelText', 'confirmationText', 'size', 'icon', and 'index' to enhance customization and functionality of the NodeToolbarComponent
2024-12-16 05:13:50 -08:00
Cristhian Zanforlin Lousa
d147a73c43
style: convert SVG attributes to React camelCase format (#5284)
📝 (AgentQL.jsx): Update attribute names from camelCase to PascalCase for consistency and better readability.
2024-12-16 05:12:09 -08:00
Jordan Frazier
ba6f5183be
ci: update docker image configuration for secure deployments (#5259)
* changes required for openshift to work with read-only dirs
2024-12-13 22:38:55 +00:00
Cristhian Zanforlin Lousa
977ba926c6
perf: Optimize component rendering with memoization and useCallback hooks (#5253)
*  (NodeDescription/index.tsx): Memoize Markdown component and description rendering for performance optimization
♻️ (NodeOutputfield/index.tsx): Memoize HandleRenderComponent and Handle instance with useMemo and memo for performance optimization
 (RenderInputParameters/index.tsx): Add new component RenderInputParameters to render input parameters with memoization for improved performance

📝 (GenericNode/index.tsx): Remove unused imports and functions, refactor sortToolModeFields to be exported, and optimize key generation and memoization for NodeOutputField component
📝 (flowSidebarComponent/index.tsx): Refactor event handlers to use useCallback for better performance
📝 (nodeToolbarComponent/index.tsx): Refactor event handlers to use useCallback for better performance and readability

* ♻️ (NodeDescription/index.tsx): Remove unnecessary comments and improve code readability by removing redundant comments
♻️ (NodeOutputfield/index.tsx): Remove unnecessary comments and improve code readability by removing redundant comments
♻️ (RenderInputParameters/index.tsx): Remove unnecessary comments and improve code readability by removing redundant comments
♻️ (index.tsx): Remove unnecessary comments and improve code readability by removing redundant comments

*  (decisionFlow.spec.ts): add @workflow tag to the test case for better categorization and organization.

* 📝 (GenericNode/index.tsx): Organize imports and update component import for better code structure and readability
📝 (GenericNode/index.tsx): Refactor renderOutputs function to improve code readability and maintainability
📝 (GenericNode/index.tsx): Refactor renderOutputParameter function to use OutputParameter component for consistency
📝 (GenericNode/index.tsx): Refactor output rendering logic to use OutputParameter component for better code structure
📝 (sidebarDraggableComponent/index.tsx): Update logic to remove cursor element only if it exists to prevent errors

*  (NodeOutputParameter/index.tsx): Add a new component for rendering output parameters in the frontend to improve modularity and reusability.
2024-12-13 22:24:45 +00:00
Cristhian Zanforlin Lousa
32a0707f9f
fix: simplify input field handling in InputListComponent (#5255)
* 🔧 (index.tsx): Remove unnecessary conditional rendering for addNewInput button and simplify the logic for onClick event handler to improve code readability and maintainability.

*  (button-input-list.tsx): Add a new component ButtonInputList to handle button input list functionality in the frontend
📝 (get-class-name.ts): Create a helper function getButtonClassName to generate button class names based on disabled state
📝 (get-test-id.ts): Create a helper function getTestId to generate unique test ids for input list buttons
🔄 (index.tsx): Refactor InputListComponent to use the new ButtonInputList component for handling button input list functionality in the frontend
2024-12-13 22:06:47 +00:00
Eric Hare
77a82d7cc5
fix: set embedding dict to empty if vectorize (#5258)
* fix: set embedding dict to empty if vectorize

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-13 20:25:47 +00:00
Eric Hare
b28c6dcc55
fix: support additional autodetect astradb params (#5254)
* fix: support additional autodetect astradb params

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-13 16:23:43 -03:00
Sergey Ryabov
ee31f152ad
feat: Add AgentQL integration (#4998)
AgentQL is a query language and a set of supporting developer tools designed to identify web elements and their data using natural language and return them in the shape you define.
Added AgentQL data extraction component. See: https://docs.agentql.com/rest-api/api-reference

This pull request introduces a new component, AgentQL, to both the backend and frontend of the project. The changes include the implementation of the AgentQL component, its integration into the frontend, and the addition of a new icon for AgentQL.

* feat: Add AgentQL integration

* upd: Update the logo

* upd: Update field type

* upd: Address feedback + better error handling

* upd: Change DictInput type & mark 'advanced' fields

* upd: Update wording

* upd: Update wording

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2024-12-13 13:38:09 -05:00
Gabriel Luiz Freitas Almeida
f6d4c204da
ci: Update GitHub Actions workflow to include Python 3.13 (#5240)
* chore: add Python 3.13 to GitHub Actions workflow matrix

* chore: update GitHub Actions workflow to include Python 3.13 in the testing matrix

* Add Python 3.13 to nightly build test matrix
2024-12-13 17:28:42 +00:00
Gabriel Luiz Freitas Almeida
c40be15e9b
refactor: reduce logging of SQLite pragmas and enhance model provider type safety (#5235)
* feat: add ModelProvidersDict TypedDict and update MODEL_PROVIDERS_DICT type annotation

- Introduced ModelProvidersDict as a TypedDict to define the structure for model provider configurations.
- Updated MODEL_PROVIDERS_DICT to use the new TypedDict for improved type safety and clarity.
- Enhanced code readability and maintainability by specifying input types for model providers.

* fix: prevent duplicate logging of SQLite pragmas in DatabaseService

- Added a flag to track whether SQLite pragmas have been logged to avoid redundant log entries.
- Improved logging efficiency by ensuring that the debug message for setting pragmas is only logged once per session.
2024-12-13 14:20:55 +00:00
Christophe Bornet
384ac5e80e
ref: Add and use update_component_build_config utility (#5226)
* Add and use update_component_build_config utility

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-12 23:58:19 +00:00
Gabriel Luiz Freitas Almeida
5a4aef0f82
ci: Add nightly build status check and synchronize event to CI workflows (#5241)
* ci: add synchronize event to PR label workflow

* feat: add nightly build status check to CI workflow

* ci: rename job to 'Check Nightly Status' in CI workflow
2024-12-12 14:52:53 -08:00
Raphael Valdetaro
67892d4292
feat: add gemini-2.0-flash-exp and gemini-exp-1206 models (#5213) 2024-12-12 21:21:46 +00:00
Gabriel Luiz Freitas Almeida
222f15d8a1
fix: Ensure safe assignment to tool_blocks_map in agent_message handling (#5239)
fix: ensure tool_blocks_map assignment is safe by checking content availability in agent_message
2024-12-12 20:45:34 +00:00
Gabriel Luiz Freitas Almeida
c6b1eaba60
feat: add support for Python 3.13 (#5238)
* chore: update Python version requirement and remove deprecated dependencies in pyproject.toml files

* Updated Python version requirement to allow up to 3.14 in both main and base pyproject.toml files.
* Removed deprecated dependencies: cohere and pyautogen from the main dependencies list.

* chore: update Python version requirements and add support for Python 3.13 in uv.lock

* Updated the required Python version to allow up to 3.14.
* Adjusted resolution markers for Python versions to include 3.13.
* Added markers for the 'typing-extensions' dependency to restrict it for Python versions below 3.13.
* Included additional wheel files for various packages to support Python 3.13 compatibility.

* Update Python version requirements in README files to support Python 3.13

* Update Python version in GitHub Actions workflow to 3.13

* Update Python version in GitHub Actions workflows to include 3.13

* Update installation documentation to support Python 3.13 and clarify troubleshooting steps

* revert changes to docs until we release

* chore: add ag2 dependency and update uv.lock for Python 3.13 compatibility

* Added ag2 version 0.3.2 and 0.5.2 to pyproject.toml and uv.lock with appropriate resolution markers for Python versions.
* Included flaml version 2.3.2 in uv.lock to ensure compatibility with the new ag2 dependency.
* Updated dependency specifications to support Python 3.13 and above.
2024-12-12 12:24:43 -08:00
Cristhian Zanforlin Lousa
94fa92f718
fix: validateDOMNesting error on nodeToolbarComponent (#5212)
🐛 (use-patch-update-flow.ts): change 'locked' property to optional by using '?' to match interface definition
📝 (index.tsx): add 'asChild' prop to Button component to pass it down as a prop to the child component
2024-12-12 19:54:07 +00:00
Mendon Kissling
973ca8c780
Docs: recommend uv (#5237)
* docs: add troubleshooting section for Langflow installation issues

* docs: update installation instructions to recommend uv for local setup

* docs: update installation instructions to emphasize uv as the recommended method

* Update docs/docs/Get-Started/get-started-installation.md

Co-authored-by: Madhavan <msmygit@users.noreply.github.com>

---------

Co-authored-by: Madhavan <msmygit@users.noreply.github.com>
2024-12-12 19:01:16 +00:00