From 9db5638e8d01972d2851b1c55cf7450ba74ecf4f Mon Sep 17 00:00:00 2001 From: cristhianzl Date: Sat, 30 Mar 2024 08:43:27 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20(APIRequest.py):=20add=20icon=20?= =?UTF-8?q?"Globe"=20to=20APIRequest=20component=20for=20better=20visual?= =?UTF-8?q?=20representation=20=F0=9F=93=9D=20(Directory.py):=20add=20icon?= =?UTF-8?q?=20"folder"=20to=20DirectoryComponent=20for=20better=20visual?= =?UTF-8?q?=20representation=20=F0=9F=93=9D=20(File.py):=20add=20icon=20"f?= =?UTF-8?q?ile-text"=20to=20FileComponent=20for=20better=20visual=20repres?= =?UTF-8?q?entation=20=F0=9F=93=9D=20(URL.py):=20add=20icon=20"layout-temp?= =?UTF-8?q?late"=20to=20URLComponent=20for=20better=20visual=20representat?= =?UTF-8?q?ion=20=F0=9F=93=9D=20(TextInput.py):=20add=20icon=20"type"=20to?= =?UTF-8?q?=20TextInput=20component=20for=20better=20visual=20representati?= =?UTF-8?q?on=20=F0=9F=93=9D=20(TextOutput.py):=20add=20icon=20"type"=20to?= =?UTF-8?q?=20TextOutput=20component=20for=20better=20visual=20representat?= =?UTF-8?q?ion=20=F0=9F=93=9D=20(styleUtils.ts):=20replace=20"Search"=20ic?= =?UTF-8?q?on=20with=20"TextSearch"=20icon=20in=20nodeIconsLucide=20for=20?= =?UTF-8?q?better=20visual=20representation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/base/langflow/components/data/APIRequest.py | 2 ++ src/backend/base/langflow/components/data/Directory.py | 3 ++- src/backend/base/langflow/components/data/File.py | 3 ++- src/backend/base/langflow/components/data/URL.py | 3 ++- src/backend/base/langflow/components/inputs/TextInput.py | 1 + src/backend/base/langflow/components/outputs/TextOutput.py | 1 + src/frontend/src/utils/styleUtils.ts | 3 ++- 7 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/backend/base/langflow/components/data/APIRequest.py b/src/backend/base/langflow/components/data/APIRequest.py index d6e966494..2d74cafe1 100644 --- a/src/backend/base/langflow/components/data/APIRequest.py +++ b/src/backend/base/langflow/components/data/APIRequest.py @@ -13,6 +13,8 @@ class APIRequest(CustomComponent): description: str = "Make HTTP requests given one or more URLs." output_types: list[str] = ["Record"] documentation: str = "https://docs.langflow.org/components/utilities#api-request" + icon = "Globe" + field_config = { "urls": {"display_name": "URLs", "info": "URLs to make requests to."}, "method": { diff --git a/src/backend/base/langflow/components/data/Directory.py b/src/backend/base/langflow/components/data/Directory.py index fe1944636..a40e63711 100644 --- a/src/backend/base/langflow/components/data/Directory.py +++ b/src/backend/base/langflow/components/data/Directory.py @@ -8,7 +8,8 @@ from langflow.schema import Record class DirectoryComponent(CustomComponent): display_name = "Directory" description = "Recursively load files from a directory." - + icon = "folder" + def build_config(self) -> Dict[str, Any]: return { "path": {"display_name": "Path"}, diff --git a/src/backend/base/langflow/components/data/File.py b/src/backend/base/langflow/components/data/File.py index 996d06d55..3d3e6eb0e 100644 --- a/src/backend/base/langflow/components/data/File.py +++ b/src/backend/base/langflow/components/data/File.py @@ -9,7 +9,8 @@ from langflow.schema import Record class FileComponent(CustomComponent): display_name = "File" description = "A generic file loader." - + icon = "file-text" + def build_config(self) -> Dict[str, Any]: return { "path": { diff --git a/src/backend/base/langflow/components/data/URL.py b/src/backend/base/langflow/components/data/URL.py index e0fb14403..6b9413354 100644 --- a/src/backend/base/langflow/components/data/URL.py +++ b/src/backend/base/langflow/components/data/URL.py @@ -9,7 +9,8 @@ from langflow.schema import Record class URLComponent(CustomComponent): display_name = "URL" description = "Fetch content from one or more URLs." - + icon = "layout-template" + def build_config(self) -> Dict[str, Any]: return { "urls": {"display_name": "URL"}, diff --git a/src/backend/base/langflow/components/inputs/TextInput.py b/src/backend/base/langflow/components/inputs/TextInput.py index 2e005f1d5..3db9777c6 100644 --- a/src/backend/base/langflow/components/inputs/TextInput.py +++ b/src/backend/base/langflow/components/inputs/TextInput.py @@ -7,6 +7,7 @@ from langflow.field_typing import Text class TextInput(TextComponent): display_name = "Text Input" description = "Get text inputs from the Interaction Panel." + icon = "type" def build_config(self): return { diff --git a/src/backend/base/langflow/components/outputs/TextOutput.py b/src/backend/base/langflow/components/outputs/TextOutput.py index 4c0c83495..b3917966b 100644 --- a/src/backend/base/langflow/components/outputs/TextOutput.py +++ b/src/backend/base/langflow/components/outputs/TextOutput.py @@ -7,6 +7,7 @@ from langflow.field_typing import Text class TextOutput(TextComponent): display_name = "Text Output" description = "Display a text output in the Interaction Panel." + icon = "type" def build_config(self): return { diff --git a/src/frontend/src/utils/styleUtils.ts b/src/frontend/src/utils/styleUtils.ts index 245a2058d..f298e8a6a 100644 --- a/src/frontend/src/utils/styleUtils.ts +++ b/src/frontend/src/utils/styleUtils.ts @@ -116,6 +116,7 @@ import { TerminalIcon, TerminalSquare, TextCursorInput, + TextSearch, ToyBrick, Trash2, Type, @@ -371,7 +372,7 @@ export const nodeIconsLucide: iconsType = { saved_components: GradientSave, documentloaders: Paperclip, vectorstores: Layers, - vectorsearch: Search, + vectorsearch: TextSearch, toolkits: Package2, textsplitters: Scissors, wrappers: Gift,