Commit graph

12,697 commits

Author SHA1 Message Date
anovazzi1
fadfb13eff refactor: Update endpoint_name handling in FlowSettingsModal 2024-07-01 13:53:38 -03:00
anovazzi1
e268bff46a fix settings flow save button 2024-07-01 13:53:38 -03:00
rodrigosnader
9ac094b661 Apply Ruff formatting 2024-07-01 13:53:38 -03:00
Rodrigo
add2c48ab1 Update StoreMessageComponent for enhanced message handling 2024-07-01 13:53:38 -03:00
rodrigosnader
a892a5e126 Apply Ruff formatting 2024-07-01 13:53:38 -03:00
Rodrigo
384fc7e2c0 Update StoreMessageComponent for enhanced message handling
- Changed base class from CustomComponent to Component
- Added multiple input fields: message, sender, sender_name, session_id
- Included output field for stored messages
- Improved logic to handle both string and Message types
- Enhanced error handling and validation for message storage
2024-07-01 13:53:38 -03:00
italojohnny
a8a8fbd351 fix condition stop 2024-07-01 13:53:38 -03:00
Gabriel Luiz Freitas Almeida
5cefc8755b refactor: Add field_validator for files in MessageBase model 2024-07-01 13:53:38 -03:00
Gabriel Luiz Freitas Almeida
d1d5eb6e39 refactor: Update add_messages and add_messagetables functions to return Message objects 2024-07-01 13:53:37 -03:00
Gabriel Luiz Freitas Almeida
f56965b16f (test_messages.py): Add unit tests for message handling functions in langflow module. 2024-07-01 13:53:37 -03:00
Gabriel Luiz Freitas Almeida
b2888e1a84 refactor: Remove unused imports and optimize get_messages function 2024-07-01 13:53:37 -03:00
Gabriel Luiz Freitas Almeida
5ad37a16bf refactor: Remove unused imports and test adding messages 2024-07-01 13:53:37 -03:00
Gabriel Luiz Freitas Almeida
5727a859b8 ♻️ (service.py): remove unused code related to adding and retrieving messages in MonitorService 2024-07-01 13:53:37 -03:00
Gabriel Luiz Freitas Almeida
b690834f6b 📝 (memory.py): Refactor get_messages function to use SQLAlchemy select statement for better performance and readability
📝 (memory.py): Refactor delete_messages function to use SQLAlchemy delete statement for better performance and readability
📝 (monitor/schema.py): Update MessageModel to use UUID type for id and flow_id for consistency and better data handling
2024-07-01 13:53:37 -03:00
Gabriel Luiz Freitas Almeida
d44cf6fc4a chore: Update lint-js.yml to trigger checks on requested actions 2024-07-01 13:53:37 -03:00
Gabriel Luiz Freitas Almeida
9d922b78d6 Refactor curl command in python_test.yml to use the correct API endpoint for auto_login 2024-07-01 13:53:37 -03:00
Gabriel Luiz Freitas Almeida
b8db511f33 refactor: Remove unused imports in authContext.tsx 2024-07-01 13:53:37 -03:00
Gabriel Luiz Freitas Almeida
dea0cc33d5 refactor: ignore type error 2024-07-01 13:53:37 -03:00
Gabriel Luiz Freitas Almeida
95b0b91e18 chore: Fix issue with message timestamp conversion in MessageBase model 2024-07-01 13:53:37 -03:00
Gabriel Luiz Freitas Almeida
b81ea11edd refactor: Add test for adding messages 2024-07-01 13:53:37 -03:00
ogabrielluiz
da5a8a3f7d Apply Prettier formatting 2024-07-01 13:53:37 -03:00
Gabriel Luiz Freitas Almeida
f0a0a483e9 test: add messages tests 2024-07-01 13:53:37 -03:00
Gabriel Luiz Freitas Almeida
609c0d34c0 fix: Refactor monitor.py messages endpoints 2024-07-01 13:53:37 -03:00
Gabriel Luiz Freitas Almeida
ea5139dd7a Refactor add_messages function to separate message addition and commit logic 2024-07-01 13:53:37 -03:00
Gabriel Luiz Freitas Almeida
7710179977 Fix issue with message timestamp conversion in MessageBase model 2024-07-01 13:53:37 -03:00
Gabriel Luiz Freitas Almeida
405b428842 chore: Add error handling for message not found in update_message endpoint 2024-07-01 13:53:37 -03:00
anovazzi1
ffbe02f833 format code 2024-07-01 13:53:37 -03:00
anovazzi1
8c91b7297d fix fetch data to work even with autologin true 2024-07-01 13:53:37 -03:00
Gabriel Luiz Freitas Almeida
c30b40c4b4 refactor: Update messages endpoints to use database table 2024-07-01 13:53:37 -03:00
Gabriel Luiz Freitas Almeida
ed40e55ef1 refactor: Update add_messages function to use database session
This commit refactors the add_messages function in memory.py to use a database session for adding messages to the monitor service. Instead of directly calling the monitor_service.add_message method, the messages are now added using a session object. This change ensures that the messages are properly persisted in the database and improves the reliability of the application.
2024-07-01 13:53:37 -03:00
Gabriel Luiz Freitas Almeida
2f2bc4008f feat: Add message table to the database
This commit adds a new table called "message" to the database. The table includes columns for timestamp, sender, sender_name, session_id, text, id, flow_id, and files. The "message" table is created using Alembic migration. This addition allows for storing and retrieving messages in the application.
2024-07-01 13:53:37 -03:00
cristhianzl
a22c583130 💡 (hooks): add TypeScript types to hook parameters for better type safety
💡 (use-dropdown-options.tsx): add TypeScript types to function parameters

💡 (use-api-keys.tsx): add TypeScript types to function parameters

💡 (use-handle-delete-key.tsx): add TypeScript types to function parameters

💡 (use-preload-images.tsx): add TypeScript types to function parameters

💡 (use-patch-password.tsx): add TypeScript types to function parameters

💡 (use-patch-profile-picture.tsx): add TypeScript types to function parameters

💡 (use-save-key.tsx): add TypeScript types to function parameters

💡 (use-scroll-to-element.tsx): add TypeScript types to function parameters

💡 (use-messages-table.tsx): add TypeScript types to function parameters

💡 (use-remove-messages.tsx): add TypeScript types to function parameters

💡 (use-updateMessage.tsx): add type annotations to setSuccessData and setErrorData for better type safety and code clarity
2024-07-01 13:53:37 -03:00
cristhianzl
1031e62ede 💡 (hooks): add TypeScript types to hook parameters for better type safety
💡 (index.tsx): add non-null assertion operator to playground variable
♻️ (use-on-file-drop.tsx): add type annotations for folderId and folderChangeCallback
♻️ (use-auto-resize-text-area.tsx): add type annotations for value and inputRef
♻️ (use-drag-and-drop.tsx): add type annotations for setIsDragging, setFiles, currentFlowId, and setErrorData
♻️ (use-focus-unlock.tsx): add type annotations for lockChat and inputRef
♻️ (use-upload.tsx): add type annotations for uploadFile, currentFlowId, setFiles, and lockChat
♻️ (use-column-defs.tsx): add type annotation for myData
♻️ (use-row-data.tsx): add type annotations for myData and open
♻️ (index.tsx): remove commented-out code
♻️ (use-filtered-flows.tsx): add type annotations for flowsFromFolder, searchFlowsComponents, and setAllFlows
💡 (index.tsx): add non-null assertion operator to flowsFromFolder variable
2024-07-01 13:53:37 -03:00
cristhianzl
1d7dd4550e (hooks): add custom hooks for card component
- Add `useDataEffect` to handle data-related side effects
- Add `useInstallComponent` to manage component installation logic
- Add `useLikeComponent` to handle like functionality
- Add `useDragStart` to manage drag start events
- Add `usePlaygroundEffect` to handle playground-related side effects

 (cardComponent): add custom hooks for data, install, like, drag start, and playground effects
♻️ (cardComponent): rename state variables for consistency and readability
 (MainPage): add CollectionCard component to handle card rendering and interactions

 (index.tsx): add CollectionCard component to ComponentsComponent
♻️ (index.tsx): refactor to use CollectionCard instead of inline code
2024-07-01 13:53:37 -03:00
Carlos Coelho
8792126955 Improve makefile (#2338)
* Update Makefile to use command substitution for killing process

* break long lines into shorter ones

* replace fixed values with variables

* correct the unit test coverage report

---------

Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-07-01 13:53:37 -03:00
Gabriel Luiz Freitas Almeida
6564d04206 fix: vertex_id is now set correctly when it is a group flow 2024-07-01 13:53:37 -03:00
Gabriel Luiz Freitas Almeida
340df293ba Add check-format script and update lint-js.yml (#2357)
* chore: Add check-format script to package.json for code formatting consistency

* chore: Update lint-js.yml to use npm run check-format instead of npm run format
2024-07-01 13:53:37 -03:00
cristhianzl
fa4dd19ce6 ♻️ (flows.py): rename loop variable flow to _flow to avoid shadowing and improve readability 2024-07-01 13:53:37 -03:00
cristhianzl
496f4f6b91 refactor: Ensure flow names are unique by appending a number if necessary 2024-07-01 13:53:37 -03:00
Nicolò Boschi
bcf5807262
ci: always run required checks (#2395) 2024-06-27 04:22:17 -07:00
Gabriel Luiz Freitas Almeida
7af8b6bd9f
Add GitHub workflows for JavaScript and Python autofix (#2381)
This pull request adds GitHub workflows for JavaScript and Python
autofix. The JavaScript workflow is triggered on pull requests and
pushes to the main branch for changes in the "src/frontend" directory.
It sets up Node.js, caches Node.js dependencies, installs Node.js
dependencies, and runs Prettier for code formatting. The Python workflow
is also triggered on pull requests and pushes to the main branch for
changes in the "poetry.lock", "pyproject.toml", "src/backend", and
"tests" directories. It installs Ruff and runs Mypy for type checking
and code formatting.
2024-06-26 08:13:10 -07:00
Gabriel Luiz Freitas Almeida
8456d58d9d
Merge branch 'main' into fix_ref_main 2024-06-26 08:12:02 -07:00
Gabriel Luiz Freitas Almeida
070df4d302
Cassandra: support for non-AstraDB databases (#2380)
* Added support for Contact points
* Reworded some parameters depending on astra / local cassandra usage
* Added username

Successor of https://github.com/langflow-ai/langflow/pull/2206 but with
the new framework
2024-06-26 08:11:22 -07:00
Gabriel Luiz Freitas Almeida
707ed18ca5
Merge branch 'main' into dse 2024-06-26 08:10:56 -07:00
Gabriel Luiz Freitas Almeida
1935a7b2d6
components: simplify astra vectorize (#2370)
* Add ProviderKey as text field since it's the only auth entry available
today
* Hide authentication and external key as advanced fields
* Make provider name and model required
* Make provider as dropdown
* Add complete list of models in the help (better to not hardcode models
for now)
2024-06-26 08:10:15 -07:00
Gabriel Luiz Freitas Almeida
12c3e53e42 chore: Update GitHub workflow to run Ruff Check 2024-06-26 12:09:02 -03:00
Gabriel Luiz Freitas Almeida
fc9401c195 chore: Add GitHub workflows for JavaScript and Python autofix
This commit adds GitHub workflows for JavaScript and Python autofix. The JavaScript workflow is triggered on pull requests and pushes to the main branch, specifically for changes in the "src/frontend" directory. It checks out the code, sets up Node.js, caches Node.js dependencies, installs Node.js dependencies, and runs Prettier for code formatting. The Python workflow is also triggered on pull requests and pushes to the main branch, but for changes in the "poetry.lock", "pyproject.toml", "src/backend", and "tests" directories. It checks out the code, installs Ruff, and runs Mypy for type checking and code formatting.
2024-06-26 12:09:02 -03:00
Nicolò Boschi
5130c67e4a Cassandra: support for non-AstraDB databases 2024-06-26 16:57:18 +02:00
Nicolò Boschi
446ac2549f
components: simplify astra vectorize 2024-06-26 15:13:50 +02:00
Nicolò Boschi
f94b86f6b7
components: simplify astra vectorize 2024-06-26 15:13:49 +02:00