Commit graph

5,428 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
b34a7c7f02
fix: Handle group nodes in graph sorting (#3929)
* Fix: Handle group nodes in graph sorting

- Added `get_root_of_group_node` function to identify the root of a group node.
- Updated `sort_up_to_vertex` to use `get_root_of_group_node` for handling group nodes.
- Modified `__filter_vertices` to pass `parent_node_map` to `sort_up_to_vertex`.

* Refactor: Update NodeStatus component to handle group nodes and improve build status handling

* [autofix.ci] apply automated fixes

* Update type hint for parent_node_map in sort_up_to_vertex function

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-09-27 15:26:20 +00:00
Cristhian Zanforlin Lousa
3ddd123b66
feat: add dynamic metadata to components + search on sidebar (#3945)
*  (frontend_node/base.py): add metadata attribute to store additional information for the component node

*  (constants.py): add 'metadata' attribute to NODE_FORMAT_ATTRIBUTES list to include additional metadata information for nodes in the application.

* 📝 (attributes.py): add new function getattr_return_dict to return a dictionary if the value is of type dict, otherwise return an empty dictionary. Update ATTR_FUNC_MAPPING to include the new function for the "metadata" attribute.

* update basic examples

* 📝 (extraSidebarComponent/index.tsx): refactor handleSearchInput function to improve code readability and maintainability
🐛 (extraSidebarComponent/index.tsx): fix searchInMetadata function to correctly handle nested objects in metadata for search functionality

* 📝 (component.py): add _metadata attribute to CONFIG_ATTRIBUTES list to include it in the configuration attributes
2024-09-27 12:19:35 -03:00
anovazzi1
5dec9cca9b
fix: usePatchUpdateFlow to conditionally refetch queries based on the browser URL (#3915)
* fix usePatchUpdateFlow to conditionally refetch queries based on the browser URL, preventing unecessary request

* [autofix.ci] apply automated fixes

* Refactor PageComponent to remove unnecessary query using useQueryClient

* Refactor usePatchUpdateFlow to conditionally refetch queries based on the browser URL

* [autofix.ci] apply automated fixes

* Refactor PageComponent to remove unnecessary query using useQueryClient

* Implement query cache cleanup on MainPage unmount

* fix spelling

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-09-27 12:12:49 -03:00
anovazzi1
f906059a72
fix: animation of building edges on build stop (#3937)
fix: remove animation of builidng edges on build stop
2024-09-27 14:44:27 +00:00
Jordan Frazier
1bf6781dc4
fix: use init_subclass instead of metaclass to enforce decorator (#3942)
* Use init_subclass instead of metaclass to enforce decorator

* [autofix.ci] apply automated fixes

* fix imports

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-09-27 12:06:15 +00:00
Cristhian Zanforlin Lousa
232b0d7d00
fix: truncate text on filter to x icon fits the parent div (#3941)
🔧 (index.tsx): improve layout of sidebarFilterComponent to display type in a more readable way
2024-09-26 20:52:38 +00:00
Cristhian Zanforlin Lousa
11d0f4487b
fix: search for the parent category on sidebar (#3940)
* 📝 (extraSidebarComponent/index.tsx): refactor handleSearchInput function to use a normalizeString helper function for better code readability and maintainability

* ♻️ (extraSidebarComponent/index.tsx): remove unnecessary console.log statement from the code
2024-09-26 16:51:59 -03:00
anovazzi1
106a34d2ff
fix: unnecessary re-renders in PageComponent and update edgeTypes (#3917)
fix: Update edgeTypes in PageComponent to prevent unecessary re-renders and remove console alert
2024-09-26 04:27:10 -07:00
Cristhian Zanforlin Lousa
17fc2482a0
fix: "Start Here" button not working as expected + fe tests (#3910)
*  (general-bugs-shard-3909.spec.ts): add test case to ensure user can create a new flow by clicking on "Start Here" button

*  (componentsComponent/index.tsx): Add NewFlowModal component to allow users to create a new flow
📝 (componentsComponent/index.tsx): Update ComponentsComponent to handle opening and closing of NewFlowModal

*  (emptyComponent/index.tsx): refactor EmptyComponent to use useIsFetching hook from @tanstack/react-query for loading state and pass handleOpenModal as a prop to improve code readability and maintainability

*  (componentsComponent/index.tsx): refactor handleOpenModal function to improve code readability and maintainability
2024-09-25 19:31:45 +00:00
dependabot[bot]
44a78bd7cf
build(deps): bump rollup from 4.21.1 to 4.22.4 in /src/frontend (#3897)
Bumps [rollup](https://github.com/rollup/rollup) from 4.21.1 to 4.22.4.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.21.1...v4.22.4)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-25 17:54:16 +00:00
Patrick Loeber
c567323413
feat: add AssemblyAI components (#3829)
* Add AssemblyAI components

* add icons

* [autofix.ci] apply automated fixes

* Add ruff 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-09-25 17:32:03 +00:00
Mike Fortman
8ed93654f2
feat: add tracking and custom param label (#3902)
* add tracking and custom param label

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-09-24 14:00:34 -05:00
dependabot[bot]
e0e54a3ed0
build(deps-dev): bump vite from 5.4.2 to 5.4.7 in /src/frontend (#3889)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.2 to 5.4.7.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.7/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.7/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-24 06:49:52 -07:00
Yuqi Tang
34ef5f5964
Add undo/redo check (#3893)
* add check for other browsers

* [autofix.ci] apply automated fixes

* add command + zand y test

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-09-23 21:12:59 -03:00
anovazzi1
bf9ded5063
fix: Update class name in PageComponent (#3842)
* refactor: Update class name in PageComponent

* [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-09-23 15:28:52 +00:00
Cristhian Zanforlin Lousa
ad97ee9830
fix: image not been sent on ChatInputComponent during runtime of building a flow (#3862)
* refactor: Refactor file path rewriting logic

This commit refactors the logic for rewriting file paths in the `rewrite_file_path` function. The function now splits the file path by "/" and checks if it has at least two parts. If it does, it creates a consistent file path by concatenating the last two parts. If not, it returns the original file path. This change improves the consistency of file paths in the codebase.

Refactor the file path rewriting logic in the `rewrite_file_path` function.

* refactor: Refactor file path rewriting logic and treat file paths in InterfaceVertex

* Refactor file path rewriting logic and treat file paths in InterfaceVertex

* Refactor file path rewriting logic and treat file paths in InterfaceVertex

* Refactor file path rewriting logic and treat file paths in InterfaceVertex

*  (general-bugs-shard-3836.spec.ts): update test description to be more specific about the tool used for sending images on chat
📝 (general-bugs-shard-3836.spec.ts): remove unused import of readFileSync from fs module

*  (test_rewrite_file_path.py): add unit tests for the rewrite_file_path function to ensure correct behavior with various file path scenarios

* ♻️ (utils.py): refactor file_path function to handle both forward and backward slashes and extract file path after drive letter if present

* style: fix single quotes, commas, and spaces

---------

Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
2024-09-23 12:19:09 -03:00
Cristhian Zanforlin Lousa
aa2578370b
fix: limit file upload size to 10mb to prevent LF crashing due data render component limitations (#3870)
* 🐛 (inputFileComponent/index.tsx): add check for file size before uploading to prevent uploading files larger than the maximum allowed size

*  (alerts_constants.tsx): add new constant INVALID_FILE_SIZE_ALERT to display an alert message when the file size is too large

*  (constants.ts): add constant maxSizeFilesInBytes to define the maximum file size allowed for upload in bytes

* 🐛 (inputFileComponent/index.tsx): update INVALID_FILE_SIZE_ALERT parameter from 9 to 10 to match the new file size limit
🐛 (constants/constants.ts): increase maxSizeFilesInBytes constant value from 9MB to 10MB to reflect the new file size limit
2024-09-20 18:33:02 -03:00
Cristhian Zanforlin Lousa
98c1f0e8aa
fix: fix building loop when renaming a folder and opening a new flow and running It (#3844)
* refactor: Add useIsFetching hook for folder fetching in DropdownButtonComponent

* refactor: Improve folder sidebar buttons component

Refactor the folder sidebar buttons component to improve its structure and readability. This includes adding a new hook for folder fetching, handling rendering and filtering functionality, and updating the UI for adding and uploading folders. The changes also include handling double-click and keydown events for folder items, as well as fixing some bugs related to folder editing and deleting. These improvements enhance the overall user experience and maintainability of the codebase.

* refactor: Remove unused import and variable in DropdownButtonComponent

* refactor: Remove unused import and variable in DropdownButtonComponent

- Remove unused import and variable in DropdownButtonComponent
- Add useIsFetching hook for folder fetching in DropdownButtonComponent

* refactor: Remove unused import and variable in DropdownButtonComponent
2024-09-18 20:13:47 -03:00
Lucas Oliveira
bad009c0fa
fix: update project description, update alerts animation, fix delete and duplicate loading (#3835)
* Deleted "personal" from manage your projects

* Removed animations from alerts on the dropdown

* Changed useDeleteFlow to return isPending as well

* Added delete loading to components and added filter of components not present in "flows" for deletion

* added isDuplicating as a isMutating with the postAddFlow
2024-09-18 13:30:49 +00:00
Cristhian Zanforlin Lousa
8c8be151e5
feat: add duckduckgo search component (#3798)
* 🔧 (pyproject.toml): add duckduckgo-search dependency to the project
 (DuckDuckGoSearchRun.py): introduce DuckDuckGoSearchComponent for performing web searches using DuckDuckGo search engine
 (DuckDuckGo.jsx): add SVG icon for DuckDuckGo
 (index.tsx): create DuckDuckGoIcon component for displaying DuckDuckGo icon
🔧 (styleUtils.ts): import DuckDuckGoIcon for nodeIconsLucide in styleUtils

* 📝 (DuckDuckGoSearchRun.py): remove unnecessary whitespace to improve code readability and consistency

*  (DuckDuckGoSearchRun.py): Add retry logic to DuckDuckGo search component for rate-limited requests
📝 (DuckDuckGoSearchRun.py): Update component description to reflect the addition of retry logic
📝 (DuckDuckGoSearchRun.py): Add new inputs for max_retries and initial_delay to configure retry behavior
📝 (DuckDuckGoSearchRun.py): Update search_response method to use search_with_retry method with retry logic
📝 (DuckDuckGoSearchRun.py): Update format_results method to handle formatted results
📝 (DuckDuckGoSearchRun.py): Add search_with_retry method to handle search with retry logic
📝 (DuckDuckGoSearchRun.py): Update search_response method to use search_with_retry method
📝 (DuckDuckGoSearchRun.py): Update search_response method to set status messages
📝 (DuckDuckGoSearchRun.py): Handle exceptions and set appropriate status messages in search_response method
 (duckduckgo.spec.ts): Add integration test for DuckDuckGo search component in frontend

* 📝 (DuckDuckGoSearchRun.py): add newline at the end of the file to follow best practices and avoid potential issues with some tools that expect it

* [autofix.ci] apply automated fixes

* updating duckudckgo

* [autofix.ci] apply automated fixes

*  (DuckDuckGoSearchRun.py): Refactor DuckDuckGoSearchComponent to use pydantic BaseModel for schema definition and improve code structure for better readability and maintainability. Add support for result limiting in search functionality.

* 🔧 (DuckDuckGoSearchRun.py): Remove unnecessary import and update status message for DuckDuckGo Search Tool to improve clarity

* [autofix.ci] apply automated fixes

*  (duckduckgo.spec.ts): update test selectors for duckduckgo search component to match changes in the frontend code and improve test reliability

* 🐛 (linkComponent.spec.ts): fix an issue where the key combination for selecting all text was not working correctly on Mac devices. Updated the key combination to use the correct modifier key based on the user's operating system.

* 📝 (frontend): mark is-unicode-supported package as extraneous in package-lock.json

* rollback lock file

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-09-17 16:39:17 -03:00
Cristhian Zanforlin Lousa
3e617acf2f
feat: Add New Link Parameter Type for External Links in Node UI (#3806)
*  (inputs/__init__.py): Add LinkInput class to support linking functionality in inputs
📝 (inputs/input_mixin.py): Add Link field type to support linking functionality in inputs
📝 (inputs/inputs.py): Add LinkInput class to support linking functionality in inputs
📝 (io/__init__.py): Import and export LinkInput class for linking functionality in inputs
📝 (frontend/src/components/linkComponent/index.tsx): Create LinkComponent to display and handle links in frontend components
📝 (frontend/src/components/parameterRenderComponent/index.tsx): Add support for rendering LinkComponent in parameter rendering based on template type
📝 (frontend/src/constants/constants.ts): Add "link" as a supported type for LANGFLOW_SUPPORTED_TYPES
📝 (frontend/src/types/api/index.ts): Add icon and text fields to InputFieldType for link component
📝 (frontend/src/types/components/index.ts): Define LinkComponentType for passing link data to LinkComponent

 (linkComponent.spec.ts): Add unit test for link component interaction to ensure proper functionality and behavior
📝 (unit-test-components.spec.ts): Add template for a unit test file to be used for testing components in the frontend application

* style: apply make format

* Update input_mixin.py

---------

Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
2024-09-17 16:56:10 +00:00
Mike Fortman
d4bed03f9c
refactor: Move to LoadEnv in vite config (#3825)
use loadenv
2024-09-16 14:34:59 -05:00
Lucas Oliveira
3e11d8a64d
fix: vite config and routes to support no slashes, and api interceptor for fetch (#3824)
* Fix vite config and routes to support no slashes

* Added fetch intercept to add custom headers into fetch calls
2024-09-16 18:42:08 +00:00
Lucas Oliveira
2f1f1808b9
refactor: handle rendering and filtering functionality (#3512) 2024-09-13 17:27:30 -03:00
Mike Fortman
2bd5d4b911
feat: Update tracking (#3805)
* Update tracking

* [autofix.ci] apply automated fixes

* cleanup

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-09-13 13:01:06 -05:00
Lucas Oliveira
56802bada6
refactor: add custom banner and refactor pagelayout to include it (#3803)
* Added custom banner

* Refactored pageLayout to include custom banner
2024-09-13 17:29:19 +00:00
Lucas Oliveira
35c194e575
fix: json dark mode colors and dict component button view (#3802)
* Fix dark mode colors on jsonView

* Fix dict component button view

* Changed style of dict component button

* Changed parameter render to remove space on the bottom of the inputs that are only handles

* Fixed space below nodes
2024-09-13 16:34:58 +00:00
Lucas Oliveira
cc04a21d9c
fix: frozen border (#3801)
Fix frozen border
2024-09-13 14:40:41 +00:00
Cristhian Zanforlin Lousa
fc23de67e4
fix: JSONViewer component style update to fits on dark and light mode (#3792)
*  (frontend): Add react-json-view-lite package to frontend dependencies
📝 (frontend): Update JsonView component in dictAreaModal to use dark theme and adjust class name
📝 (frontend): Update background color for dark theme in JsonView component styling

* 🔧 (generalBugs-shard-13.spec.ts): remove unnecessary line causing linting issue

* updating lock
2024-09-13 14:37:59 +00:00
Lucas Oliveira
128a0e9332
fix: update flow name validation and label (#3785)
* Changed text warning name invalid

* Change invalidNameList to include components

* 📝 (generalBugs-shard-13.spec.ts): add missing comments to clarify the purpose of the code block and improve code readability

---------

Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
2024-09-12 19:47:21 +00:00
Cristhian Zanforlin Lousa
2652f44d31
fix: share button not working on canvas (#3770)
🔧 (utils.py): refactor import statement to get version info from utils module instead of version module
🔧 (index.tsx): add dataTestId attribute to submit button in ShareModal component for testing purposes
 (generalBugs-shard-13.spec.ts): add end-to-end test to verify sharing a flow on the Langflow Store via modal interaction
2024-09-11 21:39:16 +00:00
anovazzi1
0ded882b74
fix: Update @radix-ui/react-dialog to version 1.1.1 (#3769) 2024-09-11 21:21:25 +00:00
Ítalo Johnny
7dcf639f7c
fix: bug langchain await (#3775)
* fix: TypeError: object LangfuseResponseGeneratorSync can't be used in 'await'

* 🔧 (generalBugs-shard-1.spec.ts): remove unnecessary empty line to improve code readability

---------

Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
2024-09-11 18:03:32 -03:00
Christophe Bornet
7273a6e78a
feat: Add CassandraGraphVectorStoreComponent and HtmlLinkExtractorComponent (#3757)
* Add CassandraGraphVectorStoreComponent and HtmlLinkExtractorComponent

* Move uuid import to global imports

* fix test with new text spliter

* update poetry lock

* ci: add continue-on-error to py_autofix.yml

---------

Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2024-09-11 14:56:25 -03:00
anovazzi1
810cf72487
fix: Update templates and include global variables (#3755)
* update templates

* update to include global variables

* Refactor code to include global variables

* update PythonREPLTool.py

* [autofix.ci] apply automated fixes

* update pythonREPL and example

* Refactor code to handle decoding chat messages and handle decoding errors

*  (Simple Agent.spec.ts): Add test case to fill textarea with specific text for testing purposes
📝 (Simple Agent.spec.ts): Update test case descriptions for better clarity and accuracy
 (Simple Agent.spec.ts): Update test assertions to match the expected behavior of the test case

* [autofix.ci] apply automated fixes

* 🐛 (Dynamic Agent.spec.ts): fix environment variable name from BRAVE_SEARCH_API_KEY to SEARCH_API_KEY for consistency and clarity
💡 (Dynamic Agent.spec.ts): add additional test cases to improve test coverage and ensure specific text is not present in the chat output

* 🔧 (.github/workflows/typescript_test.yml): update environment variable name from BRAVE_SEARCH_API_KEY to SEARCH_API_KEY for consistency
🐛 (Travel Planning Agent.spec.ts): fix test to skip if SEARCH_API_KEY is not available in the environment variables

*  (Simple Agent.spec.ts): update expected count of python words to 3 for accurate test validation

* updating search tools

* [autofix.ci] apply automated fixes

* change examples

* update travel planning to include global variable

* Refactor search API component to include result limiting

* 📝 (Travel Planning Agent.spec.ts): remove unnecessary empty line to improve code readability and consistency

* test: adjusts asserts to make the test pass successfully

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
2024-09-11 14:47:42 +00:00
Cristhian Zanforlin Lousa
9b5c16a0ec
tests: update astraDB test to ensure will run dev mode only when necessary (#3754)
* 📝 (Vector Store.spec.ts): Remove unnecessary code block related to AstraVectorStoreComponent class and its methods
♻️ (Vector Store.spec.ts): Refactor test file to remove unused imports and clean up unnecessary code blocks

🔧 (Vector Store.spec.ts): Refactor code to include conditional logic based on the presence of "dev" in ASTRA_DB_API_ENDPOINT environment variable
🔧 (Vector Store.spec.ts): Add function extractAndCleanCode to extract and clean code content from HTML element

* 🐛 (Vector Store.spec.ts): fix incorrect check for Astra DB API endpoint to include "astra-dev" instead of "dev" for proper environment detection
2024-09-10 17:29:37 -03:00
anovazzi1
b6df370fcc
fix: Refactor usePatchUpdateFlow mutation to include refetchQueries (#3736)
* refactor: Add refetchQueries to usePatchUpdateFlow mutation

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-09-10 19:55:58 +00:00
Cristhian Zanforlin Lousa
af99b4c32a
fix: disable add new folder button when isLoading (#3734)
*  (index.tsx): Add ShadTooltip component to provide tooltips for folder buttons for better user experience
📝 (index.tsx): Import useIsFetching from "@tanstack/react-query" to check if there are ongoing data fetching operations before enabling folder buttons

* 🔧 (index.tsx): add isPending variable to usePostFolders hook to track loading state for adding folders
🔧 (index.tsx): update disabled attribute in add and upload folder buttons to include isPending variable to prevent multiple submissions

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2024-09-10 19:46:15 +00:00
Cristhian Zanforlin Lousa
6f8beb894f
feat: improve user chat input to display spacements (#3687)
feat: Refactor chatMessage component for improved readability and performance

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2024-09-10 19:43:09 +00:00
Cristhian Zanforlin Lousa
96f0ea9db7
tests: update astraDB integration test (#3753)
 (Vector Store.spec.ts): Add AstraVectorStoreComponent to support Astra DB integration for vector storage and search capabilities.
2024-09-10 16:30:16 -03:00
Lucas Oliveira
5bb266cbc1
fix: textarea with password visual bug (#3739)
* Fix textarea with password visual bug

* Changed password field to default to none

* updated sanitizedHTMLWrapper to receive ref

* fixed sanitizedhtmlwrapper type

* Added back to scroll position and cursor position on Chrome

* [autofix.ci] apply automated fixes

* Fix position of password

* Fixed tests

* Fixed examples

* Fixed test schema

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2024-09-10 19:20:50 +00:00
Lucas Oliveira
f706554456
fix: node status display when node minimized (#3737)
* Removed output from node output field

* Removed setShowState that is unused

* Render nodestatus only if !showNode

* Fix node status showing when minimized

* Fix node not expanding after minimized if an output was hidden

* Lint

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-09-09 20:06:32 +00:00
Cristhian Zanforlin Lousa
6061951cba
tests: new tests folders organization (#3716)
* new tests folders organizations

* 📝 (nightly_build.yml): update tests_folder path from "tests/scheduled" to "tests/core" to reflect the correct location of the tests folder

* renaming test folder

* changing e2e to integrations folder

* 📝 (frontend/tsconfig.json): update test file paths to reflect changes in folder structure for better organization and clarity

* change assets folder

* 📝 (frontend): update file paths to remove redundant 'core' directory in test assets

* 📝 (Document QA.spec.ts, Vector Store.spec.ts, fileUploadComponent.spec.ts): Update file paths to correctly reference test assets in integration and unit tests.

* github suggestions
2024-09-09 14:45:30 -03:00
anovazzi1
ed3306fb7e
feature: Add scroll detection for NodeDescription overflow and remove feature flag (#3676)
* feat: Add scroll detection for NodeDescription overflow

* style: update CSS to hide non-selected note nodes

* remove feature flag

* [autofix.ci] apply automated fixes

* refactor: update feature flags and test IDs

- Update ENABLE_MVPS flag to false in feature-flags.ts
- Update testId from "extended-disclosure" to "bundle-extended-disclosure" in extraSidebarComponent/index.tsx

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-09-09 13:30:36 -03:00
Christopher Bradford
ce11df2a94
feat: add support for DataStax HCD vector store (#3728) 2024-09-09 12:03:25 -03:00
anovazzi1
d3b8f6cd7e
feature: add edit option to global variables table (#3712)
* first attempt to edit variables on the data table

* refactor: Rename AddNewVariableButton to GlobalVariableModal and update its usage

The component AddNewVariableButton has been renamed to GlobalVariableModal to better reflect its purpose. The component is now used in multiple places, including the GlobalVariablesPage and InputGlobalComponent. This change improves code clarity and consistency.

* fix: fix apply to fields on table edit option

* refactor: Trim field names before checking for availability in GlobalVariableModal and GlobalVariablesPage

Trim field names before checking for availability in GlobalVariableModal and GlobalVariablesPage to ensure consistent comparison and avoid any potential issues with leading or trailing spaces.

* Refactor GlobalVariablesPage to remove unused cellRenderer in the "value" field

* [autofix.ci] apply automated fixes

* Add validation for 'value' field in VariableRead model and import CREDENTIAL_TYPE

- Introduced a field validator for the 'value' field in the VariableRead model to handle cases where the variable type is CREDENTIAL_TYPE.
- Added necessary import for CREDENTIAL_TYPE.
- Removed an unnecessary blank line in the variable API.

* Add constants for credential and generic types in variable service

* Refactor import statements in `kubernetes.py` to improve module organization

* Refactor imports in test_service.py for better organization

* refactor: Update import statements in variable.py for better organization

* Refactor import and reorder fields in VariableRead model

- Changed import of `CREDENTIAL_TYPE` from `service` to `constants` module.
- Reordered fields in `VariableRead` model to place `type` before `value`.

*  (userSettings.spec.ts): Add additional randomName variables for testing purposes
📝 (userSettings.spec.ts): Update test to interact with global variables and improve readability and maintainability of the code

* test: fix test_create_variable

---------
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
2024-09-09 10:48:04 -03:00
Cristhian Zanforlin Lousa
9b83f44611
feat: add stop button on Playground Chat (#3704)
* 📝 (buttonSendWrapper/index.tsx): refactor button styling logic to use constants for better readability and maintainability
🐛 (buttonSendWrapper/index.tsx): fix logic to disable button when chat is locked and not building
🐛 (buttonSendWrapper/index.tsx): fix conditional rendering of icons based on button state

*  (stop-button-playground.spec.ts): Add end-to-end test for stopping building from inside Playground.

* 🔧 (buttonSendWrapper/index.tsx): refactor conditional logic to correctly prioritize showStopButton condition and improve code readability

*  (stop-button-playground.spec.ts): add assertion to check if "build stopped" text is visible after clicking on the stop button
2024-09-06 20:19:00 +00:00
Cristhian Zanforlin Lousa
f72e009406
feat: Add x-large size option to baseModal and various modals resizes (#3710)
* feat: Add x-large size option to baseModal

The code changes introduce a new size option "x-large" to the baseModal component. This size option sets the minimum width to "min-w-[95vw]" and the height to "h-[95vh]". This change allows for a larger modal size when needed.

* feat: Add x-large size option to baseModal

* chore: Update CodeAreaModal to use x-large size option

* feat: Update EditNodeModal to use x-large size option

* feat: Update FlowLogsModal to use x-large size option

* chore: Update modal components to use x-large size option

* 🔧 (applies.css): Rearrange CSS classes properties for better readability and maintainability. Fix the order of properties in CSS classes to follow a consistent pattern.
2024-09-06 18:30:48 +00:00
Cristhian Zanforlin Lousa
40798c5b5a
refactor: improve readability of several components (#3714)
* refactor to improve readability

* refactor to improve readability

* refactor to improve readability

* refactor to improve readability

* refactor to improve readability

* refactor to improve readability

* refactor to improve readability

* refactor to improve readability

*  (Simple Agent.spec.ts): update expected count of python words to 2 for accurate test results
📝 (auto-login-off.spec.ts): add a 1-second timeout before checking visibility of a text element to ensure proper rendering and improve test reliability

* 📝 (cardComponent/index.tsx): Extract handlePlaygroundClick function to improve code readability and maintainability
📝 (codeAreaComponent/index.tsx): Refactor code to use consistent naming conventions and improve code structure
📝 (rename-label.tsx): Refactor code to use consistent naming conventions and improve code structure
📝 (dictAreaModal/index.tsx): Refactor code to use consistent naming conventions and improve code structure

* 🔧 (rename-label.tsx): Refactor RenameLabel component to improve readability and maintainability by restructuring the component logic into separate functions for handling blur, change, and double click events. Split the component rendering logic into separate functions for input and span elements.

* update type

* [autofix.ci] apply automated fixes

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-09-06 18:30:20 +00:00
Cristhian Zanforlin Lousa
835559a05d
feat: add a better scroll behave on playground's chat (#3680)
* feat: Add useUtilityStore hook to IOModal for setting playground scroll behavior

* feat: Add useUtilityStore hook to IOModal for setting playground scroll behavior

* feat: Add setPlaygroundScrollBehaves function to useUtilityStore hook

* feat: Update codeTabsPropsType to allow undefined for the 'open' property

* feat: Add `playgroundScrollBehaves` and `setPlaygroundScrollBehaves` to `UtilityStoreType`

The `UtilityStoreType` now includes the `playgroundScrollBehaves` property of type `ScrollBehavior` and the `setPlaygroundScrollBehaves` function to update it. This allows for managing the scroll behavior of the playground in the application.

* refactor: Remove unused 'open' prop from CodeTabsComponent
2024-09-06 14:49:50 -03:00