fix(codeTabsComponent): fix logic for setting load_from_db property in template object
fix(EditNodeModal): fix logic for setting load_from_db property in template object
fix(globalVariablesPage): fix logic for deleting global variable by id
feat(globalVariables): add getVariableId function to retrieve variable id by key
feat(types): add getVariableId function to GlobalVariablesStore type
feat(codeTabsComponent): add support for global variables in InputComponent and DictComponent
feat(inputComponent): remove dependency on globalVariablesStore and use options prop instead
feat(editNodeModal): add support for global variables in InputComponent
This commit adds support for global variables in the parameter input field of the ParameterComponent. It imports the useGlobalVariablesStore hook from the globalVariables store and uses it to access the globalVariablesEntries state. It also imports the setNoticeData function from the alert store to display a notice when a global variable is used as a parameter value.
In the onChange event handler of the input field, the commit checks if the entered value is a global variable by comparing it with the globalVariablesEntries array. If it is a global variable, the commit sets the notice data to inform the user that the real value will be updated during runtime. Additionally, the commit marks the parameter as a global variable by setting the load_from_db property of the template object to true in the setNode function.
feat(globalVariables.ts): add functions to add and remove global variables in the store
feat(globalVariables/index.ts): add types for the new functions in the global variables store
feat(App.tsx): add support for fetching global variables and setting them in the global variables store
feat(App.tsx): add useGlobalVariablesStore hook to access and set global variables in the component
feat(addNewVariableButton.tsx): create a new component for adding a new variable
feat(GlobalVariablesPage.tsx): create GlobalVariablesPage component to display and manage global variables
feat(routes.tsx): add route for GlobalVariablesPage component
feat(globalVariables.ts): update globalVariables store to include globalVariablesEntries array and modify setGlobalVariables function to set both globalVariables and globalVariablesEntries
feat(index.ts): add types for globalVariables store
This PR updates Langchain to 0.1.* and move components previously
created automatically to start using the CustomComponent framework.
This will improve maintainability and move Langflow to be closer to the
framework.