Commit graph

5,608 commits

Author SHA1 Message Date
Lucas Oliveira
0b15084412
fix: update all outdated components at once (#4763)
* update components to update

* Added update all components

* Update the logic for updating all components

* Added dismiss functionality

* Removed node from components to update when updated

*  (list/index.tsx): add data-testid attribute to list card component for testing purposes

 (reactflow): create edges to connect different nodes for data flow in the chatbot application.

📝 (Prompt): Update prompt template with dynamic variables for better customization and flexibility.

📝 (code): update code in ChatInput component to import necessary modules and classes for chat inputs handling
♻️ (code): refactor code in ChatInput component to improve readability and maintainability by organizing imports and defining class attributes clearly

📝 (input.py): Update input fields display names and information for better clarity and understanding
📝 (input.py): Update file input field to support multiple file types and be a list of files
📝 (input.py): Update sender options to be more descriptive as "Machine" and "User" instead of constants
📝 (input.py): Update sender_name input field information to clarify it is the name of the sender
📝 (input.py): Update session_id input field information to explain its purpose and usage
📝 (input.py): Update files input field information to clarify it is for files to be sent with the message
📝 (input.py): Update input_value input field information to clarify it is the text message to be passed as input
📝 (input.py): Update should_store_message input field information to explain its purpose of storing messages in history
📝 (input.py): Update message_response method to handle storing messages based on conditions and updating status

📝 (metadata): Update metadata fields in ChatInput component for better clarity and consistency
📝 (OpenAIModel): Add OpenAI API Key field to the template for configuring the OpenAI model usage

📝 (LCModelComponent): Update OpenAIModelComponent inputs and add support for new features and configurations to enhance text generation capabilities.

📝 (file.py): Update comments and documentation for better clarity and understanding of the code
♻️ (file.py): Refactor code to improve readability and maintainability by restructuring the logic and removing unnecessary code blocks

📝 (schema.json): Update schema for the Output of the model to enable JSON mode and improve functionality
📝 (ChatOutput): Display a chat message in the Playground for better user interaction and experience

📝 (ChatOutput): Update ChatOutput class inputs and outputs structure for better organization and readability.

 (frontend): Add a new file 'outdated_flow.json' to store outdated flow data for frontend tests.

 (outdated-actions.spec.ts): add test to ensure user can update outdated components in the application

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* fix tests

---------

Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
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-11-25 05:15:50 -08:00
anovazzi1
ca2aa082df
fix: Improve timeout handling in Blog Writer integration test (#4811)
refactor: improve timeout handling in Blog Writer integration test
2024-11-25 12:53:15 +00:00
anovazzi1
647ceeaeeb
refactor: improve waiting logic in Basic Prompting test (#4770) 2024-11-23 16:25:53 -08:00
anovazzi1
eb960cfda1
refactor: improve test speed for Blog Writer integration (#4771) 2024-11-23 16:25:32 -08:00
anovazzi1
94bdc8e305
refactor: improve timeout handling in Document QA test (#4798)
refactor: Improve page loading and timeout handling in Document QA test
2024-11-23 17:24:42 +00:00
anovazzi1
598832f4f6
refactor: Improve decision flow and remove timeouts (#4785)
* rome timeouts from test main code

* improve decision flow

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-11-23 09:08:35 -08:00
Lucas Oliveira
1120915577
fix: clean invisible edge when toggling tool mode (#4795)
* Fix invisible edges bug

* Removed elevate edges on select

* Fix style of reconnecting edge
2024-11-23 04:53:15 -08:00
Csongor Barabasi
ef2199b317
feat: LLM routing integration via NotDiamond (#4543)
* WIP

* Integrate Notdiamond via API call

* Fix frontend lock

* Update

* Update ND integration to use HandleInput for LLM models

* Move NotDiamond out into bundles and add fallback call

* Update src/backend/base/langflow/components/notdiamond/notdiamond.py

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

* Update src/backend/base/langflow/components/notdiamond/notdiamond.py

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

* Update src/frontend/src/icons/NotDiamond/NotDiamondIcon.jsx

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

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-11-23 12:20:53 +00:00
Lucas Oliveira
39c34fc376
fix: add underline to name of component to make it look clickable on error (#4796)
Fixed underline

Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
2024-11-22 16:25:48 -06:00
Cristhian Zanforlin Lousa
b3181ce68a
fix: Implement useFlowUpdate hook and refactor node code management (#4783)
* 📝 (use-patch-update-flow.ts): export IPatchUpdateFlow interface for external use
 (use-update-node-code.tsx): add useFlowUpdate hook to update node in flow based on componentId and data
🔧 (index.tsx): import usePatchUpdateFlow and useFlowUpdate hooks, update node in flow when code is updated in CodeAreaModal
🔧 (index.tsx): pass componentId to CodeAreaModal to update node in flow based on componentId
🔧 (index.ts): add componentId prop to codeAreaModalPropsType for CodeAreaModal component
🔧 (index.ts): add componentId prop to codeAreaModalPropsType for CodeAreaModal component

* 🔧 (use-update-node-code.tsx): Remove unused code related to updating node code in a flow
🔧 (index.tsx): Remove unused import and function related to updating node code in a flow, refactor code to directly update node data in the nodes array instead of using a separate function.

* 📝 (use-patch-update-flow.ts): remove unnecessary export keyword from IPatchUpdateFlow interface to follow module structure conventions

* 📝 (codeAreaModal/index.tsx): remove unused import and variable 'usePatchUpdateFlow' to clean up code and improve maintainability
2024-11-22 13:19:28 -08:00
Cristhian Zanforlin Lousa
214d5a9f07
feat: add icons to API components and update Python icon SVG (#4794)
* add icons: wikipedia, serpapi, searchapi, glean, python, bing

* update glean icon

* formatting files

*  (create_data.py): add an icon attribute with the value "ListFilter" to improve visual representation of the component
📝 (python_code_structured_tool.py): update the icon attribute value from "🐍" to "Python" for better clarity and consistency

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2024-11-22 13:13:13 -08:00
Cristhian Zanforlin Lousa
0a42341a5c
feat: disable browser autocomplete on popover input fields (#4573)
*  (inputComponent): add 'autoComplete="off"' attribute to input components in popover and popoverObject to disable browser auto-fill feature

*  (dropdownComponent/index.tsx): add autoComplete="off" attribute to input field to disable browser autocomplete feature

*  (flowSidebarComponent/index.tsx): add 'autoComplete="off"' attribute to the search input field to disable browser autocomplete feature

* 📝 (inputComponent): Remove autoComplete="off" attribute from Input components to enable browser autocomplete feature
📝 (ui/input): Remove autoComplete="off" attribute from input element to enable browser autocomplete feature
📝 (extraSidebarComponent): Remove autoComplete="off" attribute from input element to enable browser autocomplete feature
📝 (flowSidebarComponent): Remove autoComplete="off" attribute from Input component to enable browser autocomplete feature

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2024-11-22 20:13:49 +00:00
Lucas Oliveira
f440552ee9
fix: do not render page while examples are loading (#4768)
* Added check if examples load before loading all pages

* [autofix.ci] apply automated fixes

---------

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-11-22 10:07:16 -08:00
Cristhian Zanforlin Lousa
5ed32cb573
feat: Add PlaygroundButton component to flow toolbar (#4712)
*  (playground-button.tsx): Add a new PlaygroundButton component to the flowToolbarComponent to handle the display of the Playground button based on the presence of Chat Input or Chat Output components.
📝 (index.tsx): Import and use the PlaygroundButton component in the FlowToolbar component to replace the previous implementation of the Playground button display.
🔧 (applies.css): Add styling for the playground-btn-flow-toolbar class to ensure consistent styling for the Playground button in the toolbar.

* 📝 (playground-button.tsx): update import path for IOModal to point to the newModal file instead of the old one
2024-11-22 15:30:38 +00:00
anovazzi1
e208776ea2
feat: Add FolderSync icon to UpdateDataComponent in update_data.py (#4753)
* refactor: Add FolderSync icon to nodeIconsLucide in styleUtils.ts

* feat: Add FolderSync icon to UpdateDataComponent in update_data.py

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-11-22 05:37:50 -08:00
Cristhian Zanforlin Lousa
d31fa35586
feat: add Google icons to search-related components (#4760)
 (google_search_api.py): Add icon property to GoogleSearchAPIComponent for better visualization in the UI
 (google_serper_api.py): Add icon property to GoogleSerperAPIComponent for better visualization in the UI
📝 (styleUtils.ts): Add GoogleSearchAPI and GoogleSerperAPI icons to nodeIconsLucide for consistent styling in the frontend.
2024-11-22 09:34:00 -03:00
Cristhian Zanforlin Lousa
13321a3635
feat: rename MetaphorToolkit file to ExaSearchToolkit and update component icons (#4754) 2024-11-22 03:31:27 +00:00
anovazzi1
efca9f9aeb
refactor: Improve componentHoverAdd.spec test (#4608) 2024-11-22 00:14:45 -03:00
anovazzi1
20f26a9ccf
fix: Improve waiting logic in tweksTest.spec.ts (#4674)
Improve the waiting logic in the tweksTest.spec.ts file to ensure that the necessary elements are loaded before interacting with them. This includes using the waitForSelector function with appropriate timeouts for the modal and popover elements.
2024-11-22 02:03:51 +00:00
Lucas Oliveira
b1a552fa9e
fix: refactor get all to fix types not being fetched before checking for outdated components (#4762)
* Added use get types to fetch types from backend using tanstack

* Updated typesStore to use new set types

* Updated project to not use getTypes anymore

* deleted unused getTypes

* add tests

* [autofix.ci] apply automated fixes

* fix tests

---------

Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
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-11-21 17:01:37 -08:00
Cristhian Zanforlin Lousa
226453a606
refactor: Replace InputComponent with Select dropdown (#4719)
* 🔧 (nodeToolbarComponent/index.tsx): improve positioning logic for node toolbar based on scale and tool mode to enhance user experience

*  (GlobalVariableModal.tsx): Refactor type selection in GlobalVariableModal to use a dropdown select component for better user experience and consistency.

* Revert "🔧 (nodeToolbarComponent/index.tsx): improve positioning logic for node toolbar based on scale and tool mode to enhance user experience"

This reverts commit 322ba353a6984fcf870cba8c82c26689381842da.

*  (GlobalVariableModal.tsx): Add data-testid attribute to SelectTrigger for testing purposes
🔧 (globalVariables.spec.ts, userSettings.spec.ts): Update test scripts to interact with the SelectTrigger using data-testid attribute for consistency and improved testing accuracy

* 📝 (userSettings.spec.ts): remove commented out code for focusElementsOnBoard function to improve code readability and maintainability
2024-11-21 16:45:01 -08:00
Cristhian Zanforlin Lousa
76890822b6
chore: remove legacy component checks and alerts (#4757)
📝 (PageComponent/index.tsx): Remove redundant useEffect hook that sets notice data for old components
📝 (flowStore.ts): Remove unnecessary check for old components in selection nodes in useFlowStore function
2024-11-21 16:44:44 -08:00
Lucas Oliveira
725a256285
fix: remove useSidebar to fix errors of SidebarWrapper when opening playground page (#4767)
* Added open to data of wrapper

* Fix PageComponent and Header to not use useSidebar anymore
2024-11-21 16:43:58 -08:00
Lucas Oliveira
69465368c1
fix: update edge z index when node is selected (#4765)
Fixed edges zindex when node selected
2024-11-21 16:43:40 -08:00
anovazzi1
6737368073
fix: Improve wait time in saveComponents.spec.ts (#4673)
Improve the wait time in the saveComponents.spec.ts file to ensure that the necessary elements are loaded before interacting with them. This helps prevent potential errors and improves the reliability of the test.
2024-11-21 16:40:39 -08:00
Lucas Oliveira
e5f73c5080
fix: update design of update component (#4761)
* Added warning color

* Implemented more colors

* Implemented warning button variant

* Added warning section to node

* Removed warning button and added warning outline to outdated components

* Added negative margin top to node for it to not move when updatable

* Fixed border to be consistent

* removed unused code

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-11-21 16:40:25 -08:00
Lucas Oliveira
f0febbcd40
fix: changed tooltip position on playground to improve visibility, fixed color of theme switcher on light mode (#4766)
* Implemented avoidCollisions on ShadTooltip

* Added type for avoidCollisions

* Changed tooltip position for buttons on IOModal

* Fix color of light theme switcher
2024-11-21 16:40:07 -08:00
Cristhian Zanforlin Lousa
3160c54102
fix: conditionally enable useGetFoldersQuery in AppInitPage after initial fetch (#4773)
 (AppInitPage/index.tsx): add support for refetching folders data when isFetched is true to keep data up to date
2024-11-21 21:31:19 +00:00
anovazzi1
8ebe1086d2
refactor: improve freeze-path.spec.ts and freeze.spec.ts files (#4618)
* refactor: Improve time and use waitForSelector in freeze-path.spec.ts

* refactor: Improve time and use waitForSelector in freeze-path.spec.ts

* fromat code

* Refactor freeze.spec.ts: Remove unnecessary code
2024-11-21 16:46:44 -03:00
Lucas Oliveira
c08d237e14
fix: changed width of sidebar to be consistent across application (#4759)
Changed width of sidebar to be 280
2024-11-21 09:45:34 -08:00
Gabriel Luiz Freitas Almeida
12407f00af
fix: Indent JSON output for exported flow data (#4750)
Indent JSON output for exported flow data in reactflowUtils.ts
2024-11-21 09:27:24 -08:00
Mendon Kissling
3e57340cc4
Fix: simple agent template notes (#4709)
* delete-youtube-template

* update-simple-agent

* update-description

* docs-package-and-yarn-lock

* update-edges

* descriptions-and-markdown

* readme

* tags

* update

hotfix for the tool_kit mode component update

* Update Simple Agent.json

added project tags

* Update Simple Agent.spec.ts

Playwright test update

* Update Simple Agent.spec.ts

* Update starter-projects.spec.ts

remove  youtube flow  from templates in test

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2024-11-20 15:24:37 -05:00
Deon Sanchez
d5010c5d0b
refactor: Improve GitHub link styling in AppHeader component (#4737) 2024-11-20 10:04:54 -07:00
anovazzi1
9ceb18ad4f
fix: reset tool mode after update component code (#4723)
fix bug related to tool mode
2024-11-19 23:28:00 +00:00
anovazzi1
ebe4f3470c
refactor: Improve time and use waitForSelector in globalVariables.spec.ts (#4619) 2024-11-19 14:04:08 -08:00
Lucas Oliveira
c9e0d5e4ba
fix: updated node toolbar to be more stable on zoom, fix success and error component tooltips, unselect nodes on flow opening (#4610)
* Unselect nodes and edges on enter

* Start with viewport fit

* Fix run component tooltip to match error and success

* Update scrollbar design

* Added node toolbar without portal to match the width of the node

* Updated color of scrollbar

* Updated NoteNode to have same behavior as GenericNode

* Updated logic for tests to pass

* Fix fitview to only occur when nodes are present

* Update z index of resize handle

* Sticky notes test fix

* [autofix.ci] apply automated fixes

* freeze test fixed

---------

Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
2024-11-19 13:54:49 -08:00
anovazzi1
39cec36641
fix: fix overflow for lists in markdown render (#4720)
* feat: Add support for ordered and unordered lists in ContentDisplay and ChatMessage components to prevent overflow
2024-11-19 21:28:39 +00:00
Cristhian Zanforlin Lousa
9e8715cf4c
fix: enhance folder download endpoint with zip file support (#4706)
* expanding download folder to zip file

* run formatter

* Update src/backend/base/langflow/api/v1/folders.py

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

* changing model to flowRead

* run formatter

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-11-19 18:41:37 +00:00
Cristhian Zanforlin Lousa
35392078ff
fix: Add unique keys to Badge components in HandleTooltipComponent (#4688)
 (HandleTooltipComponent/index.tsx): add unique key to each tooltip item to prevent React warning about missing key prop
2024-11-19 06:00:20 -08:00
Cristhian Zanforlin Lousa
a76e43fd74
feat: Add post-update callback to setNode and improve node internals handling (#4696)
*  (use-handle-new-value.tsx): Introduce useUpdateNodeInternals hook from reactflow to update node internals when handling new values
♻️ (flowStore.ts): Refactor set method in useFlowStore to accept a callback function to be executed after updating nodes
📝 (flowStore.ts): Update FlowStoreType to include a callback function in the update method signature

* 📝 (flowStore.ts): add comment to explain deferring callback execution to ensure it runs after state updates are fully applied
2024-11-19 05:59:48 -08:00
anovazzi1
d28c7f4f30
fix: removes delay for running flow skeleton (#4679)
Update rendering logic for chat messages && running flow
2024-11-19 05:56:30 -08:00
anovazzi1
e6cd335b1c
refactor: time and use waitForSelector in filterSidebar.spec.ts (#4609)
* refactor: Improve time and use waitForSelector in filterSidebar.spec.ts

* refactor: Improve time and use waitForSelector in filterSidebar.spec.ts
2024-11-18 17:08:26 -08:00
anovazzi1
4965971901
refactor: Improve performance in logs.spec.ts and format code (#4671)
* improve performance in logs

* format code
2024-11-18 17:08:04 -08:00
anovazzi1
cd2517f7e2
refactor: improve tests for group and keyBoardComponentSearch tests (#4621)
* refactor: Remove unnecessary wait in group.spec.ts

* refactor: Improve keyboard component search tests

Improve the keyboard component search tests by using waitForSelector instead of waitForTimeout for better reliability and stability.
2024-11-18 14:09:24 -08:00
anovazzi1
a0cd179258
refactor: Improve time and use waitForSelector in folder tests (#4614)
* refactor: Improve time and use waitForSelector in folder tests

* add comment for documentation

* Refactor componentHoverAdd test to use opacity check instead of exact value
2024-11-18 13:03:06 -08:00
Deon Sanchez
b9ffce2a8f
fix: Update background color in FlowMenu dropdown (#4681)
Updated the background color in the FlowMenu dropdown to match the dark theme background. This ensures a consistent and visually appealing user experience.

Refactor the code in `src/frontend/src/components/appHeaderComponent/components/FlowMenu/index.tsx` to change the `DropdownMenuContent` class from `bg-white` to `bg-background`.
2024-11-18 20:43:11 +00:00
anovazzi1
596c27b23e
fix: error on fetch for no headers on request (#4624)
* fix: error on fetch for no headers on request
2024-11-18 16:45:05 +00:00
Cristhian Zanforlin Lousa
af1a8b7944
fix(TextAreaComponent): Update focus state padding and icon visibility (#4630)
🔧 (textAreaComponent/index.tsx): remove unnecessary conditional class 'opacity-0' when component is focused
2024-11-18 16:02:57 +00:00
Lucas Oliveira
2881346400
fix: change color of output inspector when tool mode, change fuzzy search order, fix image download and some minor issues (#4625)
* Fixed output and input radius and icons colors when on tool mode

* Replaced output format to be camel case

* Fix expand not appearing after minimize and change code

* Refactor chatView component and add FlowRunningSqueleton

- Refactor chatView component to import useMemo from react
- Add FlowRunningSqueleton component to display flow running indicator
- fix gagging on flow running

* format code

* Fixed fuzzy search order

* remove console log

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
2024-11-15 10:13:12 -06:00
Deon Sanchez
88c059677e
refactor: Update layout in emptyFolder and homePage components (#4623) 2024-11-15 02:30:56 -07:00