Commit graph

5,781 commits

Author SHA1 Message Date
Cristhian Zanforlin Lousa
435d86067c
refactor: improve conditional rendering on panel buttons (#5365)
add render condition on modal buttons
2024-12-19 18:35:11 +00:00
VICTOR CORREA GOMES
81da524375
feat(components): add LangWatch evaluator component - New Bundle (#4722)
* feat(components): add LangWatch evaluator component

* feat(langwatch): add tracing integration and custom endpoint support

* style(langwatch): update component name and svg icon

* [autofix.ci] apply automated fixes

* Clean code with code formatting styles

* Add contexts and expected_output also as dynamic fields

* refactor(langwatch): remove redundant logging and improve type hinting

- Removed unnecessary logger exception calls in error handling sections to streamline the code.
- Added type hinting for the trace_id assignment to enhance code clarity and maintainability.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Rogério Chaves <rogeriochaves@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-12-19 18:26:10 +00:00
Cristhian Zanforlin Lousa
fa46786f47
fix: remove redundant memoization from parameter render components to fix input cursor position (#5347)
 (parameterRenderComponent/index.tsx): Refactor ParameterRenderComponent to improve code readability and maintainability. Remove unnecessary memoization and useCallback hooks, simplify component rendering logic, and optimize component structure.
2024-12-19 18:19:18 +00:00
Lucas Oliveira
c0ffb86c13
fix: make search on sidebar shortcut not be triggered inside inputs (#5345)
* added search components on sidebar shortcut

* Implemented search components sidebar shortcut on flow sidebar component

---------

Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
2024-12-19 17:27:03 +00:00
Gabriel Luiz Freitas Almeida
be612eb6d3
test: Update test descriptions to indicate requirement for store API key (#5359)
* test: update test descriptions to indicate requirement for store API key

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-19 16:37:28 +00:00
Cristhian Zanforlin Lousa
ba7380824c
test: Enhance tool mode spec with zoom controls and drag-drop functionality (#5363)
 (tool-mode.spec.ts): add zoomOut utility function to enable zooming out on the page
📝 (tool-mode.spec.ts): update test case to include zooming out functionality using the new zoomOut utility function
2024-12-19 06:19:17 -08:00
Ítalo Johnny
2db5f93bd4
feat!: rename the type BaseChatMessageHistory to Memory (#5190)
* chore: rename the type BaseChatMessageHistory to Memory

* Added Memory type with same color as BaseChatMessageHistory

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Lucas Oliveira <lucas.edu.oli@hotmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-18 22:10:01 +00:00
VICTOR CORREA GOMES
e79b1649a5
feat: add tool_mode parameter to MessageTextInput in ID Generator Component (#5311)
* feat: add tool_mode parameter to MessageTextInput for enhanced functionality

* fix: update tool mode test to ensure correct functionality and response handling

- Adjusted test to wait for the "Toolset" element to appear before asserting its count.
- Modified code handling to replace "tool_mode=True" with "tool_mode=False" and verified the updated code is different.
- Added response check for the custom component to ensure a successful status (200) after submission.

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-12-18 21:54:13 +00:00
Lucas Oliveira
7d6d41aa87
refactor: update ReactFlow to v12 (#5317)
* Added xyflow and updated imports

* Fix changing node.width to node.measured.width

* Updated NodeType to follow new API

* Fixed note node data type

* Created AllNodeType to contain note node type

* Changed flow types to follow new type from reactflow 12

* Updated flowStore to work with new types

* Updated flowStore and reactFlowUtils to work with custom edge type

* Updated updateAllNodes to use new type

* Updated PageComponent to follow new names for node dragging and edge reconnect

* Made selected prop be optional

* Changed reactFlowInstance to have nodes and edges type

* Updated updateAllComponent to follow new types

* Updated ReactFlowUtils with new types

* Updated reactFlowUtils type

* Updated all reactFlowUtils to be generic

* Updated handleRenderComponent with Connection type

* Updated node description and name with null checks for names

* Added check if node is genericNode on nodeOutputField

* Updated note node type

* Updated nodestatus with selected null check

* Updated notenode with new node type

* Update NodeType imports to be AllNodeType

* Fix more lint issues

* Fixed react flow button css

*  (freeze.spec.ts): add zoomOut utility function to handle zooming out in tests for better code reusability and readability
📝 (decisionFlow.spec.ts): import zoomOut utility function to handle zooming out in tests for better code reusability and readability
📝 (zoom-out.ts): create zoomOut utility function to handle zooming out in tests for better code reusability and readability

* 🐛 (generalBugs-shard-10.spec.ts): fix test to wait for the element with class "border-ring-frozen" to be visible before asserting its count

* 📝 (generalBugs-shard-10.spec.ts): remove unnecessary locator click on element with id 'react-flow-id' to improve test reliability and maintainability

* 📝 (SelectionMenuComponent): add data-testid attribute to differentiate error-group-node and group-node components
📝 (similarity.spec.ts): refactor dragTo calls to use targetPosition for better accuracy, replace zoom_out clicks with zoomOut function, updateOldComponents function to handle outdated components
📝 (generalBugs-shard-5.spec.ts): replace zoom_out clicks with zoomOut function, add waitForSelector for group-node before clicking, remove unnecessary mouse interactions
📝 (intComponent.spec.ts): replace zoom_out clicks with zoomOut function, click on div-generic-node component
📝 (keyPairListComponent.spec.ts): click on div-generic-node component, adjustScreenView function call
📝 (nestedComponent.spec.ts): remove unnecessary click on react-flow-id element
📝 (generalBugs-shard-7.spec.ts): replace zoom_out clicks with zoomOut function

*  (stop-building.spec.ts): Add new utility functions to improve code modularity and readability
🔧 (stop-building.spec.ts): Refactor drag and drop operations to use utility functions for better maintainability
🔧 (stop-building.spec.ts): Refactor zoom out operations to use utility function for consistency
🔧 (stop-building.spec.ts): Refactor component positioning operations to use utility functions for clarity
🔧 (stop-building.spec.ts): Refactor outdated components and filled API keys handling to use utility functions for reusability
🔧 (stop-building.spec.ts): Refactor fit view operation to use utility function for consistency

*  (generalBugs-shard-9.spec.ts): refactor test to use initialGPTsetup function for GPT setup instead of manual steps to improve code readability and maintainability

*  (store-shard-2.spec.ts): Increase timeout for clicking "api-key-button-store" to 200000ms for better test stability
 (deleteComponents.spec.ts, deleteFlows.spec.ts, store-shard-1.spec.ts, store-shard-3.spec.ts): Increase timeout for clicking "api-key-button-store" to 200000ms for better test stability
 (store-shard-1.spec.ts, store-shard-3.spec.ts): Remove unnecessary waitForSelector and add timeout of 200000ms for clicking "api-key-button-store" for better test stability

*  (fileUploadComponent.spec.ts): update dragTo method calls with targetPosition option to specify the position of the drag action

*  (decisionFlow.spec.ts): add explicit wait for an element to be attached before interacting with it to improve test reliability
🐛 (sticky-notes.spec.ts): fix test by adding keyboard press to simulate pressing the Escape key to close a modal before checking text length

*  (sticky-notes.spec.ts): update assertion to use 'toHaveCount' matcher for improved test readability and reliability

* Added function to make controls horizontal

*  (sticky-notes.spec.ts): update selector for textMarkdown to improve test reliability and readability

---------

Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
2024-12-18 19:40:13 +00:00
Gabriel Luiz Freitas Almeida
1cda13d833
tests: Update tool mode test to use URL component instead of Astra DB (#5329)
fix: update tool mode test to use URL component instead of Astra DB
2024-12-18 04:58:47 -08:00
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
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
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
anovazzi1
ba75a15548
Refactor: update selectItem component and remove unused imports (#5124) 2024-12-17 02:12:03 +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
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
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
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
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
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
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
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
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
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
Cristhian Zanforlin Lousa
3e099ac72e
fix: remove unused import and simplify key generation in SideBarFoldersButtonsComponent (#5227)
* ♻️ (index.tsx): Remove unused getRandomKeyByssmm function to clean up code and improve maintainability
📝 (index.tsx): Update key prop in SidebarMenuItem component to use index instead of getRandomKeyByssmm function for better performance and readability

* 📝 (select-options.tsx): Refactor SelectOptions component to improve readability and maintainability by restructuring the JSX elements and adding proper classNames
📝 (index.tsx): Introduce state for hoveredFolderId to track the currently hovered folder in the SideBarFoldersButtonsComponent for better user interaction and visual feedback. Update SidebarMenuItem to include onMouseEnter and onMouseLeave events to set and clear the hoveredFolderId state respectively. Update SidebarMenuButton className to conditionally apply background color based on the hoveredFolderId state.
2024-12-12 15:42:09 +00:00
Vinícios Batista da Silva
3f9dab912c
feat: Restructure Youtube Transcripts component (#5118)
* feat: Restructure Youtube Transcripts component

- Changed the return type of the `build_youtube_transcripts` method from `Data` to `Message`.
- Updated the output name from "Data" to "Transcription" to reflect the new return type.
- Modified the return statements in `build_youtube_transcripts` to return `Message` objects instead of `Data`.

Co-authored-by: Vinícios Batista da Silva <vinicios.batsi@gmail.com>

* test(youtube-transcripts): enhance test stability by updating component ID and improving interaction checks

- Modified the component id in the test script to match the changes in the Youtube Transcripts component

Co-authored-by: Vinícios Batista da Silva <vinicios.batsi@gmail.com>

* fix: Fixed lint on line 180-181
Co-authored-by: Vinícios Batista da Silva <vinicios.batsi@gmail.com>

---------

Co-authored-by: Eric Hare <ericrhare@gmail.com>
2024-12-11 20:27:19 +00:00
Cristhian Zanforlin Lousa
5cc331c4bc
test: increase timeout in Market Research tests (#5208)
 (Market Research.spec.ts): Remove unused functions and imports to clean up the code and improve maintainability
🔧 (Market Research.spec.ts): Increase timeout for page.waitForSelector to prevent timeout issues during test execution
2024-12-11 18:01:57 +00:00
Cristhian Zanforlin Lousa
dfcb3a5b04
fix: Resolve DOM validation & React lifecycle warnings (#5205)
📝 (frontend): Update AlertDropdown component to use 'asChild' prop for PopoverTrigger
📝 (frontend): Refactor ShadTooltip component to use forwardRef and add displayName
📝 (frontend): Update AppHeaderComponent to remove unnecessary aria-hidden attribute
📝 (frontend): Refactor SelectOptions component to improve code structure and readability
📝 (frontend): Update SideBarFoldersButtonsComponent to add getRandomKeyByssmm function and improve code structure

📝 (AWS.jsx): Update fill color condition to use stringToBool function for props.isdark
📝 (index.tsx): Convert isdark value to string before passing it to SvgAWS component
📝 (AstraDB.jsx): Update fill color condition to use stringToBool function for props.isdark

 (icons): Convert 'isdark' variable to string to ensure consistent type
♻️ (icons): Refactor 'fill-rule' and 'clip-rule' attributes to 'fillRule' and 'clipRule' for consistency
♻️ (nvidia): Refactor 'enable-background' attribute to 'enableBackground' for consistency
♻️ (nvidia): Refactor 'fill' attribute to use 'stringToBool' function for consistent boolean conversion
📝 (utils): Add 'stringToBool' function to convert string to boolean for reusability
2024-12-11 17:48:12 +00:00
anovazzi1
67abb679b3
fix: Refactor CSS class in newChatMessage component preventing wrong position of bullet points (#5206)
* refactor: Update CSS class in newChatMessage component
2024-12-11 16:42:30 +00:00
anovazzi1
5c334a74b3
refactor: Add displayLoadingMessage flag to MessagesStoreType and adjust chat view layout (#5062)
* refactor: Adjust chat view layout for responsiveness

The code changes in this commit adjust the layout of the chat view component to improve responsiveness. Specifically, the CSS classes for the chat container and input container have been modified to make them responsive on different screen sizes. This ensures that the chat view is displayed properly on both desktop and mobile devices.

Refactoring the layout in this way enhances the user experience by making the chat view more accessible and user-friendly across different devices.

* [autofix.ci] apply automated fixes

* feat: Add displayLoadingMessage flag to MessagesStoreType

* feat: Add displayLoadingMessage flag to MessagesStoreType

* feat: Add useMessagesStore to flowStore for displaying loading message

* refactor: Adjust chat view layout for responsiveness and loading message display

* [autofix.ci] apply automated fixes
2024-12-11 14:04:55 +00:00
Cristhian Zanforlin Lousa
5b29c32570
test: Add test IDs and improve UI wait handling in frontend tests (#5188)
📝 (header/index.tsx): add data-testid attribute to new-project-btn button for testing purposes
📝 (dragAndDrop.spec.ts): add comments and improve readability of the test code
📝 (lock-flow.spec.ts): add comments and improve readability of the test code, ensure UI updates are properly handled
2024-12-10 18:59:08 +00:00
Lucas Oliveira
db33b15ade
fix: changed truncation style for big folder and flow names on header (#5106)
Fix truncation and add width relation between name and folder name
2024-12-10 16:23:43 +00:00
Cristhian Zanforlin Lousa
22d8ac1da8
test: enhance drag-and-drop reliability and update test asset paths (#5186)
 (dragAndDrop.spec.ts): Update file paths for drag and drop tests to use the correct directory structure
🐛 (generalBugs-shard-12.spec.ts): Adjust mouse movement coordinates to fix drag and drop functionality
🐛 (generalBugs-shard-12.spec.ts): Update drag and drop logic to use hover and click actions for better test accuracy
🐛 (generalBugs-shard-3.spec.ts): Modify adjustScreenView function to include zoom level parameter for better control
🐛 (generalBugs-shard-3.spec.ts): Add missing waitForSelector for fit_view element to ensure visibility before clicking
🐛 (generalBugs-shard-7.spec.ts): Reduce timeout for blank-flow element to improve test speed
🐛 (generalBugs-shard-7.spec.ts): Add waitForSelector for fit_view and zoom_out elements to ensure visibility before interacting with them
2024-12-10 15:45:18 +00:00
Cristhian Zanforlin Lousa
ab68e13493
test: Add utility functions to streamline test setup and improve maintainability (#5168)
* change tests to use utils libs

* 🔧 (frontend): add data-testid attribute to buttons in baseModal and secretKeyModal components
🔧 (frontend): add data-testid attribute to buttons in various test files for improved testing
🔧 (frontend): refactor awaitBootstrapTest function to remove skipNewFlow option and improve modal handling

*  (userSettings.spec.ts): add a 1-second timeout before checking for the "Please save" text to ensure it is rendered on the page before interacting with it

*  (userSettings.spec.ts): add comment to clarify waiting for API key creation to complete before proceeding to the next form element

*  (freeze-path.spec.ts): refactor adjustScreenView function to accept a parameter for the number of zoom outs to perform, improving flexibility and reusability in test scenarios.
🔧 (freeze-path.spec.ts): replace adjustScreenView function with initialGPTsetup function for setting up initial GPT configuration in the test scenario.
2024-12-09 20:30:56 +00:00
Cristhian Zanforlin Lousa
240e5790f4
chore(ui): add text-foreground class to NodeStatus build element (#5162)
* 📝 (NodeStatus/index.tsx): add text-foreground class to span element to improve text styling in build status section

*  (NodeStatus/index.tsx): improve styling and readability by adding flex and text-foreground classes to status elements

*  (build-status-display.tsx): Add a new component 'BuildStatusDisplay' to improve code organization and readability in the NodeStatus component.
📝 (index.tsx): Refactor NodeStatus component to use the new 'BuildStatusDisplay' component for displaying build status, validation details, and last run time. This change enhances code maintainability and reduces duplication.
2024-12-09 20:13:28 +00:00
Lucas Oliveira
a07907f695
fix: make sending a message not change the value of chatinput node (#5103)
Removed attribution of message sent to the Chat Input node
2024-12-09 19:38:25 +00:00
Lucas Oliveira
dc0291fa8f
fix: make chatinput text appear on playground only if no sessions are present (#5117)
Changed newChatView to only set chat value if no messages are present on the flow

Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
2024-12-09 18:37:14 +00:00
anovazzi1
b3e06aa215
Refactor: add data test id and improve wait times for element selectors in regression tests (#5138)
* fix: Improve wait times for element selectors in regression tests

* refactor: add data test id
2024-12-09 16:49:10 +00:00
anovazzi1
65ec6fd1e1
refactor: Improve wait times and visibility checks in userSettings.spec.ts (#5120)
* refactor: Improve wait times and visibility checks in userSettings.spec.ts
2024-12-09 16:40:22 +00:00
anovazzi1
bb703f6e0d
refactor: Improve page loading and element visibility in regression tests (#5134)
* fix: Improve page loading and element visibility in regression tests
2024-12-09 16:10:17 +00:00
anovazzi1
f673630fd4
Refactor: Improve wait times and selectors in sticky-notes.spec.ts (#5100)
* refactor: Improve wait times and selectors in sticky-notes.spec.ts
2024-12-09 16:01:12 +00:00
anovazzi1
c6ddb2905f
Refactor: update NodeDescription component to conditionally render character limit message (#5037)
* Refactor: Update NodeDescription component to conditionally render a character limit message

* [autofix.ci] apply automated fixes

* Refactor: update NoteNode inputClassName to remove unnecessary ring and focus styles (#5038)

refactor: Update NoteNode inputClassName to remove unnecessary ring and focus styles
Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
2024-12-09 15:44:32 +00:00
anovazzi1
2c01cd5195
refactor: Remove unnecessary code for handling Enter (#5041)
refactor: Remove unnecessary code for handling Enter key in NodeDescription component

Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
2024-12-09 15:34:40 +00:00
anovazzi1
4a4806d638
Refactor: Remove unnecessary code and comments in integration-side-bar.spec.ts (#5073)
fix: Remove unnecessary code and comments in integration-side-bar.spec.ts
2024-12-09 05:04:37 -08:00