From fe3f3658851d268d1387cc5de97bd151fbdb7ef2 Mon Sep 17 00:00:00 2001 From: igorrCarvalho Date: Mon, 10 Jun 2024 12:39:39 -0300 Subject: [PATCH 01/29] Fix: use stopImmediatePropagation to prevent macOS bugs --- .../src/pages/FlowPage/components/PageComponent/index.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx b/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx index c78fdf10d..fd2190e53 100644 --- a/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx +++ b/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx @@ -180,6 +180,7 @@ export default function Page({ function handleUndo(e: KeyboardEvent) { e.preventDefault(); + e.stopImmediatePropagation(); if (!isWrappedWithClass(e, "noundo")) { undo(); } @@ -187,6 +188,7 @@ export default function Page({ function handleRedo(e: KeyboardEvent) { e.preventDefault(); + e.stopImmediatePropagation(); if (!isWrappedWithClass(e, "noundo")) { redo(); } @@ -194,6 +196,7 @@ export default function Page({ function handleGroup(e: KeyboardEvent) { e.preventDefault(); + e.stopImmediatePropagation(); if (selectionMenuVisible) { handleGroupNode(); } @@ -202,6 +205,7 @@ export default function Page({ function handleDuplicate(e: KeyboardEvent) { e.preventDefault(); e.stopPropagation(); + e.stopImmediatePropagation(); const selectedNode = nodes.filter((obj) => obj.selected); if (selectedNode.length > 0) { paste( @@ -216,6 +220,7 @@ export default function Page({ function handleCopy(e: KeyboardEvent) { e.preventDefault(); + e.stopImmediatePropagation(); if ( !isWrappedWithClass(e, "nocopy") && window.getSelection()?.toString().length === 0 && @@ -227,6 +232,7 @@ export default function Page({ function handleCut(e: KeyboardEvent) { e.preventDefault(); + e.stopImmediatePropagation(); if ( !isWrappedWithClass(e, "nocopy") && window.getSelection()?.toString().length === 0 && @@ -238,6 +244,7 @@ export default function Page({ function handlePaste(e: KeyboardEvent) { e.preventDefault(); + e.stopImmediatePropagation(); if ( !isWrappedWithClass(e, "nocopy") && window.getSelection()?.toString().length === 0 && @@ -253,6 +260,7 @@ export default function Page({ function handleDelete(e: KeyboardEvent) { e.preventDefault(); + e.stopImmediatePropagation(); if (!isWrappedWithClass(e, "nodelete") && lastSelection) { takeSnapshot(); deleteNode(lastSelection.nodes.map((node) => node.id)); From d0a03b15639e630cf382e524c0cf9f307894a99b Mon Sep 17 00:00:00 2001 From: ogabrielluiz Date: Mon, 10 Jun 2024 12:51:30 -0300 Subject: [PATCH 02/29] feat: Add LangChainIcon component and export it in index.tsx --- src/frontend/src/icons/LangChain/LangChainIcon.jsx | 10 ++++++++++ src/frontend/src/icons/LangChain/index.tsx | 9 +++++++++ src/frontend/src/icons/LangChain/langchain-icon.svg | 5 +++++ src/frontend/src/utils/styleUtils.ts | 7 ++++--- 4 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 src/frontend/src/icons/LangChain/LangChainIcon.jsx create mode 100644 src/frontend/src/icons/LangChain/index.tsx create mode 100644 src/frontend/src/icons/LangChain/langchain-icon.svg diff --git a/src/frontend/src/icons/LangChain/LangChainIcon.jsx b/src/frontend/src/icons/LangChain/LangChainIcon.jsx new file mode 100644 index 000000000..c68bd3f4f --- /dev/null +++ b/src/frontend/src/icons/LangChain/LangChainIcon.jsx @@ -0,0 +1,10 @@ +const SvgLangChainIcon = (props) => ( + + + + + + + +); +export default SvgLangChainIcon; diff --git a/src/frontend/src/icons/LangChain/index.tsx b/src/frontend/src/icons/LangChain/index.tsx new file mode 100644 index 000000000..48b8566e1 --- /dev/null +++ b/src/frontend/src/icons/LangChain/index.tsx @@ -0,0 +1,9 @@ +import React, { forwardRef } from "react"; +import SvgLangChainIcon from "./LangChainIcon"; + +export const LangChainIcon = forwardRef< + SVGSVGElement, + React.PropsWithChildren<{}> +>((props, ref) => { + return ; +}); diff --git a/src/frontend/src/icons/LangChain/langchain-icon.svg b/src/frontend/src/icons/LangChain/langchain-icon.svg new file mode 100644 index 000000000..e80068b50 --- /dev/null +++ b/src/frontend/src/icons/LangChain/langchain-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/frontend/src/utils/styleUtils.ts b/src/frontend/src/utils/styleUtils.ts index 123702b60..9a65e4f27 100644 --- a/src/frontend/src/utils/styleUtils.ts +++ b/src/frontend/src/utils/styleUtils.ts @@ -1,5 +1,6 @@ import { AlertCircle, + AlertTriangle, ArrowBigUp, ArrowLeft, ArrowUpToLine, @@ -116,7 +117,6 @@ import { Settings, Settings2, Share, - AlertTriangle, Share2, Shield, Sliders, @@ -146,11 +146,10 @@ import { Variable, Wand2, Workflow, + Wrench, X, XCircle, Zap, - PlaySquare, - Wrench, } from "lucide-react"; import { FaApple, FaDiscord, FaGithub } from "react-icons/fa"; import { AWSIcon } from "../icons/AWS"; @@ -177,6 +176,7 @@ import { import { GroqIcon } from "../icons/Groq"; import { HuggingFaceIcon } from "../icons/HuggingFace"; import { IFixIcon } from "../icons/IFixIt"; +import { LangChainIcon } from "../icons/LangChain"; import { MetaIcon } from "../icons/Meta"; import { MidjourneyIcon } from "../icons/Midjorney"; import { MongoDBIcon } from "../icons/MongoDB"; @@ -325,6 +325,7 @@ export const nodeIconsLucide: iconsType = { ChatOllamaModel: OllamaIcon, Faiss: MetaIcon, FaissSearch: MetaIcon, + LangChain: LangChainIcon, AzureOpenAiModel: AzureIcon, Redis: RedisIcon, RedisSearch: RedisIcon, From 23b2bf2358883efe26e00dba995259dd82fe710f Mon Sep 17 00:00:00 2001 From: ogabrielluiz Date: Mon, 10 Jun 2024 12:59:06 -0300 Subject: [PATCH 03/29] feat: Add SelfQueryRetrieverComponent to langflow retrievers --- .../retrievers/SelfQueryRetriever.py | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/backend/base/langflow/components/retrievers/SelfQueryRetriever.py diff --git a/src/backend/base/langflow/components/retrievers/SelfQueryRetriever.py b/src/backend/base/langflow/components/retrievers/SelfQueryRetriever.py new file mode 100644 index 000000000..a46bf7bd8 --- /dev/null +++ b/src/backend/base/langflow/components/retrievers/SelfQueryRetriever.py @@ -0,0 +1,39 @@ +# from langflow.field_typing import Data +from langchain.chains.query_constructor.base import AttributeInfo +from langchain.retrievers.self_query.base import SelfQueryRetriever +from langchain_core.vectorstores import VectorStore + +from langflow.custom import CustomComponent +from langflow.field_typing import BaseLanguageModel +from langflow.schema import Record +from langflow.schema.message import Message + + +class SelfQueryRetrieverComponent(CustomComponent): + display_name: str = "Self Query Retriever" + description: str = "Retriever that uses a vector store and an LLM to generate the vector store queries." + icon = "LangChain" + + def build( + self, + query: Message, + vectorstore: VectorStore, + metadata_field_info: list[AttributeInfo], + document_content_description: str, + llm: BaseLanguageModel, + ) -> Record: + metadata_field_info = [i[0] for i in metadata_field_info] + + self_query_retriever = SelfQueryRetriever.from_llm( + llm, + vectorstore, + document_content_description, + metadata_field_info, + enable_limit=True, + ) + + input_text = query.text + documents = self_query_retriever.invoke(input=input_text) + records = [Record.from_document(document) for document in documents] + self.status = records + return records From ed20dd606f91e998493e458eb870ba67c37dfa47 Mon Sep 17 00:00:00 2001 From: ogabrielluiz Date: Mon, 10 Jun 2024 13:07:00 -0300 Subject: [PATCH 04/29] chore: Update keyboard shortcut for API to "mod+shift+r" --- src/frontend/src/stores/shortcuts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/src/stores/shortcuts.ts b/src/frontend/src/stores/shortcuts.ts index c0b271849..d792a0d6c 100644 --- a/src/frontend/src/stores/shortcuts.ts +++ b/src/frontend/src/stores/shortcuts.ts @@ -23,7 +23,7 @@ export const useShortcutsStore = create((set, get) => ({ group: "mod+g", cut: "mod+x", paste: "mod+v", - api: "mod+r", + api: "mod+shift+r", update: "mod+u", download: "mod+j", freeze: "mod+f", From 246ea90b2398bdeb46f2844dd0e078a1eb2ba347 Mon Sep 17 00:00:00 2001 From: cristhianzl Date: Mon, 10 Jun 2024 13:21:10 -0300 Subject: [PATCH 05/29] =?UTF-8?q?=E2=9C=A8=20(tailwind.config.js):=20add?= =?UTF-8?q?=20custom=20focus-visible=20styles=20to=20improve=20accessibili?= =?UTF-8?q?ty=20and=20user=20experience?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/tailwind.config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/frontend/tailwind.config.js b/src/frontend/tailwind.config.js index 6f99f7b58..11e9c9d25 100644 --- a/src/frontend/tailwind.config.js +++ b/src/frontend/tailwind.config.js @@ -237,6 +237,10 @@ module.exports = { ".text-align-last-right": { "text-align-last": "right", }, + ":focus-visible": { + outline: "none !important", + outlineOffset: "0px !important", + }, }); }), require("@tailwindcss/typography"), From 65037a43a57cfe11d833be2c9ac492bee8ef5be7 Mon Sep 17 00:00:00 2001 From: ogabrielluiz Date: Mon, 10 Jun 2024 14:11:04 -0300 Subject: [PATCH 06/29] refactor: Update session_id parameter in build_and_cache_graph_from_db function --- src/backend/base/langflow/api/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/base/langflow/api/utils.py b/src/backend/base/langflow/api/utils.py index 1dbd68d8f..82bd32165 100644 --- a/src/backend/base/langflow/api/utils.py +++ b/src/backend/base/langflow/api/utils.py @@ -219,7 +219,7 @@ async def build_and_cache_graph_from_db(flow_id: str, session: Session, chat_ser if vertex is None: raise ValueError(f"Vertex {vertex_id} not found") if not vertex._raw_params.get("session_id"): - vertex.update_raw_params({"session_id": flow_id}) + vertex.update_raw_params({"session_id": flow_id}, overwrite=True) await chat_service.set_cache(flow_id, graph) return graph From 6eac507eb9bb64e26931bd5dfe3447b9fff34f56 Mon Sep 17 00:00:00 2001 From: ogabrielluiz Date: Mon, 10 Jun 2024 14:11:43 -0300 Subject: [PATCH 07/29] feat: Update RecordsOutput build method to set status --- .../base/langflow/components/outputs/RecordsOutput.py | 1 + .../outputModal/components/switchOutputView/index.tsx | 2 +- .../src/modals/IOModal/components/IOFieldView/index.tsx | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/backend/base/langflow/components/outputs/RecordsOutput.py b/src/backend/base/langflow/components/outputs/RecordsOutput.py index c750e675b..cbd268ea6 100644 --- a/src/backend/base/langflow/components/outputs/RecordsOutput.py +++ b/src/backend/base/langflow/components/outputs/RecordsOutput.py @@ -16,4 +16,5 @@ class RecordOutput(CustomComponent): } def build(self, input_value: Record) -> Record: + self.status = input_value return input_value diff --git a/src/frontend/src/CustomNodes/GenericNode/components/outputModal/components/switchOutputView/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/outputModal/components/switchOutputView/index.tsx index 307c77c1a..437adb511 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/outputModal/components/switchOutputView/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/outputModal/components/switchOutputView/index.tsx @@ -28,7 +28,7 @@ export default function SwitchOutputView(nodeId): JSX.Element { if (resultMessage.raw) { resultMessage = resultMessage.raw; } - console.log("resultType", results); + return ( <> diff --git a/src/frontend/src/modals/IOModal/components/IOFieldView/index.tsx b/src/frontend/src/modals/IOModal/components/IOFieldView/index.tsx index 20cf9f691..4de8d0687 100644 --- a/src/frontend/src/modals/IOModal/components/IOFieldView/index.tsx +++ b/src/frontend/src/modals/IOModal/components/IOFieldView/index.tsx @@ -254,7 +254,11 @@ export default function IOFieldView({
artifact.data + ) ?? [] + } columnMode="union" />
From f8aa1274fc87233436930eaf9aa358219b3f13d6 Mon Sep 17 00:00:00 2001 From: ogabrielluiz Date: Mon, 10 Jun 2024 14:12:24 -0300 Subject: [PATCH 08/29] =?UTF-8?q?=E2=9C=A8=20(record.py):=20add=20=5F=5Feq?= =?UTF-8?q?=5F=5F=20method=20to=20compare=20Record=20instances=20based=20o?= =?UTF-8?q?n=20their=20data=20attribute?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/base/langflow/schema/record.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/backend/base/langflow/schema/record.py b/src/backend/base/langflow/schema/record.py index 830f576ba..67d9b5da8 100644 --- a/src/backend/base/langflow/schema/record.py +++ b/src/backend/base/langflow/schema/record.py @@ -1,12 +1,12 @@ import copy import json -from typing import cast, Optional +from typing import Optional, cast from langchain_core.documents import Document from langchain_core.messages import AIMessage, BaseMessage, HumanMessage, SystemMessage +from langchain_core.prompt_values import ImagePromptValue from langchain_core.prompts.image import ImagePromptTemplate from pydantic import BaseModel, model_serializer, model_validator -from langchain_core.prompt_values import ImagePromptValue class Record(BaseModel): @@ -200,3 +200,6 @@ class Record(BaseModel): def __contains__(self, key): return key in self.data + + def __eq__(self, other): + return isinstance(other, Record) and self.data == other.data From 0de6c2a88fb99b4891e09c849c9d39a72af48597 Mon Sep 17 00:00:00 2001 From: ogabrielluiz Date: Mon, 10 Jun 2024 14:12:32 -0300 Subject: [PATCH 09/29] feat: Update Prompt class to assign formatted prompt to self.text --- src/backend/base/langflow/field_typing/prompt.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/backend/base/langflow/field_typing/prompt.py b/src/backend/base/langflow/field_typing/prompt.py index ef6c7ce9a..029261ac7 100644 --- a/src/backend/base/langflow/field_typing/prompt.py +++ b/src/backend/base/langflow/field_typing/prompt.py @@ -25,6 +25,7 @@ class Prompt(Record): prompt_template = PromptTemplate.from_template(self.template) variables_with_str_values = dict_values_to_string(self.variables) formatted_prompt = prompt_template.format(**variables_with_str_values) + self.text = formatted_prompt return formatted_prompt @classmethod From 6c27964edd2213671f3c859653dcb9afb49d1c49 Mon Sep 17 00:00:00 2001 From: ogabrielluiz Date: Mon, 10 Jun 2024 14:12:50 -0300 Subject: [PATCH 10/29] =?UTF-8?q?=F0=9F=90=9B=20(custom=5Fcomponent.py):?= =?UTF-8?q?=20fix=20resolving=20path=20logic=20to=20handle=20empty=20path?= =?UTF-8?q?=20input=20and=20check=20if=20path=20parts=20exist=20before=20a?= =?UTF-8?q?ccessing=20the=20first=20part?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../langflow/custom/custom_component/custom_component.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/backend/base/langflow/custom/custom_component/custom_component.py b/src/backend/base/langflow/custom/custom_component/custom_component.py index 896b07337..5c1da081b 100644 --- a/src/backend/base/langflow/custom/custom_component/custom_component.py +++ b/src/backend/base/langflow/custom/custom_component/custom_component.py @@ -126,8 +126,11 @@ class CustomComponent(Component): @staticmethod def resolve_path(path: str) -> str: """Resolves the path to an absolute path.""" + if not path: + return path path_object = Path(path) - if path_object.parts[0] == "~": + + if path_object.parts and path_object.parts[0] == "~": path_object = path_object.expanduser() elif path_object.is_relative_to("."): path_object = path_object.resolve() From 2f4ebb290a1e5eefddac51f4fd2746cc672d2f9c Mon Sep 17 00:00:00 2001 From: cristhianzl Date: Mon, 10 Jun 2024 14:14:39 -0300 Subject: [PATCH 11/29] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20(TableOptions):=20re?= =?UTF-8?q?order=20imports=20for=20better=20readability=20=F0=9F=92=84=20(?= =?UTF-8?q?TableOptions):=20adjust=20gap=20between=20buttons=20for=20bette?= =?UTF-8?q?r=20UI=20spacing=20=F0=9F=92=84=20(TableOptions):=20update=20ic?= =?UTF-8?q?on=20styles=20for=20better=20visual=20feedback=20=E2=9C=A8=20(e?= =?UTF-8?q?ditNodeModal):=20add=20dark=20mode=20support=20for=20badge=20co?= =?UTF-8?q?mponent=20=E2=99=BB=EF=B8=8F=20(editNodeModal):=20refactor=20fu?= =?UTF-8?q?nction=20parameters=20for=20consistency=20=F0=9F=92=84=20(heade?= =?UTF-8?q?rComponent):=20update=20icon=20hover=20color=20for=20better=20U?= =?UTF-8?q?X=20consistency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/TableOptions/index.tsx | 13 ++++++++----- src/frontend/src/modals/editNodeModal/index.tsx | 7 ++++++- .../MainPage/components/headerComponent/index.tsx | 2 +- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/frontend/src/components/tableComponent/components/TableOptions/index.tsx b/src/frontend/src/components/tableComponent/components/TableOptions/index.tsx index 7ad2d11f3..dcf246fda 100644 --- a/src/frontend/src/components/tableComponent/components/TableOptions/index.tsx +++ b/src/frontend/src/components/tableComponent/components/TableOptions/index.tsx @@ -1,7 +1,7 @@ import { cn } from "../../../../utils/utils"; +import IconComponent from "../../../genericIconComponent"; import ShadTooltip from "../../../shadTooltipComponent"; import { Button } from "../../../ui/button"; -import IconComponent from "../../../genericIconComponent"; export default function TableOptions({ resetGrid, @@ -18,7 +18,7 @@ export default function TableOptions({ }): JSX.Element { return (
-
+
@@ -81,8 +84,8 @@ export default function TableOptions({ diff --git a/src/frontend/src/modals/editNodeModal/index.tsx b/src/frontend/src/modals/editNodeModal/index.tsx index 4e910ca84..63849cd7e 100644 --- a/src/frontend/src/modals/editNodeModal/index.tsx +++ b/src/frontend/src/modals/editNodeModal/index.tsx @@ -3,6 +3,7 @@ import { forwardRef, useEffect, useRef, useState } from "react"; import IconComponent from "../../components/genericIconComponent"; import TableComponent from "../../components/tableComponent"; import { Badge } from "../../components/ui/badge"; +import { useDarkStore } from "../../stores/darkStore"; import useFlowStore from "../../stores/flowStore"; import { NodeDataType } from "../../types/flow"; import BaseModal from "../baseModal"; @@ -28,6 +29,8 @@ const EditNodeModal = forwardRef( ) => { const myData = useRef(data); + const isDark = useDarkStore((state) => state.dark); + const setNode = useFlowStore((state) => state.setNode); function changeAdvanced(n) { @@ -85,7 +88,9 @@ const EditNodeModal = forwardRef( {data.type} - ID: {data.id} + + ID: {data.id} +
diff --git a/src/frontend/src/pages/MainPage/components/headerComponent/index.tsx b/src/frontend/src/pages/MainPage/components/headerComponent/index.tsx index f4e518e19..151cdd902 100644 --- a/src/frontend/src/pages/MainPage/components/headerComponent/index.tsx +++ b/src/frontend/src/pages/MainPage/components/headerComponent/index.tsx @@ -107,7 +107,7 @@ const HeaderComponent = ({ name="Trash2" className={cn( "h-5 w-5 text-primary transition-all", - disableFunctions ? "" : "hover:text-destructive", + disableFunctions ? "" : "hover:text-status-red", )} /> From becdb49661c7071cac0ee0acac42656d4f4c53c9 Mon Sep 17 00:00:00 2001 From: ogabrielluiz Date: Mon, 10 Jun 2024 14:13:10 -0300 Subject: [PATCH 12/29] refactor: Rename 'document' variable to 'text' in chroma_collection_to_records function --- src/backend/base/langflow/base/vectorstores/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/base/langflow/base/vectorstores/utils.py b/src/backend/base/langflow/base/vectorstores/utils.py index e8d93ff37..739181600 100644 --- a/src/backend/base/langflow/base/vectorstores/utils.py +++ b/src/backend/base/langflow/base/vectorstores/utils.py @@ -15,7 +15,7 @@ def chroma_collection_to_records(collection_dict: dict): for i, doc in enumerate(collection_dict["documents"]): record_dict = { "id": collection_dict["ids"][i], - "document": doc, + "text": doc, } if "metadatas" in collection_dict: for key, value in collection_dict["metadatas"][i].items(): From 24e8da5086faac90b3a79a7b5e3b542f65b97e45 Mon Sep 17 00:00:00 2001 From: ogabrielluiz Date: Mon, 10 Jun 2024 14:14:18 -0300 Subject: [PATCH 13/29] refactor: Update ChromaComponent build method to allow duplicates in the Vector Store --- .../components/vectorstores/Chroma.py | 52 +++++++++++-------- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/src/backend/base/langflow/components/vectorstores/Chroma.py b/src/backend/base/langflow/components/vectorstores/Chroma.py index b7cfad7d4..6001b119c 100644 --- a/src/backend/base/langflow/components/vectorstores/Chroma.py +++ b/src/backend/base/langflow/components/vectorstores/Chroma.py @@ -1,3 +1,4 @@ +from copy import deepcopy from typing import List, Optional, Union import chromadb @@ -6,6 +7,7 @@ from langchain_chroma import Chroma from langchain_core.embeddings import Embeddings from langchain_core.retrievers import BaseRetriever from langchain_core.vectorstores import VectorStore + from langflow.base.vectorstores.utils import chroma_collection_to_records from langflow.custom import CustomComponent from langflow.schema import Record @@ -48,6 +50,11 @@ class ChromaComponent(CustomComponent): "display_name": "Server SSL Enabled", "advanced": True, }, + "allow_duplicates": { + "display_name": "Allow Duplicates", + "advanced": True, + "info": "If false, will not add documents that are already in the Vector Store.", + }, } def build( @@ -61,6 +68,7 @@ class ChromaComponent(CustomComponent): chroma_server_host: Optional[str] = None, chroma_server_http_port: Optional[int] = None, chroma_server_grpc_port: Optional[int] = None, + allow_duplicates: bool = False, ) -> Union[VectorStore, BaseRetriever]: """ Builds the Vector Store or BaseRetriever object. @@ -75,6 +83,7 @@ class ChromaComponent(CustomComponent): - chroma_server_host (Optional[str]): The host for the Chroma server. - chroma_server_http_port (Optional[int]): The HTTP port for the Chroma server. - chroma_server_grpc_port (Optional[int]): The gRPC port for the Chroma server. + - allow_duplicates (bool): Whether to allow duplicates in the Vector Store. Returns: - Union[VectorStore, BaseRetriever]: The Vector Store or BaseRetriever object. @@ -93,35 +102,34 @@ class ChromaComponent(CustomComponent): ) client = chromadb.HttpClient(settings=chroma_settings) - # If documents, then we need to create a Chroma instance using .from_documents - # Check index_directory and expand it if it is a relative path if index_directory is not None: index_directory = self.resolve_path(index_directory) + chroma = Chroma( + persist_directory=index_directory, + client=client, + embedding_function=embedding, + collection_name=collection_name, + ) + if allow_duplicates: + stored_records = [] + else: + stored_records = chroma_collection_to_records(chroma.get()) + _stored_documents_without_id = [] + for record in deepcopy(stored_records): + del record.id + _stored_documents_without_id.append(record) documents = [] for _input in inputs or []: if isinstance(_input, Record): - documents.append(_input.to_lc_document()) + if _input not in _stored_documents_without_id: + documents.append(_input.to_lc_document()) else: - documents.append(_input) - if documents is not None and embedding is not None: - if len(documents) == 0: - raise ValueError("If documents are provided, there must be at least one document.") - chroma = Chroma.from_documents( - documents=documents, # type: ignore - persist_directory=index_directory, - collection_name=collection_name, - embedding=embedding, - client=client, - ) - else: - chroma = Chroma( - persist_directory=index_directory, - client=client, - embedding_function=embedding, - ) + raise ValueError("Inputs must be a Record objects.") - store = chroma.get() - self.status = chroma_collection_to_records(store) + if documents and embedding is not None: + chroma.add_documents(documents) + + self.status = stored_records return chroma From f872a3e753ece33cb219f93e6e3826422f937831 Mon Sep 17 00:00:00 2001 From: ogabrielluiz Date: Mon, 10 Jun 2024 14:29:16 -0300 Subject: [PATCH 14/29] refactor: Update SelfQueryRetrieverComponent build method to handle different input types --- .../retrievers/SelfQueryRetriever.py | 49 +++++++++++++++---- 1 file changed, 39 insertions(+), 10 deletions(-) diff --git a/src/backend/base/langflow/components/retrievers/SelfQueryRetriever.py b/src/backend/base/langflow/components/retrievers/SelfQueryRetriever.py index a46bf7bd8..3e6d6f696 100644 --- a/src/backend/base/langflow/components/retrievers/SelfQueryRetriever.py +++ b/src/backend/base/langflow/components/retrievers/SelfQueryRetriever.py @@ -4,7 +4,7 @@ from langchain.retrievers.self_query.base import SelfQueryRetriever from langchain_core.vectorstores import VectorStore from langflow.custom import CustomComponent -from langflow.field_typing import BaseLanguageModel +from langflow.field_typing import BaseLanguageModel, Text from langflow.schema import Record from langflow.schema.message import Message @@ -14,25 +14,54 @@ class SelfQueryRetrieverComponent(CustomComponent): description: str = "Retriever that uses a vector store and an LLM to generate the vector store queries." icon = "LangChain" + def build_config(self): + return { + "query": { + "display_name": "Query", + "input_types": ["Message", "Text"], + "info": "Query to be passed as input.", + }, + "vectorstore": { + "display_name": "Vector Store", + "info": "Vector Store to be passed as input.", + }, + "attribute_infos": { + "display_name": "Metadata Field Info", + "info": "Metadata Field Info to be passed as input.", + }, + "document_content_description": { + "display_name": "Document Content Description", + "info": "Document Content Description to be passed as input.", + }, + "llm": { + "display_name": "LLM", + "info": "LLM to be passed as input.", + }, + } + def build( self, query: Message, vectorstore: VectorStore, - metadata_field_info: list[AttributeInfo], - document_content_description: str, + attribute_infos: list[Record], + document_content_description: Text, llm: BaseLanguageModel, ) -> Record: - metadata_field_info = [i[0] for i in metadata_field_info] - + metadata_field_infos = [AttributeInfo(**record.data) for record in attribute_infos] self_query_retriever = SelfQueryRetriever.from_llm( - llm, - vectorstore, - document_content_description, - metadata_field_info, + llm=llm, + vectorstore=vectorstore, + document_contents=document_content_description, + metadata_field_info=metadata_field_infos, enable_limit=True, ) - input_text = query.text + if isinstance(query, Message): + input_text = query.text + elif isinstance(query, str): + input_text = query + else: + raise ValueError(f"Query type {type(query)} not supported.") documents = self_query_retriever.invoke(input=input_text) records = [Record.from_document(document) for document in documents] self.status = records From 65773b424f04b685e8d43837b249d7ddc55980bd Mon Sep 17 00:00:00 2001 From: ogabrielluiz Date: Mon, 10 Jun 2024 14:30:27 -0300 Subject: [PATCH 15/29] refactor: Update .gitattributes to remove working-tree-encoding for .mdx and .json files --- .gitattributes | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitattributes b/.gitattributes index d6e351bc3..379b21be8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -11,12 +11,12 @@ *.ts text *.tsx text *.md text -*.mdx text working-tree-encoding = UTF-8 +*.mdx text *.yml text *.yaml text *.xml text *.csv text -*.json text working-tree-encoding = UTF-8 +*.json text *.sh text *.Dockerfile text Dockerfile text From c143ad51246296b273fa46745340d4490e687add Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Mon, 10 Jun 2024 14:41:42 -0300 Subject: [PATCH 16/29] Fixed header not being aligned --- src/frontend/src/components/headerComponent/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/src/components/headerComponent/index.tsx b/src/frontend/src/components/headerComponent/index.tsx index 979dcc88b..ba8ee5bf2 100644 --- a/src/frontend/src/components/headerComponent/index.tsx +++ b/src/frontend/src/components/headerComponent/index.tsx @@ -79,7 +79,7 @@ export default function Header(): JSX.Element { return (
-
+
⛓️ From 5cda2adc4d263e0557794806f3449536ad580aab Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Mon, 10 Jun 2024 14:50:06 -0300 Subject: [PATCH 17/29] Added node play on hover of entire node again --- .../CustomNodes/hooks/use-icons-status.tsx | 37 ++++++++++++------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx b/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx index ec378fac2..55936c6c9 100644 --- a/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx @@ -4,11 +4,21 @@ import Loading from "../../components/ui/loading"; import Xmark from "../../components/ui/xmark"; import { BuildStatus } from "../../constants/enums"; import { VertexBuildTypeAPI } from "../../types/api"; +import { cn } from "../../utils/utils"; const useIconStatus = ( buildStatus: BuildStatus | undefined, validationStatus: VertexBuildTypeAPI | null, ) => { + const conditionSuccess = validationStatus && validationStatus.valid; + const conditionInactive = + validationStatus && + !validationStatus.valid && + buildStatus === BuildStatus.INACTIVE; + const conditionError = + buildStatus === BuildStatus.ERROR || + (validationStatus && !validationStatus.valid); + const renderIconStatus = () => { if (buildStatus === BuildStatus.BUILDING) { return ; @@ -17,31 +27,30 @@ const useIconStatus = ( <> - {validationStatus && validationStatus.valid ? ( + {conditionSuccess ? ( - ) : validationStatus && - !validationStatus.valid && - buildStatus === BuildStatus.INACTIVE ? ( + ) : conditionInactive ? ( - ) : buildStatus === BuildStatus.ERROR || - (validationStatus && !validationStatus.valid) ? ( + ) : conditionError ? ( ) : ( - + <> )} ); From 6d89ea555d34ce182ac2b1ce1959ecd410cff636 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Mon, 10 Jun 2024 14:58:13 -0300 Subject: [PATCH 18/29] Fixed update shortcut not working --- src/frontend/src/CustomNodes/GenericNode/index.tsx | 1 + .../FlowPage/components/nodeToolbarComponent/index.tsx | 4 ++++ src/frontend/src/types/components/index.ts | 9 +++++---- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/frontend/src/CustomNodes/GenericNode/index.tsx b/src/frontend/src/CustomNodes/GenericNode/index.tsx index 018e99a7c..f66e1e638 100644 --- a/src/frontend/src/CustomNodes/GenericNode/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/index.tsx @@ -260,6 +260,7 @@ export default function GenericNode({ openAdvancedModal={false} onCloseAdvancedModal={() => {}} selected={selected} + updateNode={handleUpdateCode} /> ); diff --git a/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx b/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx index 295384fea..72c437a05 100644 --- a/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx +++ b/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx @@ -46,6 +46,7 @@ export default function NodeToolbarComponent({ selected, setShowState, onCloseAdvancedModal, + updateNode, }: nodeToolbarPropsType): JSX.Element { const version = useDarkStore((state) => state.version); const [showModalAdvanced, setShowModalAdvanced] = useState(false); @@ -307,6 +308,9 @@ export default function NodeToolbarComponent({ case "delete": deleteNode(data.id); break; + case "update": + updateNode(); + break; case "copy": const node = nodes.filter((node) => node.id === data.id); setLastCopiedSelection({ nodes: _.cloneDeep(node), edges: [] }); diff --git a/src/frontend/src/types/components/index.ts b/src/frontend/src/types/components/index.ts index 8d1fef5d1..3cae3f838 100644 --- a/src/frontend/src/types/components/index.ts +++ b/src/frontend/src/types/components/index.ts @@ -491,7 +491,7 @@ export type ChatInputType = { isDragging: boolean; files: FilePreviewType[]; setFiles: ( - files: FilePreviewType[] | ((prev: FilePreviewType[]) => FilePreviewType[]) + files: FilePreviewType[] | ((prev: FilePreviewType[]) => FilePreviewType[]), ) => void; chatValue: string; inputRef: { @@ -547,6 +547,7 @@ export type nodeToolbarPropsType = { onCloseAdvancedModal?: (close: boolean) => void; selected: boolean; setShowState: (show: boolean | SetStateAction) => void; + updateNode: () => void; }; export type parsedDataType = { @@ -593,7 +594,7 @@ export type chatMessagePropsType = { updateChat: ( chat: ChatMessageType, message: string, - stream_url?: string + stream_url?: string, ) => void; }; @@ -685,12 +686,12 @@ export type codeTabsPropsType = { value: string, node: NodeType, template: TemplateVariableType, - tweak: tweakType + tweak: tweakType, ) => string; buildTweakObject?: ( tw: string, changes: string | string[] | boolean | number | Object[] | Object, - template: TemplateVariableType + template: TemplateVariableType, ) => Promise; }; activeTweaks?: boolean; From 1726561f397843cae5dc246b4552468ef64866ff Mon Sep 17 00:00:00 2001 From: ogabrielluiz Date: Mon, 10 Jun 2024 15:16:49 -0300 Subject: [PATCH 19/29] format --- src/backend/base/langflow/api/v1/files.py | 3 +- src/backend/base/langflow/helpers/folders.py | 2 +- src/frontend/src/App.tsx | 6 +-- .../components/parameterComponent/index.tsx | 16 +++--- .../tooltipRenderComponent/index.tsx | 2 +- .../src/CustomNodes/GenericNode/index.tsx | 38 +++++++------- .../helpers/get-class-from-build-status.ts | 2 +- .../hooks/use-check-code-validity.tsx | 2 +- .../hooks/use-fetch-data-on-mount.tsx | 2 +- .../hooks/use-handle-new-value.tsx | 2 +- .../hooks/use-handle-node-class.tsx | 2 +- .../src/CustomNodes/hooks/use-icon-render.tsx | 4 +- .../CustomNodes/hooks/use-icons-status.tsx | 2 +- .../hooks/use-update-node-code.tsx | 4 +- .../src/CustomNodes/utils/get-field-title.tsx | 2 +- .../src/alerts/alertDropDown/index.tsx | 6 +-- .../src/components/ImageViewer/index.tsx | 14 +++--- .../folderAccordionComponent/index.tsx | 2 +- .../components/accordionComponent/index.tsx | 4 +- .../addNewVariableButton.tsx | 6 +-- .../components/dragCardComponent/index.tsx | 4 +- .../src/components/cardComponent/index.tsx | 18 +++---- .../components/cardsWrapComponent/index.tsx | 2 +- .../src/components/chatComponent/index.tsx | 10 ++-- .../components/codeAreaComponent/index.tsx | 2 +- .../components/codeTabsComponent/index.tsx | 45 ++++++++--------- .../src/components/dictComponent/index.tsx | 2 +- .../components/dropdownComponent/index.tsx | 4 +- .../editFlowSettingsComponent/index.tsx | 2 +- .../components/genericIconComponent/index.tsx | 6 +-- .../components/menuBar/index.tsx | 2 +- .../src/components/headerComponent/index.tsx | 19 +++---- .../horizontalScrollFadeComponent/index.tsx | 4 +- .../components/popover/index.tsx | 16 +++--- .../components/popoverObject/index.tsx | 24 ++++----- .../src/components/inputComponent/index.tsx | 12 ++--- .../components/inputFileComponent/index.tsx | 4 +- .../components/inputGlobalComponent/index.tsx | 8 +-- .../components/inputListComponent/index.tsx | 2 +- .../components/sideBarButtons/index.tsx | 2 +- .../components/sideBarFolderButtons/index.tsx | 18 +++---- .../hooks/use-on-file-drop.tsx | 10 ++-- .../components/TableOptions/index.tsx | 4 +- .../components/tableAutoCellRender/index.tsx | 3 +- .../components/tableNodeCellRender/index.tsx | 6 +-- .../src/components/tableComponent/index.tsx | 9 ++-- .../tagsSelectorComponent/index.tsx | 2 +- src/frontend/src/components/ui/accordion.tsx | 6 +-- src/frontend/src/components/ui/alert.tsx | 2 +- src/frontend/src/components/ui/button.tsx | 6 +-- src/frontend/src/components/ui/card.tsx | 4 +- src/frontend/src/components/ui/checkbox.tsx | 4 +- .../src/components/ui/custom-accordion.tsx | 4 +- src/frontend/src/components/ui/form.tsx | 8 +-- .../src/components/ui/select-custom.tsx | 6 +-- src/frontend/src/components/ui/toggle.tsx | 2 +- src/frontend/src/components/ui/tooltip.tsx | 4 +- src/frontend/src/controllers/API/api.tsx | 12 ++--- .../API/helpers/check-duplicate-requests.ts | 2 +- src/frontend/src/icons/Groq/index.tsx | 2 +- .../src/icons/LangChain/LangChainIcon.jsx | 28 ++++++++--- src/frontend/src/icons/Streamlit/index.tsx | 2 +- src/frontend/src/index.tsx | 5 +- .../BundleModal/hooks/submit-folder.tsx | 4 +- .../components/csvSelect/index.tsx | 2 +- .../components/SessionView/hooks/index.tsx | 2 +- .../IOModal/components/SessionView/index.tsx | 18 ++----- .../components/buttonSendWrapper/index.tsx | 4 +- .../components/textAreaWrapper/index.tsx | 6 +-- .../components/uploadFileButton/index.tsx | 4 +- .../chatInput/hooks/use-drag-and-drop.tsx | 3 +- .../hooks/use-handle-file-change.tsx | 4 +- .../chatView/chatInput/hooks/use-upload.tsx | 2 +- .../components/chatView/chatInput/index.tsx | 6 ++- .../components/fileCardWrapper/index.tsx | 2 +- .../components/chatView/chatMessage/index.tsx | 22 ++++---- .../chatView/fileComponent/index.tsx | 2 +- .../fileComponent/utils/get-classes.tsx | 4 +- .../fileComponent/utils/handle-download.tsx | 5 +- .../utils/format-file-name.tsx | 2 +- .../IOModal/components/chatView/index.tsx | 4 +- src/frontend/src/modals/IOModal/index.tsx | 38 +++++++------- .../utils/check-can-build-tweak-object.ts | 2 +- .../apiModal/utils/get-changes-types.ts | 2 +- .../modals/apiModal/utils/get-curl-code.tsx | 6 +-- .../utils/get-nodes-with-default-value.ts | 4 +- .../apiModal/utils/get-python-api-code.tsx | 2 +- .../modals/apiModal/utils/get-python-code.tsx | 2 +- .../src/modals/apiModal/utils/get-value.ts | 2 +- .../modals/apiModal/utils/get-widget-code.tsx | 2 +- .../src/modals/apiModal/utils/tabs-array.tsx | 2 +- .../src/modals/apiModal/views/index.tsx | 18 +++---- src/frontend/src/modals/baseModal/index.tsx | 10 ++-- .../editNodeModal/hooks/use-column-defs.tsx | 5 +- .../src/modals/editNodeModal/index.tsx | 6 +-- src/frontend/src/modals/exportModal/index.tsx | 6 +-- .../src/modals/flowLogsModal/index.tsx | 4 +- .../foldersModal/hooks/submit-folder.tsx | 4 +- .../src/modals/genericModal/index.tsx | 6 +-- .../src/modals/newFlowModal/index.tsx | 2 +- src/frontend/src/modals/shareModal/index.tsx | 6 +-- .../modals/shareModal/utils/get-tags-ids.tsx | 2 +- .../components/PageComponent/index.tsx | 36 ++++++------- .../PageComponent/utils/get-random-name.tsx | 2 +- .../SelectionMenuComponent/index.tsx | 2 +- .../extraSidebarComponent/index.tsx | 28 +++++------ .../components/nodeToolbarComponent/index.tsx | 45 ++++++++--------- .../toolbarSelectItem/index.tsx | 10 ++-- src/frontend/src/pages/FlowPage/index.tsx | 2 +- .../hooks/use-delete-multiple.tsx | 2 +- .../hooks/use-filtered-flows.tsx | 4 +- .../hooks/use-handle-duplicate.tsx | 8 +-- .../hooks/use-handle-export.tsx | 4 +- .../hooks/use-handle-select-all.tsx | 2 +- .../hooks/use-select-options-change.tsx | 4 +- .../hooks/use-selected-flows.tsx | 2 +- .../components/componentsComponent/index.tsx | 22 ++++---- .../components/headerComponent/index.tsx | 2 +- .../headerTabsSearchComponent/index.tsx | 2 +- .../components/inputSearchComponent/index.tsx | 2 +- .../pages/MainPage/pages/mainPage/index.tsx | 2 +- .../src/pages/MainPage/services/index.ts | 12 ++--- .../MainPage/utils/handle-download-folder.ts | 2 +- src/frontend/src/pages/Playground/index.tsx | 2 +- .../src/pages/ProfileSettingsPage/index.tsx | 6 +-- src/frontend/src/pages/SettingsPage/index.tsx | 2 +- .../components/ApiKeyHeader/index.tsx | 1 - .../hooks/use-handle-delete-key.tsx | 2 +- .../SettingsPage/pages/ApiKeysPage/index.tsx | 4 +- .../components/PasswordForm/index.tsx | 2 +- .../hooks/use-get-profile-pictures.ts | 3 +- .../profilePictureChooserComponent/index.tsx | 20 +++----- .../components/ProfilePictureForm/index.tsx | 3 +- .../components/StoreApiKeyForm/index.tsx | 4 +- .../SettingsPage/pages/GeneralPage/index.tsx | 14 +++--- .../pages/GlobalVariablesPage/index.tsx | 7 ++- .../EditShortcutButton/index.tsx | 14 +++--- .../pages/ShortcutsPage/index.tsx | 3 +- .../pages/hooks/use-patch-profile-picture.tsx | 2 +- .../SettingsPage/pages/hooks/use-save-key.tsx | 4 +- .../components/headerMessages/index.tsx | 2 - .../hooks/use-remove-messages.tsx | 2 +- .../SettingsPage/pages/messagesPage/index.tsx | 4 +- src/frontend/src/pages/StorePage/index.tsx | 6 +-- src/frontend/src/routes.tsx | 10 ++-- src/frontend/src/stores/darkStore.ts | 2 +- src/frontend/src/stores/flowStore.ts | 50 +++++++++---------- src/frontend/src/stores/flowsManagerStore.ts | 28 +++++------ src/frontend/src/stores/foldersStore.tsx | 11 ++-- .../globalVariablesStore/globalVariables.ts | 2 +- src/frontend/src/stores/messagesStore.ts | 6 +-- src/frontend/src/types/store/index.ts | 2 +- src/frontend/src/types/zustand/flow/index.ts | 14 +++--- .../src/types/zustand/flowsManager/index.ts | 8 +-- .../types/zustand/globalVariables/index.ts | 2 +- src/frontend/src/utils/buildUtils.ts | 18 +++---- src/frontend/src/utils/parameterUtils.ts | 4 +- src/frontend/src/utils/storeUtils.ts | 2 +- src/frontend/src/utils/utils.ts | 24 ++++----- 159 files changed, 582 insertions(+), 588 deletions(-) diff --git a/src/backend/base/langflow/api/v1/files.py b/src/backend/base/langflow/api/v1/files.py index f6293686f..a72ee7711 100644 --- a/src/backend/base/langflow/api/v1/files.py +++ b/src/backend/base/langflow/api/v1/files.py @@ -110,7 +110,7 @@ async def download_profile_picture( extension = file_name.split(".")[-1] config_dir = get_storage_service().settings_service.settings.config_dir config_path = Path(config_dir) - folder_path = config_path / 'profile_pictures' / folder_name + folder_path = config_path / "profile_pictures" / folder_name content_type = build_content_type_from_extension(extension) file_content = await storage_service.get_file(flow_id=folder_path, file_name=file_name) return StreamingResponse(BytesIO(file_content), media_type=content_type) @@ -140,7 +140,6 @@ async def list_profile_pictures(storage_service: StorageService = Depends(get_st raise HTTPException(status_code=500, detail=str(e)) - @router.get("/list/{flow_id}") async def list_files( flow_id: UUID = Depends(get_flow_id), storage_service: StorageService = Depends(get_storage_service) diff --git a/src/backend/base/langflow/helpers/folders.py b/src/backend/base/langflow/helpers/folders.py index fa6f27fcc..c3d7567b5 100644 --- a/src/backend/base/langflow/helpers/folders.py +++ b/src/backend/base/langflow/helpers/folders.py @@ -20,4 +20,4 @@ def generate_unique_folder_name(folder_name, user_id, session): # If a folder with the name already exists, append (n) to the name and increment n folder_name = f"{original_name} ({n})" - n += 1 \ No newline at end of file + n += 1 diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsx index 4a60f453f..36f2ad9f9 100644 --- a/src/frontend/src/App.tsx +++ b/src/frontend/src/App.tsx @@ -29,10 +29,10 @@ export default function App() { useTrackLastVisitedPath(); const removeFromTempNotificationList = useAlertStore( - (state) => state.removeFromTempNotificationList, + (state) => state.removeFromTempNotificationList ); const tempNotificationList = useAlertStore( - (state) => state.tempNotificationList, + (state) => state.tempNotificationList ); const [fetchError, setFetchError] = useState(false); const isLoading = useFlowsManagerStore((state) => state.isLoading); @@ -50,7 +50,7 @@ export default function App() { const refreshVersion = useDarkStore((state) => state.refreshVersion); const refreshStars = useDarkStore((state) => state.refreshStars); const setGlobalVariables = useGlobalVariablesStore( - (state) => state.setGlobalVariables, + (state) => state.setGlobalVariables ); const checkHasStore = useStoreStore((state) => state.checkHasStore); const navigate = useNavigate(); diff --git a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx index 941c86271..37ef5cf60 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx @@ -98,7 +98,7 @@ export default function ParameterComponent({ debouncedHandleUpdateValues, setNode, renderTooltips, - setIsLoading, + setIsLoading ); const { handleNodeClass: handleNodeClassHook } = useHandleNodeClass( @@ -107,7 +107,7 @@ export default function ParameterComponent({ takeSnapshot, setNode, updateNodeInternals, - renderTooltips, + renderTooltips ); const { handleRefreshButtonPress: handleRefreshButtonPressHook } = @@ -116,7 +116,7 @@ export default function ParameterComponent({ let disabled = edges.some( (edge) => - edge.targetHandle === scapedJSONStringfy(proxy ? { ...id, proxy } : id), + edge.targetHandle === scapedJSONStringfy(proxy ? { ...id, proxy } : id) ) ?? false; const handleRefreshButtonPress = async (name, data) => { @@ -129,12 +129,12 @@ export default function ParameterComponent({ handleUpdateValues, setNode, renderTooltips, - setIsLoading, + setIsLoading ); const handleOnNewValue = async ( newValue: string | string[] | boolean | Object[], - skipSnapshot: boolean | undefined = false, + skipSnapshot: boolean | undefined = false ): Promise => { handleOnNewValueHook(newValue, skipSnapshot); }; @@ -216,7 +216,7 @@ export default function ParameterComponent({ className={classNames( left ? "my-12 -ml-0.5 " : " my-12 -mr-0.5 ", "h-3 w-3 rounded-full border-2 bg-background", - !showNode ? "mt-0" : "", + !showNode ? "mt-0" : "" )} style={{ borderColor: color ?? nodeColors.unknown, @@ -286,7 +286,7 @@ export default function ParameterComponent({ "h-5 w-5 rounded-md", displayOutputPreview && !unknownOutput ? " hover:bg-secondary-foreground/5 hover:text-medium-indigo" - : " cursor-not-allowed text-muted-foreground", + : " cursor-not-allowed text-muted-foreground" )} name={"ScanEye"} /> @@ -336,7 +336,7 @@ export default function ParameterComponent({ } className={classNames( left ? "-ml-0.5" : "-mr-0.5", - "h-3 w-3 rounded-full border-2 bg-background", + "h-3 w-3 rounded-full border-2 bg-background" )} style={{ borderColor: color ?? nodeColors.unknown }} onClick={() => setFilterEdge(groupedEdge.current)} diff --git a/src/frontend/src/CustomNodes/GenericNode/components/tooltipRenderComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/tooltipRenderComponent/index.tsx index ed2760161..c76bc7293 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/tooltipRenderComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/tooltipRenderComponent/index.tsx @@ -24,7 +24,7 @@ const TooltipRenderComponent = ({ item, index, left }) => { 0 ? "mt-2 flex items-center" : "mt-3 flex items-center", + index > 0 ? "mt-2 flex items-center" : "mt-3 flex items-center" )} >
state.setErrorData); const isDark = useDarkStore((state) => state.dark); const buildStatus = useFlowStore( - (state) => state.flowBuildStatus[data.id]?.status, + (state) => state.flowBuildStatus[data.id]?.status ); const lastRunTime = useFlowStore( - (state) => state.flowBuildStatus[data.id]?.timestamp, + (state) => state.flowBuildStatus[data.id]?.timestamp ); const takeSnapshot = useFlowsManagerStore((state) => state.takeSnapshot); @@ -69,7 +69,7 @@ export default function GenericNode({ const [nodeName, setNodeName] = useState(data.node!.display_name); const [inputDescription, setInputDescription] = useState(false); const [nodeDescription, setNodeDescription] = useState( - data.node?.description!, + data.node?.description! ); const [isOutdated, setIsOutdated] = useState(false); const [validationStatus, setValidationStatus] = @@ -87,7 +87,7 @@ export default function GenericNode({ data.node!, setNode, setIsOutdated, - updateNodeInternals, + updateNodeInternals ); const name = nodeIconsLucide[data.type] ? data.type : types[data.type]; @@ -118,12 +118,12 @@ export default function GenericNode({ selected: boolean, showNode: boolean, buildStatus: BuildStatus | undefined, - validationStatus: VertexBuildTypeAPI | null, + validationStatus: VertexBuildTypeAPI | null ) => { const specificClassFromBuildStatus = getSpecificClassFromBuildStatus( buildStatus, validationStatus, - isDark, + isDark ); const baseBorderClass = getBaseBorderClass(selected); @@ -132,7 +132,7 @@ export default function GenericNode({ baseBorderClass, nodeSizeClass, "generic-node-div group/node", - specificClassFromBuildStatus, + specificClassFromBuildStatus ); return names; }; @@ -175,7 +175,7 @@ export default function GenericNode({ showNode, isEmoji, nodeIconFragment, - checkNodeIconFragment, + checkNodeIconFragment ); function countHandles(): void { @@ -288,7 +288,7 @@ export default function GenericNode({ selected, showNode, buildStatus, - validationStatus, + validationStatus )} > {data.node?.beta && showNode && ( @@ -419,7 +419,7 @@ export default function GenericNode({ } title={getFieldTitle( data.node?.template!, - templateField, + templateField )} info={data.node?.template[templateField].info} name={templateField} @@ -447,7 +447,7 @@ export default function GenericNode({ proxy={data.node?.template[templateField].proxy} showNode={showNode} /> - ), + ) )} { setInputDescription(true); @@ -672,13 +672,13 @@ export default function GenericNode({ } title={getFieldTitle( data.node?.template!, - templateField, + templateField )} info={data.node?.template[templateField].info} name={templateField} tooltipTitle={ data.node?.template[templateField].input_types?.join( - "\n", + "\n" ) ?? data.node?.template[templateField].type } required={data.node!.template[templateField].required} @@ -705,7 +705,7 @@ export default function GenericNode({
{" "} diff --git a/src/frontend/src/CustomNodes/helpers/get-class-from-build-status.ts b/src/frontend/src/CustomNodes/helpers/get-class-from-build-status.ts index 710e91d15..cf251c40c 100644 --- a/src/frontend/src/CustomNodes/helpers/get-class-from-build-status.ts +++ b/src/frontend/src/CustomNodes/helpers/get-class-from-build-status.ts @@ -4,7 +4,7 @@ import { VertexBuildTypeAPI } from "../../types/api"; export const getSpecificClassFromBuildStatus = ( buildStatus: BuildStatus | undefined, validationStatus: VertexBuildTypeAPI | null, - isDark: boolean, + isDark: boolean ) => { let isInvalid = validationStatus && !validationStatus.valid; diff --git a/src/frontend/src/CustomNodes/hooks/use-check-code-validity.tsx b/src/frontend/src/CustomNodes/hooks/use-check-code-validity.tsx index ec4d586f6..3a49ef62f 100644 --- a/src/frontend/src/CustomNodes/hooks/use-check-code-validity.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-check-code-validity.tsx @@ -6,7 +6,7 @@ const useCheckCodeValidity = ( data: NodeDataType, templates: { [key: string]: any }, setIsOutdated: (value: boolean) => void, - types, + types ) => { useEffect(() => { // This one should run only once diff --git a/src/frontend/src/CustomNodes/hooks/use-fetch-data-on-mount.tsx b/src/frontend/src/CustomNodes/hooks/use-fetch-data-on-mount.tsx index be239df8a..7426164f7 100644 --- a/src/frontend/src/CustomNodes/hooks/use-fetch-data-on-mount.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-fetch-data-on-mount.tsx @@ -9,7 +9,7 @@ const useFetchDataOnMount = ( handleUpdateValues, setNode, renderTooltips, - setIsLoading, + setIsLoading ) => { const setErrorData = useAlertStore((state) => state.setErrorData); diff --git a/src/frontend/src/CustomNodes/hooks/use-handle-new-value.tsx b/src/frontend/src/CustomNodes/hooks/use-handle-new-value.tsx index e917970ca..dc416646b 100644 --- a/src/frontend/src/CustomNodes/hooks/use-handle-new-value.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-handle-new-value.tsx @@ -10,7 +10,7 @@ const useHandleOnNewValue = ( debouncedHandleUpdateValues, setNode, renderTooltips, - setIsLoading, + setIsLoading ) => { const setErrorData = useAlertStore((state) => state.setErrorData); diff --git a/src/frontend/src/CustomNodes/hooks/use-handle-node-class.tsx b/src/frontend/src/CustomNodes/hooks/use-handle-node-class.tsx index 412658d77..bdcf1f8cc 100644 --- a/src/frontend/src/CustomNodes/hooks/use-handle-node-class.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-handle-node-class.tsx @@ -6,7 +6,7 @@ const useHandleNodeClass = ( takeSnapshot, setNode, updateNodeInternals, - renderTooltips, + renderTooltips ) => { const handleNodeClass = (newNodeClass, code) => { if (!data.node) return; diff --git a/src/frontend/src/CustomNodes/hooks/use-icon-render.tsx b/src/frontend/src/CustomNodes/hooks/use-icon-render.tsx index 181b4f515..cc9e29c0e 100644 --- a/src/frontend/src/CustomNodes/hooks/use-icon-render.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-icon-render.tsx @@ -12,8 +12,8 @@ const useIconNodeRender = ( checkNodeIconFragment: ( iconColor: string, iconName: string, - iconClassName: string, - ) => JSX.Element, + iconClassName: string + ) => JSX.Element ) => { const iconNodeRender = useCallback(() => { const iconElement = data?.node?.icon; diff --git a/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx b/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx index ec378fac2..9915c9074 100644 --- a/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx @@ -7,7 +7,7 @@ import { VertexBuildTypeAPI } from "../../types/api"; const useIconStatus = ( buildStatus: BuildStatus | undefined, - validationStatus: VertexBuildTypeAPI | null, + validationStatus: VertexBuildTypeAPI | null ) => { const renderIconStatus = () => { if (buildStatus === BuildStatus.BUILDING) { diff --git a/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx b/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx index f1593597f..d919a4fa9 100644 --- a/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx @@ -7,7 +7,7 @@ const useUpdateNodeCode = ( dataNode: APIClassType, // Define YourNodeType according to your data structure setNode: (id: string, callback: (oldNode) => any) => void, setIsOutdated: (value: boolean) => void, - updateNodeInternals: (id: string) => void, + updateNodeInternals: (id: string) => void ) => { const updateNodeCode = useCallback( (newNodeClass: APIClassType, code: string, name: string) => { @@ -30,7 +30,7 @@ const useUpdateNodeCode = ( updateNodeInternals(dataId); }, - [dataId, dataNode, setNode, setIsOutdated, updateNodeInternals], + [dataId, dataNode, setNode, setIsOutdated, updateNodeInternals] ); return updateNodeCode; diff --git a/src/frontend/src/CustomNodes/utils/get-field-title.tsx b/src/frontend/src/CustomNodes/utils/get-field-title.tsx index e448c4f01..a00829a90 100644 --- a/src/frontend/src/CustomNodes/utils/get-field-title.tsx +++ b/src/frontend/src/CustomNodes/utils/get-field-title.tsx @@ -2,7 +2,7 @@ import { APITemplateType } from "../../types/api"; export default function getFieldTitle( template: APITemplateType, - templateField: string, + templateField: string ): string { return template[templateField].display_name ? template[templateField].display_name! diff --git a/src/frontend/src/alerts/alertDropDown/index.tsx b/src/frontend/src/alerts/alertDropDown/index.tsx index 05f42922d..6eff32fe2 100644 --- a/src/frontend/src/alerts/alertDropDown/index.tsx +++ b/src/frontend/src/alerts/alertDropDown/index.tsx @@ -16,13 +16,13 @@ export default function AlertDropdown({ }: AlertDropdownType): JSX.Element { const notificationList = useAlertStore((state) => state.notificationList); const clearNotificationList = useAlertStore( - (state) => state.clearNotificationList, + (state) => state.clearNotificationList ); const removeFromNotificationList = useAlertStore( - (state) => state.removeFromNotificationList, + (state) => state.removeFromNotificationList ); const setNotificationCenter = useAlertStore( - (state) => state.setNotificationCenter, + (state) => state.setNotificationCenter ); const [open, setOpen] = useState(false); diff --git a/src/frontend/src/components/ImageViewer/index.tsx b/src/frontend/src/components/ImageViewer/index.tsx index 8433962a7..dc7f41ad7 100644 --- a/src/frontend/src/components/ImageViewer/index.tsx +++ b/src/frontend/src/components/ImageViewer/index.tsx @@ -31,14 +31,14 @@ export default function ImageViewer({ image }) { const fullPageButton = document.getElementById("full-page-button"); zoomInButton!.addEventListener("click", () => - viewer.viewport.zoomBy(1.2), + viewer.viewport.zoomBy(1.2) ); zoomOutButton!.addEventListener("click", () => - viewer.viewport.zoomBy(0.8), + viewer.viewport.zoomBy(0.8) ); homeButton!.addEventListener("click", () => viewer.viewport.goHome()); fullPageButton!.addEventListener("click", () => - viewer.setFullScreen(true), + viewer.setFullScreen(true) ); // Optionally, you can set additional viewer options here @@ -47,16 +47,16 @@ export default function ImageViewer({ image }) { return () => { viewer.destroy(); zoomInButton!.removeEventListener("click", () => - viewer.viewport.zoomBy(1.2), + viewer.viewport.zoomBy(1.2) ); zoomOutButton!.removeEventListener("click", () => - viewer.viewport.zoomBy(0.8), + viewer.viewport.zoomBy(0.8) ); homeButton!.removeEventListener("click", () => - viewer.viewport.goHome(), + viewer.viewport.goHome() ); fullPageButton!.removeEventListener("click", () => - viewer.setFullScreen(true), + viewer.setFullScreen(true) ); }; } diff --git a/src/frontend/src/components/accordionComponent/composite/folderAccordionComponent/index.tsx b/src/frontend/src/components/accordionComponent/composite/folderAccordionComponent/index.tsx index d4fb95b5c..212a03fa2 100644 --- a/src/frontend/src/components/accordionComponent/composite/folderAccordionComponent/index.tsx +++ b/src/frontend/src/components/accordionComponent/composite/folderAccordionComponent/index.tsx @@ -15,7 +15,7 @@ export default function FolderAccordionComponent({ options, }: AccordionComponentType): JSX.Element { const [value, setValue] = useState( - open.length === 0 ? "" : getOpenAccordion(), + open.length === 0 ? "" : getOpenAccordion() ); function getOpenAccordion(): string { diff --git a/src/frontend/src/components/accordionComponent/index.tsx b/src/frontend/src/components/accordionComponent/index.tsx index c9c21b8b2..43a0aef79 100644 --- a/src/frontend/src/components/accordionComponent/index.tsx +++ b/src/frontend/src/components/accordionComponent/index.tsx @@ -17,7 +17,7 @@ export default function AccordionComponent({ sideBar, }: AccordionComponentType): JSX.Element { const [value, setValue] = useState( - open.length === 0 ? "" : getOpenAccordion(), + open.length === 0 ? "" : getOpenAccordion() ); function getOpenAccordion(): string { @@ -52,7 +52,7 @@ export default function AccordionComponent({ disabled={disabled} className={cn( sideBar ? "w-full bg-muted px-[0.75rem] py-[0.5rem]" : "ml-3", - disabled ? "cursor-not-allowed" : "cursor-pointer", + disabled ? "cursor-not-allowed" : "cursor-pointer" )} > {trigger} diff --git a/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx b/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx index 36b68a7e8..61dada650 100644 --- a/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx +++ b/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx @@ -23,19 +23,19 @@ export default function AddNewVariableButton({ children }): JSX.Element { const setErrorData = useAlertStore((state) => state.setErrorData); const componentFields = useTypesStore((state) => state.ComponentFields); const unavaliableFields = new Set( - Object.keys(useGlobalVariablesStore((state) => state.unavaliableFields)), + Object.keys(useGlobalVariablesStore((state) => state.unavaliableFields)) ); const availableFields = () => { const fields = Array.from(componentFields).filter( - (field) => !unavaliableFields.has(field), + (field) => !unavaliableFields.has(field) ); return sortByName(fields); }; const addGlobalVariable = useGlobalVariablesStore( - (state) => state.addGlobalVariable, + (state) => state.addGlobalVariable ); function handleSaveVariable() { diff --git a/src/frontend/src/components/cardComponent/components/dragCardComponent/index.tsx b/src/frontend/src/components/cardComponent/components/dragCardComponent/index.tsx index 28674f3bc..54dbf4846 100644 --- a/src/frontend/src/components/cardComponent/components/dragCardComponent/index.tsx +++ b/src/frontend/src/components/cardComponent/components/dragCardComponent/index.tsx @@ -10,7 +10,7 @@ export default function DragCardComponent({ data }: { data: storeComponent }) { draggable //TODO check color schema className={cn( - "group relative flex flex-col justify-between overflow-hidden transition-all hover:bg-muted/50 hover:shadow-md hover:dark:bg-[#ffffff10]", + "group relative flex flex-col justify-between overflow-hidden transition-all hover:bg-muted/50 hover:shadow-md hover:dark:bg-[#ffffff10]" )} >
@@ -22,7 +22,7 @@ export default function DragCardComponent({ data }: { data: storeComponent }) { "visible flex-shrink-0", data.is_component ? "mx-0.5 h-6 w-6 text-component-icon" - : "h-7 w-7 flex-shrink-0 text-flow-icon", + : "h-7 w-7 flex-shrink-0 text-flow-icon" )} name={data.is_component ? "ToyBrick" : "Group"} /> diff --git a/src/frontend/src/components/cardComponent/index.tsx b/src/frontend/src/components/cardComponent/index.tsx index d169a598a..a364a2d45 100644 --- a/src/frontend/src/components/cardComponent/index.tsx +++ b/src/frontend/src/components/cardComponent/index.tsx @@ -60,11 +60,11 @@ export default function CollectionCardComponent({ const [loading, setLoading] = useState(false); const [loadingLike, setLoadingLike] = useState(false); const [liked_by_user, setLiked_by_user] = useState( - data?.liked_by_user ?? false, + data?.liked_by_user ?? false ); const [likes_count, setLikes_count] = useState(data?.liked_by_count ?? 0); const [downloads_count, setDownloads_count] = useState( - data?.downloads_count ?? 0, + data?.downloads_count ?? 0 ); const currentFlow = useFlowsManagerStore((state) => state.currentFlow); const setCurrentFlow = useFlowsManagerStore((state) => state.setCurrentFlow); @@ -75,12 +75,12 @@ export default function CollectionCardComponent({ const [openPlayground, setOpenPlayground] = useState(false); const [openDelete, setOpenDelete] = useState(false); const setCurrentFlowId = useFlowsManagerStore( - (state) => state.setCurrentFlowId, + (state) => state.setCurrentFlowId ); const [loadingPlayground, setLoadingPlayground] = useState(false); const selectedFlowsComponentsCards = useFlowsManagerStore( - (state) => state.selectedFlowsComponentsCards, + (state) => state.selectedFlowsComponentsCards ); const name = data.is_component ? "Component" : "Flow"; @@ -220,7 +220,7 @@ export default function CollectionCardComponent({ "group relative flex h-[11rem] flex-col justify-between overflow-hidden hover:bg-muted/50 hover:shadow-md hover:dark:bg-[#5f5f5f0e]", disabled ? "pointer-events-none opacity-50" : "", onClick ? "cursor-pointer" : "", - isSelectedCard ? "border border-selected" : "", + isSelectedCard ? "border border-selected" : "" )} onClick={onClick} > @@ -233,7 +233,7 @@ export default function CollectionCardComponent({ "visible flex-shrink-0", data.is_component ? "mx-0.5 h-6 w-6 text-component-icon" - : "h-7 w-7 flex-shrink-0 text-flow-icon", + : "h-7 w-7 flex-shrink-0 text-flow-icon" )} name={data.is_component ? "ToyBrick" : "Group"} /> @@ -428,7 +428,7 @@ export default function CollectionCardComponent({ name="Trash2" className={cn( "h-5 w-5", - !authorized ? " text-ring" : "", + !authorized ? " text-ring" : "" )} /> @@ -463,7 +463,7 @@ export default function CollectionCardComponent({ liked_by_user ? "fill-destructive stroke-destructive" : "", - !authorized ? " text-ring" : "", + !authorized ? " text-ring" : "" )} /> @@ -501,7 +501,7 @@ export default function CollectionCardComponent({ } className={cn( loading ? "h-5 w-5 animate-spin" : "h-5 w-5", - !authorized ? " text-ring" : "", + !authorized ? " text-ring" : "" )} /> diff --git a/src/frontend/src/components/cardsWrapComponent/index.tsx b/src/frontend/src/components/cardsWrapComponent/index.tsx index c7ca01588..0de3f1a2f 100644 --- a/src/frontend/src/components/cardsWrapComponent/index.tsx +++ b/src/frontend/src/components/cardsWrapComponent/index.tsx @@ -65,7 +65,7 @@ export default function CardsWrapComponent({ "h-full w-full", isDragging ? "mb-36 flex flex-col items-center justify-center gap-4 text-2xl font-light" - : "", + : "" )} > {isDragging ? ( diff --git a/src/frontend/src/components/chatComponent/index.tsx b/src/frontend/src/components/chatComponent/index.tsx index 7fad5a882..bbb4f10bb 100644 --- a/src/frontend/src/components/chatComponent/index.tsx +++ b/src/frontend/src/components/chatComponent/index.tsx @@ -1,6 +1,6 @@ import { Transition } from "@headlessui/react"; +import { useMemo, useRef, useState } from "react"; import { useHotkeys } from "react-hotkeys-hook"; -import { useEffect, useMemo, useRef, useState } from "react"; import IOModal from "../../modals/IOModal"; import ApiModal from "../../modals/apiModal/views"; import ShareModal from "../../modals/shareModal"; @@ -65,7 +65,7 @@ export default function FlowToolbar(): JSX.Element { "relative inline-flex h-full w-full items-center justify-center gap-[4px] bg-muted px-5 py-3 text-sm font-semibold text-foreground transition-all duration-150 ease-in-out hover:bg-background hover:bg-hover ", !hasApiKey || !validApiKey || !hasStore ? " button-disable text-muted-foreground " - : "", + : "" )} > Share @@ -88,7 +88,7 @@ export default function FlowToolbar(): JSX.Element { hasStore, openShareModal, setOpenShareModal, - ], + ] ); return ( @@ -144,7 +144,7 @@ export default function FlowToolbar(): JSX.Element { >
{ if (disabled && myValue !== "") { diff --git a/src/frontend/src/components/codeTabsComponent/index.tsx b/src/frontend/src/components/codeTabsComponent/index.tsx index 3b42608d1..885de6442 100644 --- a/src/frontend/src/components/codeTabsComponent/index.tsx +++ b/src/frontend/src/components/codeTabsComponent/index.tsx @@ -26,7 +26,6 @@ import { TabsTrigger, } from "../../components/ui/tabs"; import { LANGFLOW_SUPPORTED_TYPES } from "../../constants/constants"; -import ExportModal from "../../modals/exportModal"; import { Case } from "../../shared/components/caseComponent"; import { useDarkStore } from "../../stores/darkStore"; import useFlowStore from "../../stores/flowStore"; @@ -43,9 +42,9 @@ import IconComponent from "../genericIconComponent"; import InputComponent from "../inputComponent"; import KeypairListComponent from "../keypairListComponent"; import ShadTooltip from "../shadTooltipComponent"; +import { Button } from "../ui/button"; import { Label } from "../ui/label"; import { Switch } from "../ui/switch"; -import { Button } from "../ui/button"; export default function CodeTabsComponent({ flow, @@ -139,7 +138,7 @@ export default function CodeTabsComponent({