Commit graph

1,792 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
80de5b19ea 🚀 feat(App.tsx): add getVersion function to fetch API version
🚀 feat(API/index.ts): add getVersion function to fetch API version
🚀 feat(cardComponent/index.tsx): add CardComponent to display flow data
🚀 feat(types/flow/index.ts): add FlowStyleType to represent flow styles
The getVersion function was added to fetch the version of the API. The CardComponent was added to display flow data. The FlowStyleType was added to represent flow styles.
2023-06-09 15:44:49 -03:00
Gabriel Luiz Freitas Almeida
79d258d7fa Merge remote-tracking branch 'origin/dev' into db 2023-06-09 14:51:18 -03:00
Gabriel Luiz Freitas Almeida
51ecc05563 🐛 fix(vite.config.ts): remove /api/v1 prefix from proxy target URL
 feat(vite.config.ts): add rewrite function to proxy configuration to add /api/v1 prefix to requests
The /api/v1 prefix was removed from the proxy target URL as it was already being added by the rewrite function. The rewrite function was added to the proxy configuration to add the /api/v1 prefix to requests, which is required by the backend API.

Fixes #458
2023-06-09 14:31:09 -03:00
Gabriel Luiz Freitas Almeida
eac5057d4f 🚀 feat(launch.json): add configuration for debugging frontend in Chrome
The new configuration allows for debugging the frontend in Chrome by launching the application on http://localhost:3000/* and setting the webRoot to the frontend directory. This will enable developers to debug the frontend code more efficiently. The existing configuration for debugging the backend has been renamed to "Debug Backend" for better clarity. The "justMyCode" property has been set to true to exclude external libraries from debugging.
2023-06-09 14:19:04 -03:00
Gabriel Luiz Freitas Almeida
b53b349c6b 🎨 style(cardComponent): add support for styling the flow card with an emoji and a color
 feat(MainPage): add error handling for adding and updating flows
🔨 refactor(MainPage): extract handleAddFlow and handleSave functions to improve readability
The FlowType now has an optional style property that can be used to style the flow card with an emoji and a color. The CardComponent now supports this feature. The MainPage now has error handling for adding and updating flows. The handleAddFlow and handleSave functions were extracted to improve readability.
2023-06-09 14:00:52 -03:00
Gabriel Luiz Freitas Almeida
9c71d99852 🚀 chore(vite.config.ts): add new routes to apiRoutes array
The new routes added to the apiRoutes array are "/flows_styles", "/flows_styles/" and "/flows_styles/*". These routes were added to allow the frontend to fetch the styles for the flows.
2023-06-09 13:59:02 -03:00
Gabriel Luiz Freitas Almeida
61d84d7031 🚀 feat(frontend): add @radix-ui/react-tooltip package to improve user experience
The @radix-ui/react-tooltip package has been added to the frontend dependencies to improve the user experience by providing tooltips.
2023-06-09 12:41:15 -03:00
Gabriel Luiz Freitas Almeida
99cbd27623 🎉 feat(cardComponent): add CardComponent to display flow information
The CardComponent is a new component that displays information about a flow. It includes a header with the flow name and a delete button, a description, and a footer with badges and an edit button. The component is designed to be reusable and can display different types of flows.
2023-06-09 12:40:51 -03:00
Gabriel Luiz Freitas Almeida
07d9d1163a 🔧 chore(tabsContext.tsx): refactor code to improve readability and maintainability
 feat(tabsContext.tsx): add support for reading and writing flows to the database
The code has been refactored to improve readability and maintainability. The `addFlow` function has been refactored to extract data from the flow and create a new flow with a default name if no flow is provided. The `processFlowEdges`, `processFlowNodes`, `updateNodeBaseClasses`, `updateNodeEdges`, `updateNodeDescription`, `updateNodeTemplate`, `updateStateWithTabsData`, and `updateStateWithDbData` functions have been added to improve code organization. Support for reading and writing flows to the database has been added to improve data persistence and allow for multiple users to access the same flows.

🔥 refactor(TabsProvider): remove unnecessary whitespace
The commit removes an unnecessary whitespace in the TabsProvider function.

🐛 fix(API): add missing import statement for axios
 feat(API): add functions to interact with the backend API for CRUD operations on flows
The missing import statement for axios has been added to the file. The new functions added to the API file allow the frontend to interact with the backend API for CRUD operations on flows. The functions added are `saveFlowToDatabase`, `updateFlowInDatabase`, `readFlowsFromDatabase`, `deleteFlowFromDatabase`, and `getFlowFromDatabase`. These functions allow the frontend to create, read, update, and delete flows from the backend API.

🎨 style(MainPage): refactor card component into a separate file
The card component has been refactored into a separate file to improve code organization and readability. The `CardComponent` is now imported into the `MainPage` file and used to render the flow cards. The `handleSave` function has been updated to call the `updateFlowInDatabase` function with the current flow as an argument.
2023-06-09 12:39:39 -03:00
Gabriel Luiz Freitas Almeida
73014b63f2 🚀 feat(main.py): add create_db_and_tables function to be called on app startup
The create_db_and_tables function is now called on app startup using the FastAPI on_event decorator. This ensures that the database and tables are created before the app starts listening for requests.
2023-06-09 12:37:39 -03:00
Gabriel Luiz Freitas Almeida
95588c7dc9 🔥 refactor(vite.config.ts): remove unused /flows route from apiRoutes array
The /flows route was removed from the apiRoutes array as it was not being used.
2023-06-09 12:37:14 -03:00
Cristhian Zanforlin Lousa
111252fbb2
NodeToolbar Feature Implementation and Dialog UI Migration (#462)
Description
This pull request implements the NodeToolbar feature and migrates the
dialog UI to shadCN. The NodeToolbar introduces three actions:
duplicate, delete, and edit. The edit action allows users to modify the
advanced configuration of the tools. Additionally, this pull request
migrates the dialog UI to shadCN, specifically updating the prompt
dialog, code dialog, export dialog, python functions dialog and
tooltips. These enhancements improve the user experience and provide a
more efficient and modern interface.

Changes Made
Added NodeToolbar component to the application.
Implemented duplicate functionality, allowing users to create copies of
the selected nodes.
Implemented delete functionality, enabling users to remove selected
nodes.
Implemented edit functionality, providing users with the ability to
modify the advanced configuration of the tools.
Migrated the prompt dialog UI to shadCN, improving its appearance and
functionality.
Migrated the code dialog UI to shadCN, enhancing its usability and
aesthetics.
Migrated the export dialog UI to shadCN, resulting in a more streamlined
and intuitive interface.
Migrated the python functions dialog UI to shadCN, ensuring consistency
with the rest of the application's design.
Migrated the headlessUI tooltip to shadCN.

FYI: Need to improve the dialog subtitles texts.
2023-06-09 10:22:36 -03:00
Cristhian Zanforlin Lousa
f18f2f9851 adjust space codacy 2023-06-09 10:10:08 -03:00
Gabriel Luiz Freitas Almeida
f6b892e32c fix: correct endpoint 2023-06-09 09:23:11 -03:00
Gabriel Luiz Freitas Almeida
9e933c61c4 feat: added flows endpoints to vite 2023-06-09 09:22:44 -03:00
Gabriel Luiz Freitas Almeida
ab1f9ed371 refactor: change colum flow to data and create description column 2023-06-09 09:22:10 -03:00
Gabriel Luiz Freitas Almeida
51e4f9d109 Merge remote-tracking branch 'origin/dev' into db 2023-06-09 06:59:21 -03:00
Gabriel Luiz Freitas Almeida
2fc7897787 Merge remote-tracking branch 'origin/mainPage' into db 2023-06-09 06:57:20 -03:00
Gabriel Luiz Freitas Almeida
f9528591d9
Better serrver start (#461) 2023-06-09 06:47:15 -03:00
Gabriel Luiz Freitas Almeida
eb3421711f
Add advanced parameters to llamacpp node (#465) 2023-06-08 18:40:41 -03:00
Gabriel Luiz Freitas Almeida
2b8333ee95
Merge branch 'dev' into fix_llama 2023-06-08 18:31:39 -03:00
Gabriel Luiz Freitas Almeida
5484a08230 🔖 chore(pyproject.toml): bump up version to 0.0.88
The version number in the pyproject.toml file has been updated from 0.0.87 to 0.0.88. This is a chore commit as it does not introduce any new features or fix any bugs, but it is necessary to keep track of the package version.
2023-06-08 18:15:26 -03:00
Gabriel Luiz Freitas Almeida
a443d0aa83 🔨 refactor(llms.py): extract formatting methods for Azure and Llama fields
This commit extracts the formatting methods for Azure and Llama fields from the `format_field` method to improve readability and maintainability of the code. The `format_azure_field` method formats the fields for Azure, while the `format_llama_field` method formats the fields for Llama. These methods are called conditionally based on the name of the field.
2023-06-08 18:14:03 -03:00
Gabriel Luiz Freitas Almeida
7ed19c739b 🐛 fix(tabsContext.tsx): add try-catch block to handle JSON parsing errors
🐛 fix(API/index.ts): remove duplicate forward slash in API routes
The try-catch block was added to handle JSON parsing errors that may occur when parsing the cookieObject. This ensures that the application does not crash when such errors occur.

The duplicate forward slash in the API routes was removed to ensure that the routes are correctly formed and the API requests are sent to the correct endpoints.
2023-06-08 17:51:06 -03:00
Gabriel Luiz Freitas Almeida
868158b11b Merge branch 'dev' into better_server 2023-06-08 17:31:45 -03:00
Gabriel Luiz Freitas Almeida
de6bfbab69 Merge remote-tracking branch 'origin/main' into dev 2023-06-08 17:29:25 -03:00
Gabriel Luiz Freitas Almeida
58fa3b8dc0 🐛 fix(__main__.py): ignore type error for multiprocess import
🐛 fix(__main__.py): rename path variable to frontend_path for clarity
The first change fixes a type error for the multiprocess import. The second change renames the path variable to frontend_path to improve clarity and readability of the code.
2023-06-08 17:17:27 -03:00
anovazzi1
5e99ba0e99
fix: loads the page even if flows.data is null (#464) 2023-06-08 17:12:28 -03:00
Cristhian Zanforlin Lousa
12fa7f4e14 removing the type any from filter 2023-06-08 17:01:54 -03:00
Cristhian Zanforlin Lousa
db5eb1da10 Merge branch 'feat/shadUI' of https://github.com/logspace-ai/langflow into feat/shadUI 2023-06-08 16:58:08 -03:00
Cristhian Zanforlin Lousa
10b3ad711e Adding constants pattern, textfile edit node fix 2023-06-08 16:58:05 -03:00
Gabriel Luiz Freitas Almeida
901a7c0696 🔖 chore(pyproject.toml): bump up version to 0.0.87
The version number in the pyproject.toml file has been updated from 0.0.86 to 0.0.87. This is a chore commit as it does not introduce any new features or bug fixes, but only updates the version number.
2023-06-08 16:56:35 -03:00
Gabriel Luiz Freitas Almeida
3785c7e610 🐛 fix(tabsContext.tsx): add null check for flow.data to prevent TypeError
The fix adds a null check for flow.data to prevent a TypeError when accessing the edges property.
2023-06-08 16:54:46 -03:00
Gabriel Luiz Freitas Almeida
fae17163c8 🚀 chore(frontend): add esbuild package to improve build performance
The esbuild package has been added to the frontend dependencies to improve the build performance of the application.
2023-06-08 16:38:41 -03:00
Gabriel Luiz Freitas Almeida
8d03db2834 removing package.json from root folder 2023-06-08 16:24:44 -03:00
anovazzi1
1318a813b2 fix bug with development server and some dark mode issues 2023-06-08 16:15:51 -03:00
Cristhian Zanforlin Lousa
736cbb83db Adding key-value to modal subtitles 2023-06-08 13:27:50 -03:00
Cristhian Zanforlin Lousa
73b3220334 Adjust height of dialogs 2023-06-08 13:00:35 -03:00
Cristhian Zanforlin Lousa
741c5a8cd4 Merge branch 'dev' into feat/shadUI 2023-06-08 12:40:09 -03:00
Gabriel Luiz Freitas Almeida
2482a230bb update lock 2023-06-08 12:29:29 -03:00
Gabriel Luiz Freitas Almeida
0cfc0b016e 🚀 feat(__main__.py): add optional path argument to serve function to specify path to frontend directory
🚀 feat(__main__.py): add optional open_browser argument to serve function to specify whether to open browser after starting server
The serve function now accepts an optional path argument to specify the path to the frontend directory containing build files. This is useful for development purposes only. The function also accepts an optional open_browser argument to specify whether to open the browser after starting the server. This is useful when running the server locally.
2023-06-08 12:25:00 -03:00
Cristhian Zanforlin Lousa
3b147c879d Formatting 2023-06-08 12:09:45 -03:00
Cristhian Zanforlin Lousa
c9b68f6f7a Changing to ShadUI, Edge Tooltips and Advanced Dialog 2023-06-08 12:05:32 -03:00
Gabriel Luiz Freitas Almeida
84a46d5869 Merge remote-tracking branch 'origin/dev' into better_server 2023-06-08 11:49:56 -03:00
Gabriel Luiz Freitas Almeida
23e760b052 🔺 chore(pyproject.toml): update langchain dependency from 0.0.186 to 0.0.194
This commit updates the langchain dependency from version 0.0.186 to version 0.0.194. This is a chore as it updates a dependency to a newer version.
2023-06-08 08:45:20 -03:00
Gabriel Luiz Freitas Almeida
0304becc28 Merge remote-tracking branch 'origin/main' into dev 2023-06-08 08:13:32 -03:00
Gabriel Luiz Freitas Almeida
c4423e0fc0
🐛 fix(utils.py): add type check for streaming and stream attributes before setting them to True (#457)
Fixes #452
2023-06-08 00:47:55 -03:00
Gabriel Luiz Freitas Almeida
1e728c96b6 🔖 chore(pyproject.toml): bump version to 0.0.86
The version number in the pyproject.toml file has been updated from 0.0.85 to 0.0.86. This is a chore commit as it does not introduce any new features or fix any bugs, but rather updates the version number to reflect changes made to the codebase.
2023-06-08 00:42:42 -03:00
Gabriel Luiz Freitas Almeida
8e2bacad9a 🐛 fix(utils.py): add type check for streaming and stream attributes before setting them to True
The code now checks if the streaming and stream attributes are boolean before setting them to True. This ensures that the attributes are not set to True if they are not boolean, which could cause errors in the code.
2023-06-08 00:40:51 -03:00
Lucas Oliveira
62b33a19dc Changes to the menu structure 2023-06-07 19:44:52 -03:00