Commit graph

11,619 commits

Author SHA1 Message Date
Igor Carvalho
ff2eb2d13d refactor[genericIconComponent]: Refactor icon to type it properly 2023-07-25 19:48:13 -03:00
gustavoschaedler
f486c27a2f 🔥 refactor(types.py): remove commented out code for building langchain custom component list from path
🔨 refactor(types.py): refactor load_files_from_path function to improve readability and maintainability

🔨 refactor(types.py): refactor build_and_validate_all_files function to improve readability and maintainability

🔨 refactor(types.py): refactor build_invalid_menu function to improve readability and maintainability
2023-07-25 23:45:35 +01:00
gustavoschaedler
0ada6b841f 🐛 fix(types.py): remove unnecessary blank line
 feat(types.py): refactor build_langchain_template_custom_component function to improve readability and error handling
2023-07-25 23:44:36 +01:00
Igor Carvalho
b70ed70788 refactor[index.css]: Refactor index.css 2023-07-25 19:03:04 -03:00
anovazzi1
e232d33c07 feat(EditFlowSettingsComponent): add validation for duplicate flow names
- Added `invalidName` and `setInvalidName` props to `EditFlowSettings` component to handle validation for duplicate flow names.
- Added `nameLists` useRef to store the list of flow names fetched from the database.
- Added `useEffect` to fetch the flow names from the database and populate `nameLists` useRef.
- Modified `handleNameChange` function to check if the entered name already exists in `nameLists` useRef and set `invalidName` accordingly.
- Added a new span element to display an error message if the name is already in use.

fix(flowSettingsModal): disable save button when the flow name is invalid

- Added `invalidName` and `setInvalidName` states to `FlowSettingsModal` component to handle the validation for invalid flow names.
- Passed `invalidName` and `setInvalidName` props to `EditFlowSettings` component.
- Disabled the save button when `invalidName` is true.
2023-07-25 18:49:52 -03:00
gustavoschaedler
e8f6b435f2 🐛 fix(types.py): fix formatting issues in build_langchain_template_custom_component function for better readability
🐛 fix(types.py): fix formatting issues in build_langchain_custom_component_list_from_path function for better readability
2023-07-25 22:20:28 +01:00
gustavoschaedler
60f6c0a8ed Merge branch 'python_custom_node_component' of github.com:logspace-ai/langflow into python_custom_node_component 2023-07-25 22:06:21 +01:00
Igor Carvalho
f11c41644c refactor[utils.ts]: Remove and change wrong types 2023-07-25 18:01:35 -03:00
gustavoschaedler
883f852b73 🐛 fix(utils.py): move merge_nested_dicts function to the top of the file for better organization
 feat(utils.py): add merge_nested_dicts function to merge nested dictionaries recursively
🐛 fix(endpoints.py): import merge_nested_dicts function from the correct module
 feat(endpoints.py): use merge_nested_dicts function to merge dictionaries in build_langchain_custom_component_list_from_path function
🐛 fix(types.py): import merge_nested_dicts function from the correct module
 feat(types.py): use merge_nested_dicts function to merge dictionaries in build_langchain_custom_component_list_from_path function
🐛 fix(types.py): import merge_nested_dicts function from the correct module
 feat(types.py): use merge_nested_dicts function to merge valid and invalid menus in build_langchain_custom_component_list_from_path function
🐛 fix(tools.py): import Optional from typing module
 feat(tools.py): add CustomComponentEmptyNode class to represent an empty custom component template
2023-07-25 21:58:09 +01:00
Lucas Oliveira
f35cbde38a Changed color to specific one 2023-07-25 17:56:02 -03:00
Gabriel Luiz Freitas Almeida
4e5850da3a 🔀 chore(base.py): add "beta" field to the serialized representation of FrontendNode class
📝 docs(base.py): update documentation for FrontendNode class to include information about the "beta" field
2023-07-25 17:49:30 -03:00
Lucas Oliveira
11bad4d07d Added classes to index.css 2023-07-25 17:43:51 -03:00
Lucas Oliveira
ae2707d7c3 Merge branch 'python_custom_node_component' of github.com:logspace-ai/langflow into python_custom_node_component 2023-07-25 17:38:49 -03:00
Lucas Oliveira
c9e13eb359 Changed color 2023-07-25 17:38:24 -03:00
Lucas Oliveira
6749fb4475 Changed disposition of Beta div 2023-07-25 17:30:03 -03:00
Gabriel Luiz Freitas Almeida
74e263811b 🔨 refactor(types.py): import CustomComponentFrontendNode from custom_components module to improve code organization and readability
🔨 refactor(types.py): change usage of CustomComponentNode to CustomComponentFrontendNode to align with updated module structure

🔨 refactor(frontend_node/base.py): add beta flag to FrontendNode class to indicate if a node is in beta stage

🔨 refactor(custom_components.py): add beta flag to CustomComponentFrontendNode class to indicate it is in beta stage

🔨 refactor(tools.py): remove unused import of DEFAULT_CUSTOM_COMPONENT_CODE

🔨 refactor(tools.py): remove CustomComponentNode class as it is no longer used
2023-07-25 17:22:02 -03:00
Lucas Oliveira
19c714a7d5 Added Beta badge 2023-07-25 17:14:12 -03:00
Gabriel Luiz Freitas Almeida
b76141b3df 🔄 refactor(custom_component.py): rename list_flow_names method to list_flows for better clarity and consistency
🐛 fix(custom_component.py): fix return value of list_flows method to return the actual flow objects instead of just their names
🔥 chore(custom_component.py): remove unused build method as it is not implemented
2023-07-25 17:12:48 -03:00
Gabriel Luiz Freitas Almeida
41471b72a2 🐛 fix(memories.py): fix conditional statement for setting show and required properties of fields in MotorheadMemory class
 feat(memories.py): add conditional statement to show client_id field in MotorheadMemory class
2023-07-25 16:45:00 -03:00
Gabriel Luiz Freitas Almeida
a3417d047b 📝 docs(config.yaml): add documentation link for MotorheadMemory integration
🐛 fix(memories.py): hide and make chat_memory field optional for MotorheadMemory frontend node
2023-07-25 16:32:01 -03:00
Gabriel Luiz Freitas Almeida
95f69442d6 📝 docs(README.md): add documentation for deploying on Railway and Render platforms
📝 docs(README.md): add documentation for the `component-path` command line option to specify custom components directory path
2023-07-25 15:37:12 -03:00
Lucas Oliveira
361fd08828 Formatting 2023-07-25 15:16:24 -03:00
Lucas Oliveira
39a696117e Changed notification center popup to ShadCN Popover and deleted popupContext permanently. 2023-07-25 15:15:52 -03:00
Gabriel Luiz Freitas Almeida
46c6afd85f 🔥 refactor(main.py): remove commented out code for getting log level in create_app() function
🔒 chore(main.py): configure logger in create_app() function to ensure proper logging setup
2023-07-25 15:13:43 -03:00
Gabriel Luiz Freitas Almeida
a928005b7b 🐛 fix(endpoints.py): change import statement for typing module to import Annotated from typing module to fix type hinting error
 feat(endpoints.py): add support for clear_cache parameter in process_flow endpoint to allow clearing the cache before processing the flow
🐛 fix(process.py): add logic to clear cache if clear_cache parameter is True in process_graph_cached function to fix caching issue
2023-07-25 15:04:41 -03:00
Gabriel Luiz Freitas Almeida
c83060ed58 🐛 fix(base.py): import CLASSES_TO_REMOVE constant from constants module to fix NameError
🔀 chore(constants.py): add CLASSES_TO_REMOVE constant to store classes to be removed from base.py module
2023-07-25 14:21:43 -03:00
Gabriel Luiz Freitas Almeida
f64d0a2ae4 🐛 fix(parameterComponent): remove unnecessary empty lines for better code readability
🐛 fix(utils): remove unnecessary empty lines for better code readability
2023-07-25 14:21:14 -03:00
Gabriel Luiz Freitas Almeida
12933ccf52 🔧 chore(__main__.py): add debug logs to update_settings function for better troubleshooting
 feat(__main__.py): add support for loading settings from a specified config file
 feat(__main__.py): add support for setting remove_api_keys flag
 feat(__main__.py): add support for setting cache flag
 feat(__main__.py): add support for adding component path
2023-07-25 13:53:39 -03:00
Cristhian Zanforlin Lousa
418e132da1 Merge branch 'python_custom_node_component' of https://github.com/logspace-ai/langflow into python_custom_node_component 2023-07-25 12:48:32 -03:00
Cristhian Zanforlin Lousa
75e19b4339 🐛 fix(parameterComponent): remove unnecessary if condition and code block
🐛 fix(utils): remove unnecessary if condition and code block
 feat(parameterComponent): add fallback logic to display a custom component when no grouped objects are found
2023-07-25 12:48:24 -03:00
Gabriel Luiz Freitas Almeida
0095fc4753 🔧 chore(settings.py): add BASE_COMPONENTS_PATH constant to improve code readability and maintainability
🔧 chore(settings.py): add support for LANGFLOW_COMPONENT_PATH environment variable to allow custom component paths to be added
2023-07-25 12:16:06 -03:00
Gabriel Luiz Freitas Almeida
aebdfad63c 🔀 chore(config.yaml): rename 'custom' section to 'custom_components' for better clarity and consistency 2023-07-25 12:03:28 -03:00
Gabriel Luiz Freitas Almeida
9736dab3c7 🔧 chore(parameterComponent): fix indentation and replace single quotes with double quotes for consistency
📝 docs(parameterComponent): update placeholder text for custom component to be more descriptive
2023-07-25 11:47:43 -03:00
Gabriel Luiz Freitas Almeida
aa387f89b3 🐛 fix(types.py): add error handling when building custom components to prevent crashes and log the error message 2023-07-25 11:47:21 -03:00
Gabriel Luiz Freitas Almeida
eb94b957b5 🐛 fix(endpoints.py): fix merging of custom component dictionaries from multiple paths
 feat(endpoints.py): add support for merging custom component dictionaries from multiple paths to build the final dictionary of all components
2023-07-25 11:46:57 -03:00
Gabriel Luiz Freitas Almeida
61d8f8edcc 🔧 chore(launch.json): update uvicorn args to use --factory flag and specify the correct app factory function 2023-07-25 11:42:05 -03:00
Gabriel Luiz Freitas Almeida
dda8676d34 🔖 chore(pyproject.toml): update package version to 0.3.3
🔧 chore(pyproject.toml): update maintainers list with new team members Carlos Coelho, Igor Carvalho, and Rodrigo Nader
2023-07-25 10:58:42 -03:00
Gabriel Luiz Freitas Almeida
fae3250439 🔧 chore(constants.py): add 'google_cse_id' to FORCE_SHOW_FIELDS list to include it in the forced display fields 2023-07-25 10:58:39 -03:00
Gabriel Luiz Freitas Almeida
ac0aa71c10 🐛 fix(__main__.py): add support for component_path parameter to update_settings function
 feat(__main__.py): add component_path option to serve command to specify the directory containing custom components
🐛 fix(settings.py): modify update_settings function to handle list attributes correctly
2023-07-25 10:58:08 -03:00
Gabriel Luiz Freitas Almeida
17e84e4b2e 🔨 refactor(endpoints.py): rename directory_loader module to directory_reader for better naming consistency
🔨 refactor(endpoints.py): rename directory_loader import to directory_reader for better naming consistency
🔨 refactor(directory_reader.py): rename directory_loader module to directory_reader for better naming consistency
🔨 refactor(types.py): rename directory_loader import to directory_reader for better naming consistency
2023-07-25 10:58:07 -03:00
Cristhian Zanforlin Lousa
3aa4270fe7
Refactor and Unification of Inputs/Textarea Components using ShadCn Styling (#669)
**BRANCH CREATED FROM MODALREFACTOR***

This pull request introduces a significant enhancement to the existing
codebase by refactoring the inputs and textarea components. Currently,
each input and textarea element uses different styling components,
leading to inconsistencies and difficulties in maintaining a unified
design language across the application. To address this issue, we
propose a refactor that unifies all inputs and textareas under a single
ShadCn component.
2023-07-25 10:50:34 -03:00
Cristhian Zanforlin Lousa
94ccb79564 🐛 fix(parameterComponent): update placeholder text for custom component to provide clearer instructions 2023-07-25 10:43:20 -03:00
Cristhian Zanforlin Lousa
f58500c89b merge fix 2023-07-25 10:41:57 -03:00
Cristhian Zanforlin Lousa
4677dcfad2 🐛 fix(parameterComponent): add fallback custom component when groupedObj is empty to prevent rendering issues 2023-07-25 10:27:45 -03:00
Lucas Oliveira
45673dcda8
Remove hard-coded colors and unnecessary dark classes (#636)
Change hard coded colors to langflow constants colors
2023-07-25 10:09:12 -03:00
Lucas Oliveira
c009602b57
Adding Retry Interceptor for Failed Requests and Endpoint Display (#679)
This pull request introduces a new feature that enhances the error
handling and user experience in our React application. It implements an
interceptor to automatically retry failed requests and provides a clear
display of the failing endpoint to the user.

Changes Made:

Added a new interceptor to the Axios HTTP client in our React
application.
The interceptor detects failed requests and automatically retries them
based on a predefined retry count.
When a request fails, the interceptor captures the failing endpoint and
stores it.
Modified the user interface to display a user-friendly error message
indicating the failing endpoint.
Enhanced error handling to provide detailed information and better user
feedback.
2023-07-25 10:08:50 -03:00
Lucas Oliveira
812f5d2961 Styling fixes 2023-07-25 10:08:11 -03:00
Lucas Oliveira
bfbe66a547 Merge branch 'dev' into interceptor-dev 2023-07-25 10:07:34 -03:00
Gabriel Luiz Freitas Almeida
eece41a69a 🔨 refactor(endpoints.py): rename 'load_custom_component_from_path' module to 'directory_loader' for better clarity and consistency
🔨 refactor(types.py): rename 'load_custom_component_from_path' module to 'directory_loader' for better clarity and consistency
2023-07-25 10:06:26 -03:00
Lucas Oliveira
5bf99d11b4
build(deps): bump word-wrap from 1.2.3 to 1.2.5 in /src/frontend (#682)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3
to 1.2.5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/jonschlinkert/word-wrap/releases">word-wrap's
releases</a>.</em></p>
<blockquote>
<h2>1.2.5</h2>
<p><strong>Changes</strong>:</p>
<p>Reverts default value for <code>options.indent</code> to two spaces
<code>' '</code>.</p>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/jonschlinkert/word-wrap/compare/1.2.4...1.2.5">https://github.com/jonschlinkert/word-wrap/compare/1.2.4...1.2.5</a></p>
<h2>1.2.4</h2>
<h2>What's Changed</h2>
<ul>
<li>Remove default indent by <a
href="https://github.com/mohd-akram"><code>@​mohd-akram</code></a> in <a
href="https://redirect.github.com/jonschlinkert/word-wrap/pull/24">jonschlinkert/word-wrap#24</a></li>
<li>🔒fix: CVE 2023 26115 (2) by <a
href="https://github.com/OlafConijn"><code>@​OlafConijn</code></a> in <a
href="https://redirect.github.com/jonschlinkert/word-wrap/pull/41">jonschlinkert/word-wrap#41</a></li>
<li>🔒 fix: CVE-2023-26115 by <a
href="https://github.com/aashutoshrathi"><code>@​aashutoshrathi</code></a>
in <a
href="https://redirect.github.com/jonschlinkert/word-wrap/pull/33">jonschlinkert/word-wrap#33</a></li>
<li>chore: publish workflow by <a
href="https://github.com/OlafConijn"><code>@​OlafConijn</code></a> in <a
href="https://redirect.github.com/jonschlinkert/word-wrap/pull/42">jonschlinkert/word-wrap#42</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/mohd-akram"><code>@​mohd-akram</code></a> made
their first contribution in <a
href="https://redirect.github.com/jonschlinkert/word-wrap/pull/24">jonschlinkert/word-wrap#24</a></li>
<li><a
href="https://github.com/OlafConijn"><code>@​OlafConijn</code></a> made
their first contribution in <a
href="https://redirect.github.com/jonschlinkert/word-wrap/pull/41">jonschlinkert/word-wrap#41</a></li>
<li><a
href="https://github.com/aashutoshrathi"><code>@​aashutoshrathi</code></a>
made their first contribution in <a
href="https://redirect.github.com/jonschlinkert/word-wrap/pull/33">jonschlinkert/word-wrap#33</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4">https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="207044ebda"><code>207044e</code></a>
1.2.5</li>
<li><a
href="9894315485"><code>9894315</code></a>
revert default indent</li>
<li><a
href="f64b188c72"><code>f64b188</code></a>
run verb to generate README</li>
<li><a
href="03ea08256b"><code>03ea082</code></a>
Merge pull request <a
href="https://redirect.github.com/jonschlinkert/word-wrap/issues/42">#42</a>
from jonschlinkert/chore/publish-workflow</li>
<li><a
href="420dce9a24"><code>420dce9</code></a>
Merge pull request <a
href="https://redirect.github.com/jonschlinkert/word-wrap/issues/41">#41</a>
from jonschlinkert/fix/CVE-2023-26115-2</li>
<li><a
href="bfa694edf5"><code>bfa694e</code></a>
Update .github/workflows/publish.yml</li>
<li><a
href="ace0b3c78f"><code>ace0b3c</code></a>
chore: bump version to 1.2.4</li>
<li><a
href="6fd7275946"><code>6fd7275</code></a>
chore: add publish workflow</li>
<li><a
href="30d6daf60f"><code>30d6daf</code></a>
chore: fix test</li>
<li><a
href="655929cabe"><code>655929c</code></a>
chore: remove package-lock</li>
<li>Additional commits viewable in <a
href="https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=word-wrap&package-manager=npm_and_yarn&previous-version=1.2.3&new-version=1.2.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/logspace-ai/langflow/network/alerts).

</details>
2023-07-25 10:03:36 -03:00