Commit graph

13,456 commits

Author SHA1 Message Date
Nicolò Boschi
91da7f7b45
fix: endpoint /run api call could run same node twice (#3062)
fix: /run api call could run same node twice
2024-07-30 14:19:37 +00:00
Gabriel Luiz Freitas Almeida
4382e42d77
fix: update message reload and update langchain-core (#3054)
* refactor: update langchain-core to version 0.2.24

* refactor: convert inner messages to BaseMessage in load_lc_prompt method

* refactor: update ChatPromptTemplate instantiation in message.py

* refactor: update langflow-base dependency to use local path for development

* [autofix.ci] apply automated fixes

* refactor: update ChatPromptTemplate instantiation in message.py

* refactor: add async_from_template_and_variables and sync from_template_and_variables

* feat(tests): add unit test for Message schema serialization and prompt loading

* refactor: update langchain-core dependency to version 0.2.24

* chore: new lock

* mypy

* chore: format pyproject

* refactor: rename async_from_template_and_variables to from_template_and_variables in Message class

* refactor: Rename async_from_template_and_variables to from_template_and_variables in Message class

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Nicolò Boschi <boschi1997@gmail.com>
2024-07-30 13:54:51 +00:00
Daniel Gines
3e6d3dc326
chore: update makefile structure and functionality (#3000)
* Updates and changes to the Makefile:

1. Added removal of `frontend` directory inside `src/backend/base/langflow/` and `build` directory inside `src/frontend/` to the `clean_npm_cache` target.
2. Added descriptive comments for the `build_and_install`, `build_and_run`, `fix_codespell`, `setup_poetry`, `unit_tests`, `integration_tests`, and `tests_frontend` targets.

Looking forward to your feedback.

* Improvements: Structure and Functionality Improvements

- Reorganized commands to facilitate understanding of the structure
- Enhanced check_tools to detect the Python version
- Added a multi-environment script to support check_tools
- make init now builds the frontend and runs the application
- Aesthetic improvements in output messages

TO-DO:
- Reorganize container-related commands
- Reorganize other miscellaneous utilities
- Document usage in the application docs
- Prepare the dev environment following the maintainers' recommended practices

* Removed pre-commit as it is no longer used.

* Restored 'patch' command in Makefile, it updates the 'pyproject.toml' with the new project version.

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-07-30 06:43:13 -07:00
Cristhian Zanforlin Lousa
c2b5b98b64
bugfix: add steps to delete flows caused by new constraints (#3045)
* 📝 (flows.py): refactor delete_multiple_flows function to improve readability and efficiency
 (use-delete-flows.ts): add useDeleteFlows hook to handle deletion of multiple flows in frontend
♻️ (index.tsx): refactor handleDeleteMultiple function to use useDeleteFlows hook for deleting multiple flows
🔧 (actionsMainPage-shard-1.spec.ts): add test for selecting and deleting a flow in end-to-end tests

* 📝 (flows.py): Remove unused imports and variables to clean up the code and improve readability
♻️ (flows.py): Refactor code to remove unnecessary import and variable declarations, making the code more concise and maintainable

* add unit tests to delete multiple flows with transactions and build

* format

* add assert on tests
2024-07-30 13:41:54 +00:00
Nicolò Boschi
fc73e2c448
fix: update render.yaml to being compatible with langflow 1.0 (#3071) 2024-07-30 15:22:03 +02:00
anovazzi1
c39540c7d8
fix: Update Textarea component to have full height (#3069)
feat: Update Textarea component to have full height

The Textarea component was updated to have a full height by adding the "h-full" class to the parent div. This ensures that the textarea takes up the entire available vertical space.
2024-07-30 12:50:02 +00:00
Nicolò Boschi
747a1848d4
fix: file open leaks (#3067) 2024-07-30 14:45:42 +02:00
Nicolò Boschi
569869e211
ci: improve test jobs titles (#3065) 2024-07-30 05:19:14 -07:00
Nicolò Boschi
4136961155
fix: strict langchain integrations dep (#3063)
* fix: strict langchain vertexai dep

* fix: strict langchain vertexai dep

* fix: strict langchain vertexai dep

* [autofix.ci] apply automated fixes

* chore: update langchain-google-genai dependency to version 1.0.8

* more locks

* ci: improve test jobs titles

* openai 0.1.18

* openai 0.1.17

---------

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-07-30 12:11:58 +00:00
Gabriel Luiz Freitas Almeida
9213b4c070
chore: update package version to 0.0.92 (#3056) 2024-07-30 07:36:37 +00:00
Daniel Gines
d108ca11c5
feat: Add GitLoader Component with advanced filtering options (#2850)
* feat: Add GitLoader Component with advanced filtering options

This commit introduces the GitLoaderComponent, enabling users to load files from a Git repository with advanced filtering options.

GitLoader Component:

- Implementation of the GitLoaderComponent to load files from a Git repository using the `langchain_community.document_loaders.git.GitLoader` module.
- Advanced filtering option using `file_filter` to include or exclude specific files based on their extensions or other criteria.

Examples of `file_filter` usage:
- Include only .py files: `lambda file_path: file_path.endswith('.py')`
- Exclude .py files: `lambda file_path: not file_path.endswith('.py')`

This component ensures a flexible and customizable approach for loading documents from Git repositories, enhancing the user experience with advanced filtering capabilities.

Features:

- Support for loading documents from Git repositories.
- Advanced file filtering options to include or exclude specific files.

* feat: Add GitLoader Component with advanced filtering options

This commit introduces the GitLoaderComponent, enabling users to load files from a Git repository with advanced filtering options.

GitLoader Component:

- Implementation of the GitLoaderComponent to load files from a Git repository using the `langchain_community.document_loaders.git.GitLoader` module.
- Advanced filtering option using `file_filter` to include or exclude specific files based on their extensions or other criteria.

Examples of `file_filter` usage:
- Include only .py files: `lambda file_path: file_path.endswith('.py')`
- Exclude .py files: `lambda file_path: not file_path.endswith('.py')`

This component ensures a flexible and customizable approach for loading documents from Git repositories, enhancing the user experience with advanced filtering capabilities.

Features:

- Support for loading documents from Git repositories.
- Advanced file filtering options to include or exclude specific files.

* fix: Ensure proper evaluation and validation of file_filter in GitLoaderComponent

This commit fixes the issue where the GitLoaderComponent would fail if the file_filter input was not evaluated correctly. Changes include:

- Added a check to ensure that file_filter is a valid string before calling eval.
- Ensured that the evaluated file_filter is callable, otherwise it defaults to None.

* [autofix.ci] apply automated fixes

* feat: Enhance GitLoaderComponent with dynamic inputs, content filtering

- Changed inputs from `StrInput` to `MessageTextInput` to enable dynamic use with agents.
- Added `content_filter` field to allow additional content filtering using regex.
- Updated `file_filter` to support glob format, simplifying usage for users.
- Implemented binary file removal filter to exclude binary files from queries, aligning with the agent's purpose.

* [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-07-30 02:00:53 +00:00
Gabriel Luiz Freitas Almeida
12e3b51980
ci: update Python version in release workflow and skip release if already released (#3053)
* ci: update Python in release workflow

* ci: skipp release of langflow-base when version is already released
2024-07-30 00:01:29 +00:00
Gabriel Luiz Freitas Almeida
340bfe22c4
refactor: lock poetry dependencies without updating (#3050)
Lock poetry dependencies without updating in the Makefile build_langflow target
2024-07-29 23:36:20 +00:00
Nicolò Boschi
53063957e4
fix: tool calling and openai tools do not include chat history (#3030)
* fix: tool calling and openai tools do not include chat history

* fix import

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-07-29 23:09:46 +00:00
Gabriel Luiz Freitas Almeida
32824276c8
chore: update package version to 0.0.91 (#3049) 2024-07-29 16:05:51 -07:00
Cristhian Zanforlin Lousa
a811834b93
refactor: change endpoint monitor/builds to use useQuery (#2622)
*  (constants.ts): add BUILDS endpoint to URLs constants
 (index.ts): create index file for builds-related queries
 (use-delete-builds.ts): implement useDeleteFLowPool hook for deleting builds

*  (chatView): integrate useDeleteFlowPool hook for deleting flow pool
♻️ (chatView): refactor clearChat function to use mutateFlowPool for deletion

* ♻️ (use-delete-builds.ts): rename useDeleteFLowPool to useDeleteBuilds for clarity
♻️ (index.tsx): update import and usage of useDeleteFLowPool to useDeleteBuilds

*  (API): add use-get-builds query to fetch build data
 (PageComponent): integrate use-get-builds query for fetching builds
 (flowStore): add setters for inputs, outputs, and hasIO in flowStore

* ♻️ (flowStore.ts): refactor hasIO to derive its value from inputs and outputs
🔥 (flowStore.ts): remove unused resetFlow function to clean up the codebase

* ♻️ (use-get-builds.ts): refactor useGetBuildsQuery to remove unused params
 (PageComponent): add logic to handle flow state, inputs, outputs, and viewport
♻️ (flowStore): refactor and add resetFlow method to handle flow state reset

*  (chatComponent): add data-testid attributes for better testability
 (generalBugs-shard-3.spec.ts): add end-to-end test for playground button state

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2024-07-29 22:56:54 +00:00
Igor Carvalho
0fcba55f51
refactor: set a generic placeholder on float input (#3015)
* fix: set a generic placeholder on the float input

* [autofix.ci] apply automated fixes

* refactor: remove unnecessary validation

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2024-07-29 22:26:23 +00:00
Cristhian Zanforlin Lousa
9903b4408f
refactor: change logout and refresh token to use useQuery (#2999)
 (headerComponent/index.tsx): Add functionality to handle user logout in the header component
🔧 (api.tsx): Add useLogout and useRefreshAccessToken functions to handle user logout and access token refresh
🔧 (use-post-logout.ts): Implement useLogout function to handle user logout functionality
🔧 (use-post-refresh-access.ts): Implement useRefreshAccessToken function to handle access token refresh
🔧 (authStore.ts): Remove unnecessary imports and update the authStore functionality for user logout and access token management.

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2024-07-29 19:16:26 -03:00
Cristhian Zanforlin Lousa
1710bca2b6
tests: add tests to chat memory component (#3039)
* ♻️ (crud.py): refactor delete_vertex_builds_by_flow_id function to correctly delete vertex builds by flow_id using relationship attribute instead of column comparison.

* 📝 (generalBugs-shard-0.spec.ts): Remove unnecessary test case and add new test case for chat messages clearing functionality
 (generalBugs-shard-8.spec.ts): Add new test case for interacting with API request
 (generalBugs-shard-9.spec.ts): Add new test case for testing chat memory functionality
2024-07-29 21:22:26 +00:00
Nicolò Boschi
58b51d1c56
feat: bedrock access with aws access key (#3032)
* feat: bedrock access with aws access key

* [autofix.ci] apply automated fixes

* chore: ignore type import in AmazonBedrockEmbeddings.py and AmazonBedrockModel.py

---------

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-07-29 21:18:21 +00:00
Lucas Oliveira
7fa3d33d8a
fix: multiselect dropdown not visible (#3044)
* Fixed refresh button and refresh parameter

* Refactored Multiselect component and implemented custom values on it

* Fixed default values

* Made Backend support combobox on Dropdown and Multiselect
2024-07-29 21:04:27 +00:00
Gabriel Luiz Freitas Almeida
4e9367badf
fix: serialize array output and logs (#3040)
* refactor: improve recursive serialization function

Refactor the `recursive_serialize_or_str` function in the `schema.py` file to improve its readability and maintainability. The function now uses a try-except block to handle exceptions and returns a string representation of the object if an exception occurs. This ensures that the function always returns a string, preventing any unexpected errors. Additionally, the function now includes additional checks for different object types, such as dictionaries, lists, and instances of `BaseModel`. These checks ensure that the function correctly serializes complex objects and avoids any potential issues. Overall, this refactoring improves the code quality and reliability of the `recursive_serialize_or_str` function.

* feat(artifact.py): add support for recursive serialization of items in ARRAY artifact type to ensure consistent data handling

* feat(schema.py): add support for serializing arrays in build_output_logs function to handle LogType.ARRAY case
2024-07-29 20:46:07 +00:00
Gabriel Luiz Freitas Almeida
72a880df1e
fix: add support for custom component message storage (#3042)
* fix: remove create task call

* feat: Add support for custom component message storage

The code changes in `types.py` add support for storing messages in custom components. If a custom component has the attributes `should_store_message` and `store_message`, the `store_message` method will be called to store the message. This enhancement improves the functionality of the interface vertex in the graph.
2024-07-29 20:38:26 +00:00
Gabriel Luiz Freitas Almeida
c63876fcff
fix: move client instantiation in AssistantsGetAssistantName and AssistantsListAssistants to inner function (#3043)
The OpenAI client instantiation was removed from the `AssistantsGetAssistantName` and `AssistantsListAssistants` components. This commit fixes the issue by adding back the OpenAI client instantiation in the `process_inputs` method of both components.
2024-07-29 20:28:58 +00:00
anovazzi1
e15e70d43c
fix: style on password button (#3037)
* fix: update TextAreaComponent styling for edit node table
Adjust the styling of the TextAreaComponent in the edit node table to fix the positioning of eye icon

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-07-29 16:34:40 -03:00
Igor Carvalho
6fa3c7b17d
refactor: api keys API (#2652)
* feat: create useDeleteApiKey hook to handle api keys delete

* refactor: use mutation to handle delete api key

* [autofix.ci] apply automated fixes

* feat: create useGetApiKeys hook

* refactor: use useGetApiKeysQuery hook to get api keys data

* [autofix.ci] apply automated fixes

* refactor: change interface name

* refactor: remove unnused loading state and use react state instead of react ref to ensure component render

* fix: multiple refreshs when auto_login=false

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-07-29 19:04:58 +00:00
Sebastián Estévez
cffed2c9be
fix: astra-assistants types (#2881)
* merge

* [autofix.ci] apply automated fixes

* support for MultilineSecretInput

* add support for MultilineSecretInput

* [autofix.ci] apply automated fixes

* ruff

* align eye-icon

* tweaks and modal

* [autofix.ci] apply automated fixes

* textare edit modal hidden text plus eye icon

* fix pydantic serialization warning

* [autofix.ci] apply automated fixes

* chore: Add password visibility toggle to text area components

* [autofix.ci] apply automated fixes

* fix list assistants

* fix: remove extraneous property from is-unicode-supported dependency

* fix: update TextAreaComponent styling for edit node table

Adjust the styling of the TextAreaComponent in the edit node table to fix the positioning of the side-bar button. The right margin of the button was changed from 5.2rem to 4.2rem to align it correctly with the text area. This change improves the visual consistency of the edit node table.

* fix modal not sync with outside state

* add comment for future devs

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2024-07-29 17:56:05 +00:00
Nicolò Boschi
c7575b18df
feat: migrate vertex_builds to sql database (#2978)
* feat: migrate vertex_builds to sql database

* [autofix.ci] apply automated fixes

* name

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-07-29 14:58:19 +00:00
Nicolò Boschi
d71356bc16
fix: hide duckdb table not found error log (#3026) 2024-07-29 06:56:57 -07:00
Nicolò Boschi
77786d904c
fix: Store message should not override sender by default (#3024) 2024-07-29 13:06:04 +00:00
Gabriel Luiz Freitas Almeida
9afc6a2d4d
chore(pyproject): update version 1.0.14 and 0.0.90 for langflow and langflow-base packages (#3025)
* feat(pyproject.toml): add langchain-core dependency version 0.2.23 to the project

* feat(pyproject.toml): update version 1.0.14 and 0.0.90 for langflow and langflow-base packages
2024-07-29 12:46:53 +00:00
Gabriel Luiz Freitas Almeida
20a103fd50
feat(pyproject.toml): add langchain-core dependency version 0.2.23 to the project (#3023) 2024-07-29 12:42:02 +00:00
Gabriel Luiz Freitas Almeida
e5885ab158
fix: update model names for backwards compatibility (#3014)
chore: update model names in openai_constants.py for backwards compatibility
2024-07-29 04:18:23 +00:00
David Oplatka
469625c0a3
feat: new Vectara RAG Component (#2733)
* First implementation of LangWatch tracer

* Remove dependency from backend base internal and add langwatch docs

* Bump langwatch to v0.1.4

* Fix missing log parameter on method

* Move docs to the right folder

* chore: update lock

* Add Vectara RAG component and docs

* [autofix.ci] apply automated fixes

* refactor: update VectaraRAG component to the new component standard

* fix: update VectaraRagComponent filter parameter

Update the filter parameter in the VectaraRagComponent class to use the correct variable name 'self.filter' instead of 'filter'. This ensures that the correct filter value is passed to the VectaraQueryConfig object.

* fix: add condition to set_cache_coro in Graph class

Add a condition to the `set_cache_coro` function call in the `Graph` class. The condition checks if the `cache` variable is true and the `flow_id` is not empty before calling the function. This ensures that the cache is set only when both conditions are met, improving the efficiency of the code.

---------

Co-authored-by: Rogério Chaves <rogeriochaves@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-07-28 14:02:23 +00:00
Ítalo Johnny
8fffe73050
fix: wrong message timestamp (#2998)
* fix: messagem timestamp

* [autofix.ci] apply automated fixes

* feat: fix typing error in message.py

---------

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-07-26 22:22:28 +00:00
YAMON.IO
3cd0161c9a
fix: update CreateData.py (#2975)
* Update CreateData.py

Update to generate data correctly

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-07-26 21:25:15 +00:00
Gabriel Luiz Freitas Almeida
612b1ff768
fix: find runnable predecessor for every successor that is not runnable (#2996)
* refactor: add find_runnable_predecessors_for_successor method

* feat: refactor find_next_runnable_vertices method

Refactor the `find_next_runnable_vertices` method in the `Graph` class to improve readability and simplify the logic. Instead of using a list comprehension, the method now uses a for loop to iterate over the `vertex_successors_ids` and determine if each vertex is runnable. If a vertex is not runnable, it calls the `find_runnable_predecessors_for_successor` method to find the runnable predecessors. The runnable vertices are then added to the `next_runnable_vertices` list. This refactoring improves the clarity and maintainability of the code.
2024-07-26 21:14:09 +00:00
Nicolò Boschi
082c71da80
fix: external memory returns always empty history (#2980)
* fix: external memory returns always empty history

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-07-26 21:05:48 +00:00
Nicolò Boschi
06d25a9e56
fix: models with system message and prompt input fail (#2984) 2024-07-26 21:03:13 +00:00
Nicolò Boschi
bce072bb76
fix: VertexAI KeyError 'location' (#2983) 2024-07-26 21:02:56 +00:00
Lucas Oliveira
f7ad36b211
fix: ctrl a not working on edit node table (#2992)
* removed console log and fixed nulland

* Fixed ag grid version mismatch

* Fixed unused import

* Fixed ctrl+a not working on edit node and tweaks

* Fixed styling on editnode

* Made it work on mac

*  (generalBugs-shard-7.spec.ts): add end-to-end test for selecting all with ctrl + A on advanced modal to ensure functionality works as expected

---------

Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
2024-07-26 19:21:17 +00:00
Cristhian Zanforlin Lousa
ac77cee699
bugfix: fix missing condition to open disconnect modal when backend is down (#2993)
🐛 (App.tsx): Fix logic to correctly display error modal when health data is missing or not "ok"
🔧 (use-get-health.ts): Disable retry option in useGetHealthQuery to prevent unnecessary refetching of health data
2024-07-26 16:06:49 -03:00
Nadir J
1935d38bc4
fix: log messages (#2995) 2024-07-26 11:58:34 -07:00
Lucas Oliveira
a857868b7e
feat: dropdown combobox option (#2991)
* Removed default variable as true

* added combobox to dropdown

* Fixed types on strRenderComponents

* Added type of combobox

* Created combobox option on backend

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-07-26 17:50:01 +00:00
Lucas Oliveira
a9863a050e
refactor: parameter component, edit node modal and api modal (#2928)
* changed column defs to receive handleOnNewValue and use it to change Advanced variable

* Exported function isTargetHandleConnected

* Refactored types of setNodeClass

* Exported type of handleOnNewValue

* Refactored useHandleNodeClass to only handle changes to node data

* Refactored toggleCellRender to handle advanced values by itself with the handleOnNewValue

* changed setNodeClass types and disabled hook

* changed handleNodeClass on parametercomponent

* changed handleNodeClass on the two components that used it

* refactor: Update handleNodeClass to accept newNodeClass and type only

* Refactor EditNodeModal component to use new handleNodeClass and columnDefs

* Changed columnDefs to receive new handleNodeClass and not receive useless parameters

* changed cellTypeStr to strRender

* Refactored inputFileComponent to use the new handleOnNewValue

* Refactored keypairList to convert values on the fly

* added parameterRenderComponent that renders all parameters in one place

* Exported parameterRenderComponent

* Changed tableNodeCellRender to use ParameterRenderComponent

* changed parameterredercomponent to receive name

* changed strrendercomponent to receive name

* changed nodecellrender to pass name and to check if value is undefined before assigning on templateData

* chore: Refactor use-handle-new-value to handle undefined values in changes

* Used ParameterRenderComponent at parameterComponent

* Refactored parameterRenderComponent to include refresh button

* Created refresh parameter component

* Added nodeId to parameterrendercomponent call

* Removed unused variable

* Refactored refreshButton

* Fixed parameters not showing when they dont have a value

* Created a tweakComplnent that renders the tweak individually, with the same table as the EditNode

* Created tweaks component, that renders all tweaks

* Changed tableNodeCellRender to pass setNode as well

* changed handleOnNewValue to use custom setNode if specified

* added editNodeComponent that handles the table and rowData and columnDefs

* changed editNodeModal to use editNodeComponent instead of table

* changed columndefs type to handle setNode and hideVisibility optional parameters

* changed useRowData to not use myData, and just use nodeClass

* Changed codeTabsPropsType tweaks property to include only the ncessary

* changed codeTabsComponent to use TweaksComponent and handle an internal nodes state

* changed apiModal to handle the tweaks build by finding the differences between old and current node

* fix bug on API modal that refresh tweaks table all the time

* Created new tweaks store type

* Added tweaks store with all of the logic needed to get the tweaks on the API page

* refactored TweakComponent to hold an temporary state to prevent the table from rerendering

* Added TweakComponent into TweaksComponent

* Removed external state on tableAdvancedToggle, making every state come from the Stores

* Removed external state from TableNodeCellRender and added isTweaks to choose which store to use

* Added SetNode type on HandleOnNewValue

* Added custom setNode to handleNodeClass

* Removed unused logic from apiModal

* removed unused old code

* Changed type of getChangesTypes

* Transformed string into object on get codes

* Changed getNodesWithDefaultValue to return nodes that will appear on Tweaks, as well as just the allowed parameters

* added hasTweaks to tabs

* added check of template keys to update the local nodeClass state, allowing the table to be updated just when the number of parameters changes

* passed isTweaks to columnDefs

* removed unused state and passed isTweaks to value getters

* Removed unused state

* updated tabsArrayType with hasTweaks and removed unused types

* Added local nodes tweaks state to the codetabscomponent and refactored conditions of display

* removed unused console.log

* changed advanced toggle to use parameterid given by the value

* changed nodecellrender to use parameter id given by the value

* passed parameter id by value to the renderers

* removed nodeClass from columnDefs definition

* Fixed isTargetHandleConnected returning error if field is undefined

* Fix performance issues on edit node modal

* Fixed scroll overflow issues on tweaksComponent

* Revert "Revert "refactor: update template api, handleonnewvalue and handlenodeclass hooks (#2628)""

This reverts commit 236ae82cabba2fa1128f498d781099facd222b57.

* 📝 (tweaksTest.spec.ts): remove redundant code and improve readability by simplifying the interaction with elements in the test case

* added custom id for tests

*  (frontend): Add unique id prop to input components for better testability and accessibility.

 (Hierarchical Tasks Agent.spec.ts): Update dropdown element IDs to improve clarity and consistency
 (Memory Chatbot.spec.ts): Update dropdown element IDs to improve clarity and consistency
 (Sequential Tasks Agent.spec.ts): Update dropdown element IDs to improve clarity and consistency
 (chatInputOutputUser-shard-0.spec.ts): Update dropdown element IDs to improve clarity and consistency
 (chatInputOutputUser-shard-1.spec.ts): Update dropdown element IDs to improve clarity and consistency
 (chatInputOutputUser-shard-2.spec.ts): Update dropdown element IDs to improve clarity and consistency
 (decisionFlow.spec.ts): Update input list element IDs to improve clarity and consistency
 (decisionFlow.spec.ts): Update prompt area element IDs to improve clarity and consistency
 (decisionFlow.spec.ts): Update dropdown element IDs to improve clarity and consistency
 (freeze-path.spec.ts): Update dropdown element IDs to improve clarity and consistency
 (generalBugs-shard-0.spec.ts): Update dropdown element IDs to improve clarity and consistency
 (generalBugs-shard-1.spec.ts): Update dropdown element IDs to improve clarity and consistency
 (generalBugs-shard-3.spec.ts): Update dropdown element IDs to improve clarity and consistency

🔧 (logs.spec.ts, textInputOutput.spec.ts): update dropdown test selectors to match changes in the frontend codebase

* Fixed prompt not holding the value when validating

* Fixed range spec on int component

* Fixed OpenAI Model max tokens range spec

*  (dropdownComponent.spec.ts): Update dropdown test cases to use more descriptive test IDs for better clarity and maintainability
📝 (fileUploadComponent.spec.ts): Add explicit wait for "Run Flow" button to ensure it is loaded before clicking
📝 (folders.spec.ts): Update file path in readFileSync function to use an absolute path for better reliability
📝 (freeze-path.spec.ts): Refactor test code to remove commented out code and improve readability by using more descriptive test IDs and removing unnecessary code snippets

 (inputListComponent.spec.ts): Update test file to use consistent naming convention for input elements in the InputListComponent
📝 (intComponent.spec.ts): Refactor test file to use consistent naming convention for input elements in the IntComponent

 (nestedComponent.spec.ts): Update test steps and interactions for nestedComponent to improve test coverage and accuracy.

📝 (promptModalComponent.spec.ts): Update test selectors for prompt modal component to improve consistency and readability
📝 (textAreaModalComponent.spec.ts): Update test selectors for text area modal component to improve consistency and readability
📝 (toggleComponent.spec.ts): Update test selectors for toggle component to improve consistency and readability

* 🐛 (intComponent.spec.ts): fix incorrect value comparison in test for IntComponent
🐛 (intComponent.spec.ts): fix missing test step for clicking on a specific element in IntComponent test

* 📝 (Vector Store.spec.ts): increase timeout for waiting for "built successfully" text to improve test reliability and prevent false negatives

* Fixed folders test

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
2024-07-26 18:32:24 +02:00
Lucas Oliveira
83910866e9
fix: memories not visible when sending from outside io modal (#2987)
* Fixed names and unused params

* Added refetch of memories
2024-07-26 15:07:40 +00:00
Nicolò Boschi
9ac861da2f
feat: migrate transactions to sql database (#2915)
* feat: migrate transactions to sql database

* feat: migrate transactions to sql database

* feat: migrate transactions to sql database

* feat: migrate transactions to sql database

* feat: migrate transactions to sql database

* feat: migrate transactions to sql database

* [autofix.ci] apply automated fixes

* remove useless

* remove useless

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-07-26 14:57:38 +00:00
Ítalo Johnny
169664cf1b
fix: environment variable initialization issue (#2971)
* feat: apply singleton pattern to class

* fix: remove code that overrides environment vars

* feat: remove unused imports
2024-07-26 13:39:23 +00:00
Nicolò Boschi
53084bcf92
feat: expose main_version on /version endpoint (#2944) 2024-07-26 13:56:18 +02:00
YAMON.IO
cba0ae4b86
docs: update korean readme (#2970) 2024-07-26 05:56:15 -03:00