Commit graph

2,310 commits

Author SHA1 Message Date
gustavoschaedler
cc2dbe1490 🔧 refactor(constants.py, conftest.py): improve code structure and readability
🔨 refactor(constants.py): make YourComponent inherit from CustomComponent for better code reuse and structure

🔨 refactor(conftest.py): restructure custom_chain fixture for better readability and maintainability
2023-07-14 18:29:54 +01:00
gustavoschaedler
e90fd26984 🔥 remove(component.py): unnecessary blank line at the start of the file for cleaner code structure 2023-07-14 05:12:05 +01:00
gustavoschaedler
75452fb758 🔧 refactor(custom_component.py): make 'code' attribute optional in CustomComponent class to allow instances without explicit code value 2023-07-14 05:08:12 +01:00
gustavoschaedler
b523533d98 Merge branch 'python_custom_node_component' of github.com:logspace-ai/langflow into python_custom_node_component 2023-07-14 04:51:11 +01:00
gustavoschaedler
79d2d551ff 🔀 refactor(langflow): rename custom.py to custom_component.py for clarity
🔥 remove(langflow): delete custom.py as it's replaced by custom_component.py
📦 feat(langflow): add code_parser.py to parse Python source code
🐛 fix(langflow): update import paths due to file renaming
🎨 style(langflow): improve code formatting for readability
🐛 fix(langflow): correct handling of function arguments and return types in custom components
🔧 chore(langflow): update function calls due to changes in custom components
2023-07-14 04:49:42 +01:00
Gabriel Luiz Freitas Almeida
23a7478b5a Merge branch 'dev' into python_custom_node_component 2023-07-13 18:45:58 -03:00
Gabriel Luiz Freitas Almeida
38da096245 🐛 fix(base.py): rename _remove_invalid_nodes() to _validate_nodes() for clarity and accuracy
🔥 chore(base.py): remove unnecessary check for single node and no edges in _validate_nodes()
🔥 chore(base.py): remove unused import statement
🔥 chore(base.py): remove unused _validate_node() method
🔥 chore(base.py): remove unused import statement
2023-07-13 15:01:08 -03:00
Cristhian Zanforlin Lousa
f2724f1116 🐛 fix(tabsContext.tsx): update stroke color of edges to use a shorter hex code for better readability
🐛 fix(tabsContext.tsx): update stroke color of edges to use a consistent color code for better consistency
2023-07-13 14:34:28 -03:00
Cristhian Zanforlin Lousa
0e40bb0a87 🐛 fix(index.css): swap colors for chat bot and chat user icons to match their respective roles 2023-07-13 13:37:33 -03:00
Cristhian Zanforlin Lousa
36844cdcdb 🔧 fix(constants.tsx): reduce MAX_WORDS_HIGHLIGHT from 110 to 79 to limit the number of highlighted words in tooltips
🔥 chore(genericModal/index.tsx): remove console.log statement
2023-07-13 12:17:22 -03:00
Cristhian Zanforlin Lousa
fe2525750e 🔧 chore(constants.tsx): add constant MAX_WORDS_HIGHLIGHT with a value of 110 for the maximum number of words to highlight in tooltips
🔧 chore(index.css): add CSS class .code-nohighlight with different max-height value for tooltips with fewer words to display
🔧 chore(genericModal/index.tsx): add logic to dynamically apply CSS class .code-nohighlight to tooltips with fewer words to display
2023-07-13 11:37:02 -03:00
Cristhian Zanforlin Lousa
cc11213a0f 🎨 style(index.css): update color variables for chat bot and user icons for better visual distinction
🎨 style(index.css): update class names for code block modal span and button for better readability
🎨 style(index.css): update class name for code highlight block to limit max height
🐛 fix(chatMessage/index.tsx): update max width classes for markdown content to improve responsiveness
🐛 fix(genericModal/index.tsx): add missing useRef declarations for divRef and divRefPrompt
🐛 fix(genericModal/index.tsx): update class name for code highlight textarea to fix styling issue
🐛 fix(genericModal/index.tsx): add missing ref prop to Textarea component
🐛 fix(genericModal/index.tsx): add missing ref prop to div element for prompt variables
🐛 fix(genericModal/index.tsx): add missing ref prop to div element for prompt variables
2023-07-13 10:53:04 -03:00
Rodrigo Nader
28a8b1f1da change input to border-border 2023-07-13 01:15:18 -03:00
Rodrigo Nader
5727dbde8f add border-border to input-edit 2023-07-13 01:09:15 -03:00
Gabriel Luiz Freitas Almeida
049ba108bb fix: LangFlow -> Langflow 2023-07-12 19:30:37 -03:00
gustavoschaedler
e8c844a75f 🐛 fix(types.py): handle case when field_type is None by assigning an empty string to improve code robustness
🐛 fix(types.py): reformat detail dictionary in raise HTTPException to improve readability
2023-07-12 21:54:15 +01:00
gustavoschaedler
a6fe4091ac Merge branch 'dev' into python_custom_node_component 2023-07-12 16:34:21 +01:00
gustavoschaedler
2f4e98477c 🐛 fix(components.py): change variable name from component to component_model in create_component and update_component functions for better readability
 feat(components.py): add support for `create_at` and `update_at` fields in Component model to track creation and update timestamps
🔥 refactor(components.py): remove unused imports and variables in components.py
🔥 refactor(component.py): remove unused imports and variables in component.py
🔥 refactor(component.py): remove commented out code in component.py
2023-07-12 15:10:37 +01:00
gustavoschaedler
587b203b66 🐛 fix(components.py): handle IntegrityError when creating a component to avoid duplicate entries
 feat(components.py): add error handling for creating a component with the same id to return a 400 status code and a detailed error message
2023-07-12 13:12:52 +01:00
gustavoschaedler
6c1a6f3bd9 🔧 fix(components.py): remove unused imports and commented out code
 feat(components.py): refactor create_component endpoint to use the Component model directly instead of ComponentCreate model
 feat(components.py): refactor read_component endpoint to return a Component model instead of ComponentRead model
 feat(components.py): refactor read_components endpoint to return a list of Component models instead of a list of ComponentRead models
 feat(components.py): refactor update_component endpoint to use the Component model directly instead of ComponentUpdate model
 feat(components.py): refactor delete_component endpoint to use the Component model directly instead of ComponentUpdate model
🔧 fix(component.py): remove unused imports and commented out code
 feat(component.py): add missing import for orjson
 feat(component.py): add missing import for FastAPI, HTTPException, and Depends
 feat(component.py): add missing import for List and Optional
 feat(component.py): add missing import for datetime
 feat(component.py): add missing import for uuid
 feat(component.py): add missing import for StaticPool
 feat(component.py): add missing import for create_engine
 feat(component.py): add missing import for select
 feat(component.py): add missing import for orjson
 feat(component.py): add missing import for SQLModel
 feat(component.py): add missing import for Session
 feat(component.py): add missing import for orjson
 feat(component.py): add missing import for orjson_dumps function
 feat(component.py): add missing import for Component model
 feat(component.py): add missing import for Field
 feat(component.py): add missing import for SQLModel
 feat(component.py): add missing import for Session
 feat(component.py): add missing import for create_engine
 feat(component.py): add missing import for select
 feat(component.py): add missing import for Optional
 feat(component.py): add missing import for List
 feat(component.py): add missing import for datetime
 feat(component.py): add missing import for uuid
 feat(component.py): add missing import for StaticPool
 feat(component.py): add missing import for orjson
 feat(component.py): add missing import for orjson_dumps function
 feat(component.py): add missing import for Component model
 feat(component
2023-07-12 13:02:38 +01:00
Lucas Oliveira
3b41e189d3 Chat behavior fixed when there is no input variables empty 2023-07-11 23:04:36 -03:00
Lucas Oliveira
fcfe927255 changed separator 2023-07-11 22:53:41 -03:00
Lucas Oliveira
6a9c00bd3a Merge branch 'dev' of github.com:logspace-ai/langflow into dev 2023-07-11 22:51:17 -03:00
Lucas Oliveira
6ba70af2b9 added padding on highlight 2023-07-11 22:50:12 -03:00
Rodrigo Nader
717c8400fe change dark primary color 2023-07-11 22:42:35 -03:00
Lucas Oliveira
562792938e Fixed notification center styling 2023-07-11 22:32:19 -03:00
Lucas Oliveira
fb10a0d5f4 Fixed UI of Prompt Modal on Generic Modal 2023-07-11 22:29:00 -03:00
Lucas Oliveira
4ece1f13ff Fixed button appearing at start 2023-07-11 21:35:31 -03:00
Lucas Oliveira
9ec48cbd17 Fixed generic modal to use baseModal and fixed inputVariables to show on footer 2023-07-11 21:33:13 -03:00
Lucas Oliveira
7979f3c02e Fixed constant not used correctly 2023-07-11 21:08:21 -03:00
Lucas Oliveira
aba0ed40da Edit Prompt modal and other generic modals spacing fixed 2023-07-11 21:06:35 -03:00
Lucas Oliveira
d15c5636a2 Fixed bug on chatMessage 2023-07-11 20:33:46 -03:00
Lucas Oliveira
2c1203c437 Fixed colors on formModal 2023-07-11 20:20:21 -03:00
gustavoschaedler
fb91b17c51 📦 chore(router.py): add component_router to APIRouter to include component routes
📦 chore(__init__.py): add component_router to __all__ list to expose component routes
📦 feat(components.py): add routes for creating, reading, updating, and deleting components
📦 chore(endpoints.py): import Component model from database.models.component
📦 chore(schemas.py): add ComponentListCreate and ComponentListRead schemas
📦 feat(models/component.py): add Component model with fields for name, description, and data
📦 feat(models/component.py): add ComponentCreate, ComponentRead, and ComponentUpdate models for CRUD operations on components
2023-07-12 00:08:52 +01:00
Lucas Oliveira
0471e99a86 Fixed useEffect bug 2023-07-11 19:58:33 -03:00
anovazzi1
bbdd98209a fix(chatInput): fix CSS class name in ChatInput component to use "bg-background" instead of "bg-input" when form-modal-lock-false condition is met 2023-07-11 18:50:22 -03:00
anovazzi1
3f147286ce fix bg of chat input 2023-07-11 18:29:10 -03:00
anovazzi1
f05285e703 added background to fix bug on linux 2023-07-11 17:24:08 -03:00
Gabriel Luiz Freitas Almeida
39c20fe46b 🐛 fix(EditNodeModal): remove unnecessary whitespace
🐛 fix(exportModal): remove unnecessary whitespace
🐛 fix(tailwind.config.js): fix keyframes names and add missing comma
2023-07-11 17:18:43 -03:00
Gabriel Luiz Freitas Almeida
77ba780d0e 🐛 fix(custom.py): add handle_parsing_errors=True to VectorStoreAgent, SQLAgent, and VectorStoreRouterAgent classes to handle parsing errors during execution
🐛 fix(loading.py): add handle_parsing_errors=True to instantiate_agent and load_agent_executor functions to handle parsing errors during agent instantiation and loading
2023-07-11 17:17:40 -03:00
Igor Carvalho
3de654c8df refactor(google.svg): Add better google svg icon 2023-07-11 17:13:55 -03:00
anovazzi1
cfa13df98d refactor(chatMessage/index.tsx): improve code readability and fix rendering issue
The code in the `ChatMessage` component has been refactored to improve code readability and fix a rendering issue.

- In line 10, the `div` element has been updated to include the `flex flex-col` class for better styling.
- In lines 16-18, the conditional rendering of the `template` has been simplified by removing unnecessary ternary operator and curly braces.
- In lines 21-34, the rendering of the `template` has been updated to correctly split the text into lines and replace placeholders with values.
- In lines 37-39, a line break element (`<br />`) has been added for better visual separation.
- In lines 41-43, the rendering of the `chat.message[chat.chatKey]` has been moved outside the `span` element for correct rendering.

These changes improve the readability of the code and fix the rendering issue in the `ChatMessage` component.
2023-07-11 16:00:56 -03:00
Igor Carvalho
c312c56b14 Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io 2023-07-11 15:55:17 -03:00
Igor Carvalho
18f2c58c72 refactor: Add exportModal tailwind constants and remove dark classes 2023-07-11 15:55:05 -03:00
anovazzi1
63e8e927e7 fix(parameterComponent): add null check before calling cleanEdges to prevent error when reactFlowInstance is null 2023-07-11 15:29:48 -03:00
Cristhian Zanforlin Lousa
db5848ea2b 🔧 fix(parameterComponent): remove console.log statement for refNumberComponents variable
🔧 fix(EditNodeModal): change filter method to map method in changeAdvanced function to correctly update advanced property of template object
2023-07-11 14:30:56 -03:00
Cristhian Zanforlin Lousa
d745f90598 🐛 fix(tailwind.config.js): rename keyframes from "accordion-down" to "slideDown" and from "accordion-up" to "slideUp" for better clarity and semantics
 feat(tailwind.config.js): update animation durations for "accordion-down" to 300ms ease-out and "accordion-up" to 300ms ease-in for smoother transitions
2023-07-11 13:59:25 -03:00
anovazzi1
96b432d127 fix(formModal): remove connectWS from dependencies array in useEffect to prevent unnecessary reconnections
fix(formModal): remove connectWS from dependencies array in useEffect to prevent unnecessary reconnections
2023-07-11 11:58:48 -03:00
anovazzi1
7a7efc2afa prompt template bug fix 2023-07-11 10:52:25 -03:00
Gabriel Luiz Freitas Almeida
66d8a104c0 🔥 refactor(utils.ts): remove unused import of HuggingFaceIcon to improve code cleanliness and reduce unused dependencies 2023-07-11 09:25:51 -03:00