1 && editNode ? "my-1" : "",
- "flex flex-col gap-3",
+ "flex flex-col gap-3"
)}
>
{value.map((singleValue, idx) => {
diff --git a/src/frontend/src/components/recordsOutputComponent/index.tsx b/src/frontend/src/components/recordsOutputComponent/index.tsx
index 4d1d30cc6..8f6b9973f 100644
--- a/src/frontend/src/components/recordsOutputComponent/index.tsx
+++ b/src/frontend/src/components/recordsOutputComponent/index.tsx
@@ -1,7 +1,6 @@
import { ColDef, ColGroupDef } from "ag-grid-community";
import "ag-grid-community/styles/ag-grid.css"; // Mandatory CSS required by the grid
import "ag-grid-community/styles/ag-theme-balham.css"; // Optional Theme applied to the grid
-import { FlowPoolObjectType } from "../../types/chat";
import { extractColumnsFromRows } from "../../utils/utils";
import TableComponent from "../tableComponent";
diff --git a/src/frontend/src/components/sidebarComponent/components/sideBarFolderButtons/index.tsx b/src/frontend/src/components/sidebarComponent/components/sideBarFolderButtons/index.tsx
index 3586596d6..f0a8ed4d2 100644
--- a/src/frontend/src/components/sidebarComponent/components/sideBarFolderButtons/index.tsx
+++ b/src/frontend/src/components/sidebarComponent/components/sideBarFolderButtons/index.tsx
@@ -3,6 +3,7 @@ import { useLocation } from "react-router-dom";
import { FolderType } from "../../../../pages/MainPage/entities";
import { addFolder, updateFolder } from "../../../../pages/MainPage/services";
import { handleDownloadFolderFn } from "../../../../pages/MainPage/utils/handle-download-folder";
+import useAlertStore from "../../../../stores/alertStore";
import useFlowsManagerStore from "../../../../stores/flowsManagerStore";
import { useFolderStore } from "../../../../stores/foldersStore";
import { handleKeyDown } from "../../../../utils/reactflowUtils";
@@ -13,7 +14,6 @@ import IconComponent, {
import { Button, buttonVariants } from "../../../ui/button";
import { Input } from "../../../ui/input";
import useFileDrop from "../../hooks/use-on-file-drop";
-import useAlertStore from "../../../../stores/alertStore";
type SideBarFoldersButtonsComponentProps = {
folders: FolderType[];
@@ -34,7 +34,7 @@ const SideBarFoldersButtonsComponent = ({
const [foldersNames, setFoldersNames] = useState({});
const takeSnapshot = useFlowsManagerStore((state) => state.takeSnapshot);
const [editFolders, setEditFolderName] = useState(
- folders.map((obj) => ({ name: obj.name, edit: false })),
+ folders.map((obj) => ({ name: obj.name, edit: false }))
);
const uploadFolder = useFolderStore((state) => state.uploadFolder);
const currentFolder = pathname.split("/");
@@ -60,7 +60,7 @@ const SideBarFoldersButtonsComponent = ({
const { dragOver, dragEnter, dragLeave, onDrop } = useFileDrop(
folderId,
- handleFolderChange,
+ handleFolderChange
);
const handleUploadFlowsToFolder = () => {
@@ -85,7 +85,7 @@ const SideBarFoldersButtonsComponent = ({
addFolder({ name: "New Folder", parent_id: null, description: "" }).then(
(res) => {
getFoldersApi(true);
- },
+ }
);
}
@@ -131,7 +131,7 @@ const SideBarFoldersButtonsComponent = ({
<>
{folders.map((item, index) => {
const editFolderName = editFolders?.filter(
- (folder) => folder.name === item.name,
+ (folder) => folder.name === item.name
)[0];
return (
handleChangeFolder!(item.id!)}
>
@@ -217,7 +217,7 @@ const SideBarFoldersButtonsComponent = ({
folders.map((obj) => ({
name: obj.name,
edit: false,
- })),
+ }))
);
}
if (e.key === "Enter") {
@@ -250,10 +250,10 @@ const SideBarFoldersButtonsComponent = ({
};
const updatedFolder = await updateFolder(
body,
- item.id!,
+ item.id!
);
const updateFolders = folders.filter(
- (f) => f.name !== item.name,
+ (f) => f.name !== item.name
);
setFolders([...updateFolders, updatedFolder]);
setFoldersNames({});
@@ -261,7 +261,7 @@ const SideBarFoldersButtonsComponent = ({
folders.map((obj) => ({
name: obj.name,
edit: false,
- })),
+ }))
);
} else {
setFoldersNames((old) => ({
diff --git a/src/frontend/src/components/tableComponent/components/tableAutoCellRender/index.tsx b/src/frontend/src/components/tableComponent/components/tableAutoCellRender/index.tsx
index 0c5c00ac9..7c809a222 100644
--- a/src/frontend/src/components/tableComponent/components/tableAutoCellRender/index.tsx
+++ b/src/frontend/src/components/tableComponent/components/tableAutoCellRender/index.tsx
@@ -34,7 +34,7 @@ export default function TableAutoCellRender({
variant="outline"
size="sq"
className={cn(
- "min-w-min bg-success-background text-success-foreground hover:bg-success-background",
+ "min-w-min bg-success-background text-success-foreground hover:bg-success-background"
)}
>
{value}
diff --git a/src/frontend/src/components/tableComponent/components/tableNodeCellRender/index.tsx b/src/frontend/src/components/tableComponent/components/tableNodeCellRender/index.tsx
index 37e19339b..6351d5d98 100644
--- a/src/frontend/src/components/tableComponent/components/tableNodeCellRender/index.tsx
+++ b/src/frontend/src/components/tableComponent/components/tableNodeCellRender/index.tsx
@@ -1,6 +1,14 @@
import { CustomCellRendererProps } from "ag-grid-react";
import { cloneDeep } from "lodash";
import { useState } from "react";
+import useFlowStore from "../../../../stores/flowStore";
+import {
+ convertObjToArray,
+ convertValuesToNumbers,
+ hasDuplicateKeys,
+ scapedJSONStringfy,
+} from "../../../../utils/reactflowUtils";
+import { classNames } from "../../../../utils/utils";
import CodeAreaComponent from "../../../codeAreaComponent";
import DictComponent from "../../../dictComponent";
import Dropdown from "../../../dropdownComponent";
@@ -13,14 +21,6 @@ import KeypairListComponent from "../../../keypairListComponent";
import PromptAreaComponent from "../../../promptComponent";
import TextAreaComponent from "../../../textAreaComponent";
import ToggleShadComponent from "../../../toggleShadComponent";
-import useFlowStore from "../../../../stores/flowStore";
-import {
- convertObjToArray,
- convertValuesToNumbers,
- hasDuplicateKeys,
- scapedJSONStringfy,
-} from "../../../../utils/reactflowUtils";
-import { classNames } from "../../../../utils/utils";
export default function TableNodeCellRender({
node: { data },
@@ -63,8 +63,8 @@ export default function TableNodeCellRender({
...id,
proxy: templateData.proxy,
}
- : id,
- ),
+ : id
+ )
) ?? false;
function getCellType() {
switch (templateData.type) {
@@ -135,7 +135,7 @@ export default function TableNodeCellRender({
1 ? "my-3" : "",
+ templateValue?.length > 1 ? "my-3" : ""
)}
>
;
@@ -33,7 +32,7 @@ const TableComponent = forwardRef<
alertDescription = DEFAULT_TABLE_ALERT_MSG,
...props
},
- ref,
+ ref
) => {
let colDef = props.columnDefs.map((col, index) => {
let newCol = {
@@ -90,7 +89,7 @@ const TableComponent = forwardRef<
const onColumnMoved = (params) => {
const updatedColumnDefs = makeLastColumnNonResizable(
- params.columnApi.getAllGridColumns().map((col) => col.getColDef()),
+ params.columnApi.getAllGridColumns().map((col) => col.getColDef())
);
params.api.setGridOption("columnDefs", updatedColumnDefs);
if (props.onColumnMoved) props.onColumnMoved(params);
@@ -115,7 +114,7 @@ const TableComponent = forwardRef<
className={cn(
dark ? "ag-theme-quartz-dark" : "ag-theme-quartz",
"ag-theme-shadcn flex h-full flex-col",
- "relative",
+ "relative"
)} // applying the grid theme
>
resetGrid(realRef, initialColumnDefs)} />
);
- },
+ }
);
export default TableComponent;
diff --git a/src/frontend/src/controllers/API/api.tsx b/src/frontend/src/controllers/API/api.tsx
index 91abedd18..560519d94 100644
--- a/src/frontend/src/controllers/API/api.tsx
+++ b/src/frontend/src/controllers/API/api.tsx
@@ -48,7 +48,7 @@ function ApiInterceptor() {
}
await clearBuildVerticesState(error);
return Promise.reject(error);
- },
+ }
);
const isAuthorizedURL = (url) => {
@@ -65,10 +65,10 @@ function ApiInterceptor() {
const parsedURL = new URL(url);
const isDomainAllowed = authorizedDomains.some(
- (domain) => parsedURL.origin === new URL(domain).origin,
+ (domain) => parsedURL.origin === new URL(domain).origin
);
const isEndpointAllowed = authorizedEndpoints.some((endpoint) =>
- parsedURL.pathname.includes(endpoint),
+ parsedURL.pathname.includes(endpoint)
);
return isDomainAllowed || isEndpointAllowed;
@@ -96,7 +96,7 @@ function ApiInterceptor() {
},
(error) => {
return Promise.reject(error);
- },
+ }
);
return () => {
@@ -128,7 +128,7 @@ function ApiInterceptor() {
if (error?.config?.headers) {
delete error.config.headers["Authorization"];
error.config.headers["Authorization"] = `Bearer ${cookies.get(
- "access_token_lf",
+ "access_token_lf"
)}`;
const response = await axios.request(error.config);
return response;
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/modals/IOModal/components/IOFieldView/components/csvSelect/index.tsx b/src/frontend/src/modals/IOModal/components/IOFieldView/components/csvSelect/index.tsx
index 5adb156ef..1438237b7 100644
--- a/src/frontend/src/modals/IOModal/components/IOFieldView/components/csvSelect/index.tsx
+++ b/src/frontend/src/modals/IOModal/components/IOFieldView/components/csvSelect/index.tsx
@@ -29,7 +29,7 @@ export default function CsvSelect({ node, handleChangeSelect }): JSX.Element {
{separator}
- ),
+ )
)}
diff --git a/src/frontend/src/modals/IOModal/components/chatView/fileComponent/index.tsx b/src/frontend/src/modals/IOModal/components/chatView/fileComponent/index.tsx
index 62b4a8071..73298cce0 100644
--- a/src/frontend/src/modals/IOModal/components/chatView/fileComponent/index.tsx
+++ b/src/frontend/src/modals/IOModal/components/chatView/fileComponent/index.tsx
@@ -1,9 +1,8 @@
-import * as base64js from "base64-js";
import { useState } from "react";
import IconComponent from "../../../../../components/genericIconComponent";
-import { fileCardPropsType } from "../../../../../types/components";
-import useFlowsManagerStore from "../../../../../stores/flowsManagerStore";
import { BACKEND_URL, BASE_URL_API } from "../../../../../constants/constants";
+import useFlowsManagerStore from "../../../../../stores/flowsManagerStore";
+import { fileCardPropsType } from "../../../../../types/components";
const imgTypes = new Set(["png", "jpg"]);
@@ -32,8 +31,11 @@ export default function FileCard({
onMouseLeave={handleMouseLeave}
>
}${BASE_URL_API}files/images/${content}`})
{isHovered && (
@@ -59,7 +61,10 @@ export default function FileCard({
{" "}
{imgTypes.has(fileType) ? (
}${BASE_URL_API}files/images/${content}`})
diff --git a/src/frontend/src/modals/IOModal/components/chatView/filePreviewChat/index.tsx b/src/frontend/src/modals/IOModal/components/chatView/filePreviewChat/index.tsx
index 8ec9f19c3..3fcb208b9 100644
--- a/src/frontend/src/modals/IOModal/components/chatView/filePreviewChat/index.tsx
+++ b/src/frontend/src/modals/IOModal/components/chatView/filePreviewChat/index.tsx
@@ -1,33 +1,47 @@
-import React, { useState } from "react";
-import LoadingComponent from "../../../../../components/loadingComponent";
+import { useState } from "react";
import IconComponent from "../../../../../components/genericIconComponent";
+import LoadingComponent from "../../../../../components/loadingComponent";
-export default function FilePreview({ error, file, loading,onDelete }: { loading: boolean, file: File, error: boolean,onDelete:()=>void }) {
- const [isHovered, setIsHovered] = useState(false);
+export default function FilePreview({
+ error,
+ file,
+ loading,
+ onDelete,
+}: {
+ loading: boolean;
+ file: File;
+ error: boolean;
+ onDelete: () => void;
+}) {
+ const [isHovered, setIsHovered] = useState(false);
- return (
-
- {loading &&
}
- {error &&
Error...
}
+ return (
+
+ {loading &&
}
+ {error &&
Error...
}
+
setIsHovered(true)}
+ onMouseLeave={() => setIsHovered(false)}
+ >
+
})
+ {isHovered && (
+
setIsHovered(true)}
- onMouseLeave={() => setIsHovered(false)}
+ className="cursor-pointer rounded-full bg-white bg-opacity-80 p-2"
+ onClick={onDelete}
>
-
})
- {isHovered && (
-
- )}
+
-
- );
+
+ )}
+
+
+ );
}
diff --git a/src/frontend/src/modals/IOModal/components/chatView/index.tsx b/src/frontend/src/modals/IOModal/components/chatView/index.tsx
index b409d40cf..c117399c2 100644
--- a/src/frontend/src/modals/IOModal/components/chatView/index.tsx
+++ b/src/frontend/src/modals/IOModal/components/chatView/index.tsx
@@ -131,7 +131,7 @@ export default function ChatView({
function updateChat(
chat: ChatMessageType,
message: string,
- stream_url?: string,
+ stream_url?: string
) {
// if (message === "") return;
chat.message = message;
diff --git a/src/frontend/src/modals/IOModal/index.tsx b/src/frontend/src/modals/IOModal/index.tsx
index 186230cd2..af829cadd 100644
--- a/src/frontend/src/modals/IOModal/index.tsx
+++ b/src/frontend/src/modals/IOModal/index.tsx
@@ -24,7 +24,6 @@ import { cn } from "../../utils/utils";
import BaseModal from "../baseModal";
import IOFieldView from "./components/IOFieldView";
import ChatView from "./components/chatView";
-import { getSessions } from "../../controllers/API";
export default function IOModal({
children,
diff --git a/src/frontend/src/modals/apiModal/utils/get-python-api-code.tsx b/src/frontend/src/modals/apiModal/utils/get-python-api-code.tsx
index a19ee6a28..e51403acb 100644
--- a/src/frontend/src/modals/apiModal/utils/get-python-api-code.tsx
+++ b/src/frontend/src/modals/apiModal/utils/get-python-api-code.tsx
@@ -9,7 +9,7 @@ export default function getPythonApiCode(
flowId: string,
isAuth: boolean,
tweaksBuildedObject,
- endpointName?: string,
+ endpointName?: string
): string {
const tweaksObject = tweaksBuildedObject[0];
return `import argparse
diff --git a/src/frontend/src/modals/baseModal/index.tsx b/src/frontend/src/modals/baseModal/index.tsx
index e1d835f16..8ac883bb3 100644
--- a/src/frontend/src/modals/baseModal/index.tsx
+++ b/src/frontend/src/modals/baseModal/index.tsx
@@ -16,11 +16,11 @@ import {
} from "../../components/ui/dialog-with-no-close";
import { DialogClose } from "@radix-ui/react-dialog";
+import * as Form from "@radix-ui/react-form";
import { Button } from "../../components/ui/button";
import { modalHeaderType } from "../../types/components";
import { cn } from "../../utils/utils";
import { switchCaseModalSize } from "./helpers/switch-case-size";
-import * as Form from "@radix-ui/react-form";
type ContentProps = { children: ReactNode };
type HeaderProps = { children: ReactNode; description: string };
@@ -103,7 +103,7 @@ interface BaseModalProps {
React.ReactElement
,
React.ReactElement,
React.ReactElement?,
- React.ReactElement?,
+ React.ReactElement?
];
open?: boolean;
setOpen?: (open: boolean) => void;
@@ -139,16 +139,16 @@ function BaseModal({
onSubmit,
}: BaseModalProps) {
const headerChild = React.Children.toArray(children).find(
- (child) => (child as React.ReactElement).type === Header,
+ (child) => (child as React.ReactElement).type === Header
);
const triggerChild = React.Children.toArray(children).find(
- (child) => (child as React.ReactElement).type === Trigger,
+ (child) => (child as React.ReactElement).type === Trigger
);
const ContentChild = React.Children.toArray(children).find(
- (child) => (child as React.ReactElement).type === Content,
+ (child) => (child as React.ReactElement).type === Content
);
const ContentFooter = React.Children.toArray(children).find(
- (child) => (child as React.ReactElement).type === Footer,
+ (child) => (child as React.ReactElement).type === Footer
);
let { minWidth, height } = switchCaseModalSize(size);
diff --git a/src/frontend/src/modals/editNodeModal/hooks/use-column-defs.tsx b/src/frontend/src/modals/editNodeModal/hooks/use-column-defs.tsx
index 2cf57921b..dbeecc9d6 100644
--- a/src/frontend/src/modals/editNodeModal/hooks/use-column-defs.tsx
+++ b/src/frontend/src/modals/editNodeModal/hooks/use-column-defs.tsx
@@ -1,6 +1,5 @@
import { ColDef, ValueGetterParams } from "ag-grid-community";
import { useMemo } from "react";
-import TableAutoCellRender from "../../../components/tableComponent/components/tableAutoCellRender";
import TableNodeCellRender from "../../../components/tableComponent/components/tableNodeCellRender";
import TableToggleCellRender from "../../../components/tableComponent/components/tableToggleCellRender";
import TableTooltipRender from "../../../components/tableComponent/components/tableTooltipRender";
@@ -9,7 +8,7 @@ const useColumnDefs = (
myData: any,
handleOnNewValue: (newValue: any, name: string) => void,
changeAdvanced: (n: string) => void,
- open: boolean,
+ open: boolean
) => {
const columnDefs: ColDef[] = useMemo(
() => [
@@ -82,7 +81,7 @@ const useColumnDefs = (
cellClass: "no-border",
},
],
- [open, myData],
+ [open, myData]
);
return columnDefs;
diff --git a/src/frontend/src/modals/exportModal/index.tsx b/src/frontend/src/modals/exportModal/index.tsx
index 9cd81c123..5a95e3f56 100644
--- a/src/frontend/src/modals/exportModal/index.tsx
+++ b/src/frontend/src/modals/exportModal/index.tsx
@@ -45,7 +45,7 @@ const ExportModal = forwardRef(
is_component: false,
},
name!,
- description,
+ description
);
setNoticeData({
title: API_WARNING_NOTICE_ALERT,
@@ -61,7 +61,7 @@ const ExportModal = forwardRef(
is_component: false,
}),
name!,
- description,
+ description
);
setOpen(false);
}}
@@ -102,6 +102,6 @@ const ExportModal = forwardRef(
);
- },
+ }
);
export default ExportModal;
diff --git a/src/frontend/src/modals/secretKeyModal/index.tsx b/src/frontend/src/modals/secretKeyModal/index.tsx
index f700501d1..bb928ee32 100644
--- a/src/frontend/src/modals/secretKeyModal/index.tsx
+++ b/src/frontend/src/modals/secretKeyModal/index.tsx
@@ -7,7 +7,6 @@ import { COPIED_NOTICE_ALERT } from "../../constants/alerts_constants";
import { createApiKey } from "../../controllers/API";
import useAlertStore from "../../stores/alertStore";
import { ApiKeyType } from "../../types/components";
-import { nodeIconsLucide } from "../../utils/styleUtils";
import BaseModal from "../baseModal";
export default function SecretKeyModal({
diff --git a/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx b/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx
index e3bef9114..bbd5573cb 100644
--- a/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx
+++ b/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx
@@ -58,7 +58,7 @@ export default function NodeToolbarComponent({
data.node.template[templateField].type === "Any" ||
data.node.template[templateField].type === "int" ||
data.node.template[templateField].type === "dict" ||
- data.node.template[templateField].type === "NestedDict"),
+ data.node.template[templateField].type === "NestedDict")
).length;
const templates = useTypesStore((state) => state.templates);
const hasStore = useStoreStore((state) => state.hasStore);
@@ -85,7 +85,7 @@ export default function NodeToolbarComponent({
const [showconfirmShare, setShowconfirmShare] = useState(false);
const [showOverrideModal, setShowOverrideModal] = useState(false);
const [flowComponent, setFlowComponent] = useState(
- createFlowComponent(cloneDeep(data), version),
+ createFlowComponent(cloneDeep(data), version)
);
const openInNewTab = (url) => {
@@ -100,7 +100,7 @@ export default function NodeToolbarComponent({
const updateNodeInternals = useUpdateNodeInternals();
const setLastCopiedSelection = useFlowStore(
- (state) => state.setLastCopiedSelection,
+ (state) => state.setLastCopiedSelection
);
const setSuccessData = useAlertStore((state) => state.setSuccessData);
@@ -153,7 +153,7 @@ export default function NodeToolbarComponent({
nodes,
edges,
setNodes,
- setEdges,
+ setEdges
);
break;
case "override":
@@ -177,7 +177,7 @@ export default function NodeToolbarComponent({
y: 10,
paneX: nodes.find((node) => node.id === data.id)?.position.x,
paneY: nodes.find((node) => node.id === data.id)?.position.y,
- },
+ }
);
break;
case "update":
@@ -215,13 +215,13 @@ export default function NodeToolbarComponent({
};
const isSaved = flows.some((flow) =>
- Object.values(flow).includes(data.node?.display_name!),
+ Object.values(flow).includes(data.node?.display_name!)
);
const setNode = useFlowStore((state) => state.setNode);
const handleOnNewValue = (
- newValue: string | string[] | boolean | Object[],
+ newValue: string | string[] | boolean | Object[]
): void => {
if (data.node!.template[name].value !== newValue) {
takeSnapshot();
@@ -408,7 +408,7 @@ export default function NodeToolbarComponent({
data-testid="save-button-modal"
className={classNames(
"relative -ml-px inline-flex items-center bg-background px-2 py-2 text-foreground shadow-md ring-1 ring-inset ring-ring transition-all duration-500 ease-in-out hover:bg-muted focus:z-10",
- hasCode ? " " : " rounded-l-md ",
+ hasCode ? " " : " rounded-l-md "
)}
onClick={(event) => {
event.preventDefault();
@@ -426,7 +426,7 @@ export default function NodeToolbarComponent({