@@ -435,14 +435,14 @@ export default function ApiModal({ flow }: { flow: FlowType }) {
.value,
t.data,
t.data.node
- .template[n]
+ .template[n],
)}
onChange={(k) => {
buildTweakObject(
t["data"]["id"],
k,
t.data.node
- .template[n]
+ .template[n],
);
}}
/>
@@ -464,14 +464,14 @@ export default function ApiModal({ flow }: { flow: FlowType }) {
t.data,
t.data.node.template[
n
- ]
+ ],
)}
onChange={(k) => {
buildTweakObject(
t["data"]["id"],
k,
t.data.node
- .template[n]
+ .template[n],
);
}}
/>
@@ -496,7 +496,7 @@ export default function ApiModal({ flow }: { flow: FlowType }) {
e,
t.data.node.template[
n
- ]
+ ],
);
}}
size="small"
@@ -512,8 +512,8 @@ export default function ApiModal({ flow }: { flow: FlowType }) {
t.data.node.template[n]
.value,
t.data,
- t.data.node.template[n]
- )
+ t.data.node.template[n],
+ ),
)}
>
@@ -526,7 +526,7 @@ export default function ApiModal({ flow }: { flow: FlowType }) {
].value ?? ""
}
onChange={(
- k: any
+ k: any,
) => {}}
fileTypes={
t.data.node.template[
@@ -539,7 +539,7 @@ export default function ApiModal({ flow }: { flow: FlowType }) {
].suffixes
}
onFileChange={(
- k: any
+ k: any,
) => {}}
>
@@ -554,7 +554,7 @@ export default function ApiModal({ flow }: { flow: FlowType }) {
t.data.node.template[n]
.value,
t.data,
- t.data.node.template[n]
+ t.data.node.template[n],
)}
onChange={(k) => {
buildTweakObject(
@@ -562,7 +562,7 @@ export default function ApiModal({ flow }: { flow: FlowType }) {
k,
t.data.node.template[
n
- ]
+ ],
);
}}
/>
@@ -585,14 +585,14 @@ export default function ApiModal({ flow }: { flow: FlowType }) {
k,
t.data.node.template[
n
- ]
+ ],
);
}}
value={getValue(
t.data.node.template[n]
.value,
t.data,
- t.data.node.template[n]
+ t.data.node.template[n],
)}
>
@@ -606,7 +606,7 @@ export default function ApiModal({ flow }: { flow: FlowType }) {
t.data.node.template[n]
.value,
t.data,
- t.data.node.template[n]
+ t.data.node.template[n],
)}
onChange={(k) => {
buildTweakObject(
@@ -614,7 +614,7 @@ export default function ApiModal({ flow }: { flow: FlowType }) {
k,
t.data.node.template[
n
- ]
+ ],
);
}}
/>
@@ -628,8 +628,8 @@ export default function ApiModal({ flow }: { flow: FlowType }) {
t.data.node.template[n]
.value,
t.data,
- t.data.node.template[n]
- )
+ t.data.node.template[n],
+ ),
)}
>
@@ -643,14 +643,14 @@ export default function ApiModal({ flow }: { flow: FlowType }) {
t.data,
t.data.node.template[
n
- ]
+ ],
)}
onChange={(k) => {
buildTweakObject(
t["data"]["id"],
k,
t.data.node
- .template[n]
+ .template[n],
);
}}
/>
@@ -665,8 +665,8 @@ export default function ApiModal({ flow }: { flow: FlowType }) {
t.data.node.template[n]
.value,
t.data,
- t.data.node.template[n]
- )
+ t.data.node.template[n],
+ ),
)}
>
@@ -680,14 +680,14 @@ export default function ApiModal({ flow }: { flow: FlowType }) {
t.data,
t.data.node.template[
n
- ]
+ ],
)}
onChange={(k) => {
buildTweakObject(
t["data"]["id"],
k,
t.data.node
- .template[n]
+ .template[n],
);
}}
/>
diff --git a/src/frontend/src/modals/EditNodeModal/index.tsx b/src/frontend/src/modals/EditNodeModal/index.tsx
index e2f9c7bca..8ed789c20 100644
--- a/src/frontend/src/modals/EditNodeModal/index.tsx
+++ b/src/frontend/src/modals/EditNodeModal/index.tsx
@@ -47,8 +47,8 @@ export default function EditNodeModal({ data }: { data: NodeDataType }) {
data.node.template[t].type === "code" ||
data.node.template[t].type === "prompt" ||
data.node.template[t].type === "file" ||
- data.node.template[t].type === "int")
- ).length
+ data.node.template[t].type === "int"),
+ ).length,
);
const [nodeValue, setNodeValue] = useState(null);
const { closePopUp } = useContext(PopUpContext);
@@ -104,7 +104,7 @@ export default function EditNodeModal({ data }: { data: NodeDataType }) {
"w-full rounded-lg bg-white dark:bg-gray-800 border-[1px] border-gray-200",
nodeLength > limitScrollFieldsModal
? "overflow-scroll overflow-x-hidden custom-scroll"
- : "overflow-hidden"
+ : "overflow-hidden",
)}
>
{nodeLength > 0 && (
@@ -131,7 +131,7 @@ export default function EditNodeModal({ data }: { data: NodeDataType }) {
data.node.template[t].type === "code" ||
data.node.template[t].type === "prompt" ||
data.node.template[t].type === "file" ||
- data.node.template[t].type === "int")
+ data.node.template[t].type === "int"),
)
.map((n, i) => (
diff --git a/src/frontend/src/modals/NodeModal/components/ModalField/index.tsx b/src/frontend/src/modals/NodeModal/components/ModalField/index.tsx
index a0b0c150c..ab8ded168 100644
--- a/src/frontend/src/modals/NodeModal/components/ModalField/index.tsx
+++ b/src/frontend/src/modals/NodeModal/components/ModalField/index.tsx
@@ -22,7 +22,7 @@ export default function ModalField({
index,
}) {
const [enabled, setEnabled] = useState(
- data.node.template[name]?.value ?? false
+ data.node.template[name]?.value ?? false,
);
const display =
type === "str" ||
@@ -42,12 +42,12 @@ export default function ModalField({
(t) =>
t.charAt(0) !== "_" &&
data.node.template[t].advanced &&
- data.node.template[t].show
+ data.node.template[t].show,
).length -
1 ===
index
? "pb-4"
- : ""
+ : "",
)}
>
{display && (
diff --git a/src/frontend/src/modals/NodeModal/index.tsx b/src/frontend/src/modals/NodeModal/index.tsx
index add842096..2428f32b2 100644
--- a/src/frontend/src/modals/NodeModal/index.tsx
+++ b/src/frontend/src/modals/NodeModal/index.tsx
@@ -99,10 +99,10 @@ export default function NodeModal({ data }: { data: NodeDataType }) {
(t) =>
t.charAt(0) !== "_" &&
data.node.template[t].advanced &&
- data.node.template[t].show
+ data.node.template[t].show,
).length > limitScrollFieldsModal
? "overflow-scroll overflow-x-hidden custom-scroll"
- : "overflow-hidden"
+ : "overflow-hidden",
)}
>
@@ -111,7 +111,7 @@ export default function NodeModal({ data }: { data: NodeDataType }) {
(t) =>
t.charAt(0) !== "_" &&
data.node.template[t].advanced &&
- data.node.template[t].show
+ data.node.template[t].show,
)
.map((t: string, idx) => {
return (
diff --git a/src/frontend/src/modals/chatModal/chatInput/index.tsx b/src/frontend/src/modals/chatModal/chatInput/index.tsx
index 69d382748..bd191aa24 100644
--- a/src/frontend/src/modals/chatModal/chatInput/index.tsx
+++ b/src/frontend/src/modals/chatModal/chatInput/index.tsx
@@ -54,7 +54,7 @@ export default function ChatInput({
? " bg-input text-black dark:bg-gray-700 dark:text-gray-300"
: " bg-white-200 text-black dark:bg-gray-900 dark:text-gray-300",
"form-input block w-full custom-scroll rounded-md border-gray-300 dark:border-gray-600 pr-10 sm:text-sm" +
- INPUT_STYLE
+ INPUT_STYLE,
)}
placeholder={"Send a message..."}
/>
diff --git a/src/frontend/src/modals/chatModal/chatMessage/index.tsx b/src/frontend/src/modals/chatModal/chatMessage/index.tsx
index 3b44ffe6f..381cbb53d 100644
--- a/src/frontend/src/modals/chatModal/chatMessage/index.tsx
+++ b/src/frontend/src/modals/chatModal/chatMessage/index.tsx
@@ -34,12 +34,12 @@ export default function ChatMessage({
"w-full py-2 pl-2 flex",
chat.isSend
? "bg-background dark:bg-gray-900 "
- : "bg-input dark:bg-gray-800"
+ : "bg-input dark:bg-gray-800",
)}
>
{!chat.isSend && (
@@ -105,7 +105,7 @@ export default function ChatMessage({
children[0] = (children[0] as string).replace(
"`▍`",
- "▍"
+ "▍",
);
}
diff --git a/src/frontend/src/modals/chatModal/index.tsx b/src/frontend/src/modals/chatModal/index.tsx
index bb6efbb70..bfeaa5f69 100644
--- a/src/frontend/src/modals/chatModal/index.tsx
+++ b/src/frontend/src/modals/chatModal/index.tsx
@@ -51,7 +51,7 @@ export default function ChatModal({
message: string,
isSend: boolean,
thought?: string,
- files?: Array
+ files?: Array,
) => {
setChatHistory((old) => {
let newChat = _.cloneDeep(old);
@@ -147,10 +147,10 @@ export default function ChatModal({
isSend: !chatItem.is_bot,
message: chatItem.message,
thought: chatItem.intermediate_steps,
- }
+ },
);
}
- }
+ },
);
return newChatHistory;
});
@@ -189,7 +189,7 @@ export default function ChatModal({
try {
const urlWs = getWebSocketUrl(
id.current,
- process.env.NODE_ENV === "development"
+ process.env.NODE_ENV === "development",
);
const newWs = new WebSocket(urlWs);
newWs.onopen = () => {
@@ -380,7 +380,7 @@ export default function ChatModal({
👋{" "}
- LangFlow Chat
+ Langflow Chat
diff --git a/src/frontend/src/modals/codeAreaModal/index.tsx b/src/frontend/src/modals/codeAreaModal/index.tsx
index bc814a9ab..a6819fefc 100644
--- a/src/frontend/src/modals/codeAreaModal/index.tsx
+++ b/src/frontend/src/modals/codeAreaModal/index.tsx
@@ -117,7 +117,7 @@ export default function CodeAreaModal({
setErrorData({
title:
"There is something wrong with this code, please review it",
- })
+ }),
);
}}
type="submit"
diff --git a/src/frontend/src/modals/exportModal/index.tsx b/src/frontend/src/modals/exportModal/index.tsx
index df5925817..867769fbc 100644
--- a/src/frontend/src/modals/exportModal/index.tsx
+++ b/src/frontend/src/modals/exportModal/index.tsx
@@ -36,7 +36,7 @@ export default function ExportModal() {
const [checked, setChecked] = useState(false);
const [name, setName] = useState(flows.find((f) => f.id === tabId).name);
const [description, setDescription] = useState(
- flows.find((f) => f.id === tabId).description
+ flows.find((f) => f.id === tabId).description,
);
return (
diff --git a/src/frontend/src/modals/flowSettingsModal/index.tsx b/src/frontend/src/modals/flowSettingsModal/index.tsx
index 3136dc1fe..3f4bcf51e 100644
--- a/src/frontend/src/modals/flowSettingsModal/index.tsx
+++ b/src/frontend/src/modals/flowSettingsModal/index.tsx
@@ -27,7 +27,7 @@ export default function FlowSettingsModal() {
const maxLength = 50;
const [name, setName] = useState(flows.find((f) => f.id === tabId).name);
const [description, setDescription] = useState(
- flows.find((f) => f.id === tabId).description
+ flows.find((f) => f.id === tabId).description,
);
function setModalOpen(x: boolean) {
setOpen(x);
diff --git a/src/frontend/src/modals/importModal/buttonBox/index.tsx b/src/frontend/src/modals/importModal/buttonBox/index.tsx
index 5b7a42b48..db44707b3 100644
--- a/src/frontend/src/modals/importModal/buttonBox/index.tsx
+++ b/src/frontend/src/modals/importModal/buttonBox/index.tsx
@@ -81,7 +81,7 @@ export default function ButtonBox({
bgColor,
height,
width,
- padding
+ padding,
)}
>
{title}
diff --git a/src/frontend/src/modals/importModal/index.tsx b/src/frontend/src/modals/importModal/index.tsx
index 00f17c959..c51fd5277 100644
--- a/src/frontend/src/modals/importModal/index.tsx
+++ b/src/frontend/src/modals/importModal/index.tsx
@@ -1,22 +1,18 @@
import {
- XMarkIcon,
- ArrowDownTrayIcon,
DocumentDuplicateIcon,
ComputerDesktopIcon,
ArrowUpTrayIcon,
ArrowLeftIcon,
- CommandLineIcon,
} from "@heroicons/react/24/outline";
-import { Fragment, useContext, useRef, useState } from "react";
+import { useContext, useRef, useState } from "react";
import { PopUpContext } from "../../contexts/popUpContext";
import { TabsContext } from "../../contexts/tabsContext";
import ButtonBox from "./buttonBox";
import { getExamples } from "../../controllers/API";
-import { error } from "console";
import { alertContext } from "../../contexts/alertContext";
import LoadingComponent from "../../components/loadingComponent";
import { FlowType } from "../../types/flow";
-import { classNames, snakeToSpaces, toNormalCase } from "../../utils";
+import { classNames } from "../../utils";
import {
Dialog,
DialogContent,
@@ -26,7 +22,6 @@ import {
DialogTitle,
DialogTrigger,
} from "../../components/ui/dialog";
-import { Button } from "../../components/ui/button";
import { IMPORT_DIALOG_SUBTITLE } from "../../constants";
export default function ImportModal() {
@@ -58,7 +53,7 @@ export default function ImportModal() {
setErrorData({
title: "there was an error loading examples, please try again",
list: [error.message],
- })
+ }),
);
}
@@ -69,7 +64,7 @@ export default function ImportModal() {
className={classNames(
showExamples
? "lg:max-w-[650px] h-[600px]"
- : "lg:max-w-[650px] h-[450px]"
+ : "lg:max-w-[650px] h-[450px]",
)}
>
@@ -109,7 +104,7 @@ export default function ImportModal() {
"h-full w-full dark:bg-gray-900 overflow-y-auto scrollbar-hide",
showExamples && !loadingExamples
? "flex flex-row start justify-center items-start flex-wrap overflow-auto mx-auto"
- : "flex flex-row justify-center items-center"
+ : "flex flex-row justify-center items-center",
)}
>
{!showExamples && (
@@ -194,7 +189,7 @@ export default function ImportModal() {
fill="currentColor"
/>
- LangFlow Examples
+ Langflow Examples
diff --git a/src/frontend/src/pages/CommunityPage/index.tsx b/src/frontend/src/pages/CommunityPage/index.tsx
index d0bdc3536..5c42bd40f 100644
--- a/src/frontend/src/pages/CommunityPage/index.tsx
+++ b/src/frontend/src/pages/CommunityPage/index.tsx
@@ -28,7 +28,7 @@ export default function CommunityPage() {
setErrorData({
title: "there was an error loading examples, please try again",
list: [error.message],
- })
+ }),
);
}
const navigate = useNavigate();
@@ -57,7 +57,7 @@ export default function CommunityPage() {
- Discover and learn from shared examples by the LangFlow community. We
+ Discover and learn from shared examples by the Langflow community. We
welcome new example contributions that can help our community explore
new and powerful features.
diff --git a/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx b/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx
index 5cffe0395..8eb3e8057 100644
--- a/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx
+++ b/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx
@@ -111,10 +111,10 @@ export default function Page({ flow }: { flow: FlowType }) {
const { setExtraComponent, setExtraNavigation } = useContext(locationContext);
const { setErrorData } = useContext(alertContext);
const [nodes, setNodes, onNodesChange] = useNodesState(
- flow.data?.nodes ?? []
+ flow.data?.nodes ?? [],
);
const [edges, setEdges, onEdgesChange] = useEdgesState(
- flow.data?.edges ?? []
+ flow.data?.edges ?? [],
);
const { setViewport } = useReactFlow();
const edgeUpdateSuccessful = useRef(true);
@@ -156,7 +156,7 @@ export default function Page({ flow }: { flow: FlowType }) {
};
});
},
- [onEdgesChange, setNodes, setTabsState, tabId]
+ [onEdgesChange, setNodes, setTabsState, tabId],
);
const onNodesChangeMod = useCallback(
@@ -171,7 +171,7 @@ export default function Page({ flow }: { flow: FlowType }) {
};
});
},
- [onNodesChange, setTabsState, tabId]
+ [onNodesChange, setTabsState, tabId],
);
const onConnect = useCallback(
@@ -188,15 +188,15 @@ export default function Page({ flow }: { flow: FlowType }) {
: "stroke-gray-900 dark:stroke-gray-200",
animated: params.targetHandle.split("|")[0] === "Text",
},
- eds
- )
+ eds,
+ ),
);
setNodes((x) => {
let newX = _.cloneDeep(x);
return newX;
});
},
- [setEdges, setNodes, takeSnapshot]
+ [setEdges, setNodes, takeSnapshot],
);
const onNodeDragStart: NodeDragHandler = useCallback(() => {
@@ -230,7 +230,7 @@ export default function Page({ flow }: { flow: FlowType }) {
// Extract the data from the drag event and parse it as a JSON object
let data: { type: string; node?: APIClassType } = JSON.parse(
- event.dataTransfer.getData("json")
+ event.dataTransfer.getData("json"),
);
// If data type is not "chatInput" or if there are no "chatInputNode" nodes present in the ReactFlow instance, create a new node
@@ -275,7 +275,7 @@ export default function Page({ flow }: { flow: FlowType }) {
setNodes((nds) => nds.concat(newNode));
},
// Specify dependencies for useCallback
- [getNodeId, reactFlowInstance, setErrorData, setNodes, takeSnapshot]
+ [getNodeId, reactFlowInstance, setErrorData, setNodes, takeSnapshot],
);
useEffect(() => {
@@ -291,11 +291,12 @@ export default function Page({ flow }: { flow: FlowType }) {
takeSnapshot();
setEdges(
edges.filter(
- (ns) => !mynodes.some((n) => ns.source === n.id || ns.target === n.id)
- )
+ (ns) =>
+ !mynodes.some((n) => ns.source === n.id || ns.target === n.id),
+ ),
);
},
- [takeSnapshot, edges, setEdges]
+ [takeSnapshot, edges, setEdges],
);
const onEdgeUpdateStart = useCallback(() => {
@@ -309,7 +310,7 @@ export default function Page({ flow }: { flow: FlowType }) {
setEdges((els) => updateEdge(oldEdge, newConnection, els));
}
},
- []
+ [],
);
const onEdgeUpdateEnd = useCallback((_, edge) => {
diff --git a/src/frontend/src/pages/FlowPage/components/extraSidebarComponent/index.tsx b/src/frontend/src/pages/FlowPage/components/extraSidebarComponent/index.tsx
index 5da2d8e28..f4c051c10 100644
--- a/src/frontend/src/pages/FlowPage/components/extraSidebarComponent/index.tsx
+++ b/src/frontend/src/pages/FlowPage/components/extraSidebarComponent/index.tsx
@@ -30,7 +30,7 @@ export default function ExtraSidebar() {
const isPending = tabsState[tabId]?.isPending;
function onDragStart(
event: React.DragEvent,
- data: { type: string; node?: APIClassType }
+ data: { type: string; node?: APIClassType },
) {
//start drag event
var crt = event.currentTarget.cloneNode(true);
@@ -49,7 +49,7 @@ export default function ExtraSidebar() {
Object.keys(data).forEach((d: keyof APIObjectType, i) => {
ret[d] = {};
let keys = Object.keys(data[d]).filter((nd) =>
- nd.toLowerCase().includes(e.toLowerCase())
+ nd.toLowerCase().includes(e.toLowerCase()),
);
keys.forEach((element) => {
ret[d][element] = data[d][element];
@@ -77,7 +77,7 @@ export default function ExtraSidebar() {
{
openPopUp( );
@@ -89,7 +89,7 @@ export default function ExtraSidebar() {
{
openPopUp( f.id === tabId)} />);
@@ -176,8 +176,8 @@ export default function ExtraSidebar() {
onDragEnd={() => {
document.body.removeChild(
document.getElementsByClassName(
- "cursor-grabbing"
- )[0]
+ "cursor-grabbing",
+ )[0],
);
}}
>
@@ -195,7 +195,7 @@ export default function ExtraSidebar() {
) : (
- )
+ ),
)}
diff --git a/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx b/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx
index a60c928b6..0af822ec4 100644
--- a/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx
+++ b/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx
@@ -19,8 +19,8 @@ const NodeToolbarComponent = (props) => {
props.data.node.template[t].type === "prompt" ||
props.data.node.template[t].type === "file" ||
props.data.node.template[t].type === "Any" ||
- props.data.node.template[t].type === "int")
- ).length
+ props.data.node.template[t].type === "int"),
+ ).length,
);
const { setLastCopiedSelection, paste } = useContext(TabsContext);
@@ -43,7 +43,7 @@ const NodeToolbarComponent = (props) => {