diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsx index 04d48103b..849244999 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 99b28b7bf..8b76fc243 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx @@ -1,5 +1,6 @@ import { cloneDeep } from "lodash"; import { ReactNode, useEffect, useRef, useState } from "react"; +import { useHotkeys } from "react-hotkeys-hook"; import { Handle, Position, useUpdateNodeInternals } from "reactflow"; import CodeAreaComponent from "../../../../components/codeAreaComponent"; import DictComponent from "../../../../components/dictComponent"; @@ -24,6 +25,7 @@ import { import { Case } from "../../../../shared/components/caseComponent"; import useFlowStore from "../../../../stores/flowStore"; import useFlowsManagerStore from "../../../../stores/flowsManagerStore"; +import { useShortcutsStore } from "../../../../stores/shortcuts"; import { useTypesStore } from "../../../../stores/typesStore"; import { APIClassType } from "../../../../types/api"; import { ParameterComponentType } from "../../../../types/components"; @@ -48,11 +50,9 @@ import useFetchDataOnMount from "../../../hooks/use-fetch-data-on-mount"; import useHandleOnNewValue from "../../../hooks/use-handle-new-value"; import useHandleNodeClass from "../../../hooks/use-handle-node-class"; import useHandleRefreshButtonPress from "../../../hooks/use-handle-refresh-buttons"; +import OutputModal from "../outputModal"; import TooltipRenderComponent from "../tooltipRenderComponent"; import { TEXT_FIELD_TYPES } from "./constants"; -import OutputModal from "../outputModal"; -import { useShortcutsStore } from "../../../../stores/shortcuts"; -import { useHotkeys } from "react-hotkeys-hook"; export default function ParameterComponent({ left, @@ -121,7 +121,7 @@ export default function ParameterComponent({ debouncedHandleUpdateValues, setNode, renderTooltips, - setIsLoading, + setIsLoading ); const { handleNodeClass: handleNodeClassHook } = useHandleNodeClass( @@ -130,7 +130,7 @@ export default function ParameterComponent({ takeSnapshot, setNode, updateNodeInternals, - renderTooltips, + renderTooltips ); const { handleRefreshButtonPress: handleRefreshButtonPressHook } = @@ -139,7 +139,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) => { @@ -152,12 +152,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); }; @@ -239,7 +239,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, @@ -309,7 +309,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"} /> @@ -359,7 +359,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); @@ -72,7 +72,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] = @@ -90,7 +90,7 @@ export default function GenericNode({ data.node!, setNode, setIsOutdated, - updateNodeInternals, + updateNodeInternals ); const name = nodeIconsLucide[data.type] ? data.type : types[data.type]; @@ -117,12 +117,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); @@ -131,7 +131,7 @@ export default function GenericNode({ baseBorderClass, nodeSizeClass, "generic-node-div group/node", - specificClassFromBuildStatus, + specificClassFromBuildStatus ); return names; }; @@ -176,7 +176,7 @@ export default function GenericNode({ showNode, isEmoji, nodeIconFragment, - checkNodeIconFragment, + checkNodeIconFragment ); function countHandles(): void { @@ -309,7 +309,7 @@ export default function GenericNode({ selected, showNode, buildStatus, - validationStatus, + validationStatus )} > {data.node?.beta && showNode && ( @@ -457,7 +457,7 @@ export default function GenericNode({ } title={getFieldTitle( data.node?.template!, - templateField, + templateField )} info={data.node?.template[templateField].info} name={templateField} @@ -485,7 +485,7 @@ export default function GenericNode({ proxy={data.node?.template[templateField].proxy} showNode={showNode} /> - ), + ) )} { setInputDescription(true); @@ -713,13 +713,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} @@ -746,7 +746,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 f203a059a..d8545d72a 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 @@ -13,7 +13,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 7be08491c..b41491f97 100644 --- a/src/frontend/src/CustomNodes/hooks/use-handle-new-value.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-handle-new-value.tsx @@ -14,7 +14,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 42e8b64b3..19c6112d5 100644 --- a/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx @@ -1,14 +1,12 @@ -import ForwardedIconComponent from "../../components/genericIconComponent"; import Checkmark from "../../components/ui/checkmark"; 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, + validationStatus: VertexBuildTypeAPI | null ) => { const conditionSuccess = validationStatus && validationStatus.valid; const conditionError = 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 ae23c34ac..d75bf625c 100644 --- a/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx +++ b/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx @@ -29,19 +29,19 @@ export default function AddNewVariableButton({ 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 fab9a88d7..3040f685c 100644 --- a/src/frontend/src/components/chatComponent/index.tsx +++ b/src/frontend/src/components/chatComponent/index.tsx @@ -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/csvOutputComponent/index.tsx b/src/frontend/src/components/csvOutputComponent/index.tsx index 0b9a9d76e..1d4e342de 100644 --- a/src/frontend/src/components/csvOutputComponent/index.tsx +++ b/src/frontend/src/components/csvOutputComponent/index.tsx @@ -67,7 +67,7 @@ function CsvOutputComponent({ if (file) { const { rowData: data, colDefs: columns } = convertCSVToData( file, - separator, + separator ); setRowData(data); setColDefs(columns); diff --git a/src/frontend/src/components/dictComponent/index.tsx b/src/frontend/src/components/dictComponent/index.tsx index 057ba599d..b0340bf1a 100644 --- a/src/frontend/src/components/dictComponent/index.tsx +++ b/src/frontend/src/components/dictComponent/index.tsx @@ -24,7 +24,7 @@ export default function DictComponent({
1 && editNode ? "my-1" : "", - "flex w-full flex-col gap-3", + "flex w-full flex-col gap-3" )} > { diff --git a/src/frontend/src/components/dropdownComponent/index.tsx b/src/frontend/src/components/dropdownComponent/index.tsx index 4aa9dcf07..0fd981603 100644 --- a/src/frontend/src/components/dropdownComponent/index.tsx +++ b/src/frontend/src/components/dropdownComponent/index.tsx @@ -58,7 +58,7 @@ export default function Dropdown({ ? "dropdown-component-outline" : "dropdown-component-false-outline", "w-full justify-between font-normal", - editNode ? "input-edit-node" : "py-2", + editNode ? "input-edit-node" : "py-2" )} > @@ -106,7 +106,7 @@ export default function Dropdown({ name="Check" className={cn( "ml-auto h-4 w-4 text-primary", - value === option ? "opacity-100" : "opacity-0", + value === option ? "opacity-100" : "opacity-0" )} /> diff --git a/src/frontend/src/components/editFlowSettingsComponent/index.tsx b/src/frontend/src/components/editFlowSettingsComponent/index.tsx index 26bc138e3..3dd813965 100644 --- a/src/frontend/src/components/editFlowSettingsComponent/index.tsx +++ b/src/frontend/src/components/editFlowSettingsComponent/index.tsx @@ -99,7 +99,7 @@ export const EditFlowSettings: React.FC = ({ {description === "" ? "No description" : description} diff --git a/src/frontend/src/components/genericIconComponent/index.tsx b/src/frontend/src/components/genericIconComponent/index.tsx index 9f7c687a1..398ae6e7f 100644 --- a/src/frontend/src/components/genericIconComponent/index.tsx +++ b/src/frontend/src/components/genericIconComponent/index.tsx @@ -18,7 +18,7 @@ export const ForwardedIconComponent = memo( strokeWidth, id = "", }: IconComponentProps, - ref, + ref ) => { const [showFallback, setShowFallback] = useState(false); @@ -65,8 +65,8 @@ export const ForwardedIconComponent = memo( /> ); - }, - ), + } + ) ); export default ForwardedIconComponent; diff --git a/src/frontend/src/components/headerComponent/components/menuBar/index.tsx b/src/frontend/src/components/headerComponent/components/menuBar/index.tsx index 4965d37a6..83511c769 100644 --- a/src/frontend/src/components/headerComponent/components/menuBar/index.tsx +++ b/src/frontend/src/components/headerComponent/components/menuBar/index.tsx @@ -115,7 +115,7 @@ export const MenuBar = ({}: {}): JSX.Element => { title: UPLOAD_ERROR_ALERT, list: [error], }); - }, + } ); }} > @@ -201,7 +201,7 @@ export const MenuBar = ({}: {}): JSX.Element => { name={isBuilding || saveLoading ? "Loader2" : "CheckCircle2"} className={cn( "h-4 w-4", - isBuilding || saveLoading ? "animate-spin" : "animate-wiggle", + isBuilding || saveLoading ? "animate-spin" : "animate-wiggle" )} /> {printByBuildStatus()} diff --git a/src/frontend/src/components/headerComponent/index.tsx b/src/frontend/src/components/headerComponent/index.tsx index ef6b8938d..9b87335be 100644 --- a/src/frontend/src/components/headerComponent/index.tsx +++ b/src/frontend/src/components/headerComponent/index.tsx @@ -59,7 +59,7 @@ export default function Header(): JSX.Element { const lastFlowVisitedIndex = routeHistory .reverse() .findIndex( - (path) => path.includes("/flow/") && path !== location.pathname, + (path) => path.includes("/flow/") && path !== location.pathname ); const lastFlowVisited = routeHistory[lastFlowVisitedIndex]; @@ -201,7 +201,7 @@ export default function Header(): JSX.Element { src={ `${BACKEND_URL.slice( 0, - BACKEND_URL.length - 1, + BACKEND_URL.length - 1 )}${BASE_URL_API}files/profile_pictures/${ userData?.profile_image ?? "Space/046-rocket.svg" }` ?? profileCircle @@ -219,7 +219,7 @@ export default function Header(): JSX.Element { src={ `${BACKEND_URL.slice( 0, - BACKEND_URL.length - 1, + BACKEND_URL.length - 1 )}${BASE_URL_API}files/profile_pictures/${ userData?.profile_image ?? "Space/046-rocket.svg" }` ?? profileCircle diff --git a/src/frontend/src/components/horizontalScrollFadeComponent/index.tsx b/src/frontend/src/components/horizontalScrollFadeComponent/index.tsx index e0bf48917..7e0c788a6 100644 --- a/src/frontend/src/components/horizontalScrollFadeComponent/index.tsx +++ b/src/frontend/src/components/horizontalScrollFadeComponent/index.tsx @@ -32,11 +32,11 @@ export default function HorizontalScrollFadeComponent({ fadeContainerRef.current.classList.toggle( "fade-left", - isScrollable && !atStart, + isScrollable && !atStart ); fadeContainerRef.current.classList.toggle( "fade-right", - isScrollable && !atEnd, + isScrollable && !atEnd ); }; diff --git a/src/frontend/src/components/inputComponent/components/popover/index.tsx b/src/frontend/src/components/inputComponent/components/popover/index.tsx index e93f69207..06be89d91 100644 --- a/src/frontend/src/components/inputComponent/components/popover/index.tsx +++ b/src/frontend/src/components/inputComponent/components/popover/index.tsx @@ -75,9 +75,9 @@ const CustomInputPopover = ({ (selectedOption !== "" || !onChange) && setSelectedOption ? selectedOption : (selectedOptions?.length !== 0 || !onChange) && - setSelectedOptions - ? selectedOptions?.join(", ") - : value + setSelectedOptions + ? selectedOptions?.join(", ") + : value } autoFocus={autoFocus} disabled={disabled} @@ -103,7 +103,7 @@ const CustomInputPopover = ({ (password && !(setSelectedOption || setSelectedOptions)) ? "pr-8" : "", - className!, + className! )} placeholder={password && editNode ? "Key" : placeholder} onChange={handleInputChange} @@ -141,15 +141,15 @@ const CustomInputPopover = ({ onSelect={(currentValue) => { setSelectedOption && setSelectedOption( - currentValue === selectedOption ? "" : currentValue, + currentValue === selectedOption ? "" : currentValue ); setSelectedOptions && setSelectedOptions( selectedOptions?.includes(currentValue) ? selectedOptions.filter( - (item) => item !== currentValue, + (item) => item !== currentValue ) - : [...selectedOptions, currentValue], + : [...selectedOptions, currentValue] ); !setSelectedOptions && setShowOptions(false); }} @@ -162,7 +162,7 @@ const CustomInputPopover = ({ selectedOption === option || selectedOptions?.includes(option) ? "opacity-100" - : "opacity-0", + : "opacity-0" )} >
diff --git a/src/frontend/src/components/inputComponent/components/popoverObject/index.tsx b/src/frontend/src/components/inputComponent/components/popoverObject/index.tsx index e907ec239..d43022845 100644 --- a/src/frontend/src/components/inputComponent/components/popoverObject/index.tsx +++ b/src/frontend/src/components/inputComponent/components/popoverObject/index.tsx @@ -60,14 +60,14 @@ const CustomInputPopoverObject = ({ ? options.find((option) => option.id === selectedOption)?.name || "" : (selectedOptions?.length !== 0 || !onChange) && - setSelectedOptions - ? selectedOptions - .map( - (optionId) => - options.find((option) => option.id === optionId)?.name, - ) - .join(", ") - : value + setSelectedOptions + ? selectedOptions + .map( + (optionId) => + options.find((option) => option.id === optionId)?.name + ) + .join(", ") + : value } autoFocus={autoFocus} disabled={disabled} @@ -115,15 +115,15 @@ const CustomInputPopoverObject = ({ onSelect={(currentValue) => { setSelectedOption && setSelectedOption( - currentValue === selectedOption ? "" : currentValue, + currentValue === selectedOption ? "" : currentValue ); setSelectedOptions && setSelectedOptions( selectedOptions?.includes(currentValue) ? selectedOptions.filter( - (item) => item !== currentValue, + (item) => item !== currentValue ) - : [...selectedOptions, currentValue], + : [...selectedOptions, currentValue] ); !setSelectedOptions && setShowOptions(false); }} @@ -136,7 +136,7 @@ const CustomInputPopoverObject = ({ selectedOption === option.id || selectedOptions?.includes(option.id) ? "opacity-100" - : "opacity-0", + : "opacity-0" )} >
diff --git a/src/frontend/src/components/inputComponent/index.tsx b/src/frontend/src/components/inputComponent/index.tsx index c4a2453e2..c9f9a4170 100644 --- a/src/frontend/src/components/inputComponent/index.tsx +++ b/src/frontend/src/components/inputComponent/index.tsx @@ -72,7 +72,7 @@ export default function InputComponent({ editNode ? " input-edit-node " : "", password && editNode ? "pr-8" : "", password && !editNode ? "pr-10" : "", - className!, + className! )} placeholder={password && editNode ? "Key" : placeholder} onChange={(e) => { @@ -155,7 +155,7 @@ export default function InputComponent({ @@ -85,7 +85,7 @@ export default function TableOptions({ name="Trash2" className={cn( "h-5 w-5 text-primary transition-all", - !hasSelection ? "" : "hover:text-status-red ", + !hasSelection ? "" : "hover:text-status-red " )} /> diff --git a/src/frontend/src/components/tableComponent/components/tableAutoCellRender/index.tsx b/src/frontend/src/components/tableComponent/components/tableAutoCellRender/index.tsx index 903068c84..dd886e4fa 100644 --- a/src/frontend/src/components/tableComponent/components/tableAutoCellRender/index.tsx +++ b/src/frontend/src/components/tableComponent/components/tableAutoCellRender/index.tsx @@ -30,7 +30,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 fb24786f7..925848d82 100644 --- a/src/frontend/src/components/tableComponent/components/tableNodeCellRender/index.tsx +++ b/src/frontend/src/components/tableComponent/components/tableNodeCellRender/index.tsx @@ -72,8 +72,8 @@ export default function TableNodeCellRender({ ...id, proxy: templateData.proxy, } - : id, - ), + : id + ) ) ?? false; function getCellType() { switch (templateData.type) { @@ -144,7 +144,7 @@ export default function TableNodeCellRender({
1 ? "my-3" : "", + templateValue?.length > 1 ? "my-3" : "" )} > ; @@ -36,7 +35,7 @@ const TableComponent = forwardRef< alertDescription = DEFAULT_TABLE_ALERT_MSG, ...props }, - ref, + ref ) => { let colDef = props.columnDefs.map((col, index) => { let newCol = { @@ -112,7 +111,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); @@ -136,7 +135,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 > source.includes("column"))) { localStorage.setItem( storeReference, - JSON.stringify(realRef.current?.api?.getColumnState()), + JSON.stringify(realRef.current?.api?.getColumnState()) ); setColumnStateChange(true); } @@ -176,7 +175,7 @@ const TableComponent = forwardRef< )}
); - }, + } ); export default TableComponent; diff --git a/src/frontend/src/components/tagsSelectorComponent/index.tsx b/src/frontend/src/components/tagsSelectorComponent/index.tsx index 4e3e181fc..6f84ae7c3 100644 --- a/src/frontend/src/components/tagsSelectorComponent/index.tsx +++ b/src/frontend/src/components/tagsSelectorComponent/index.tsx @@ -48,7 +48,7 @@ export function TagsSelector({ className={cn( selectedTags.some((category) => category === tag.name) ? "min-w-min bg-beta-foreground text-background hover:bg-beta-foreground" - : "", + : "" )} > {tag.name} diff --git a/src/frontend/src/components/ui/accordion.tsx b/src/frontend/src/components/ui/accordion.tsx index 39578095b..403b07996 100644 --- a/src/frontend/src/components/ui/accordion.tsx +++ b/src/frontend/src/components/ui/accordion.tsx @@ -34,7 +34,7 @@ const AccordionTrigger = React.forwardRef<
svg]:rotate-180", - className, + className )} > {children} @@ -46,7 +46,7 @@ const AccordionTrigger = React.forwardRef< @@ -64,7 +64,7 @@ const AccordionContent = React.forwardRef< ref={ref} className={cn( "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm", - className, + className )} {...props} > diff --git a/src/frontend/src/components/ui/alert.tsx b/src/frontend/src/components/ui/alert.tsx index 05c5b7fa7..a584cea26 100644 --- a/src/frontend/src/components/ui/alert.tsx +++ b/src/frontend/src/components/ui/alert.tsx @@ -15,7 +15,7 @@ const alertVariants = cva( defaultVariants: { variant: "default", }, - }, + } ); const Alert = React.forwardRef< diff --git a/src/frontend/src/components/ui/badge.tsx b/src/frontend/src/components/ui/badge.tsx index 6eea7971a..8f8d1f6aa 100644 --- a/src/frontend/src/components/ui/badge.tsx +++ b/src/frontend/src/components/ui/badge.tsx @@ -27,7 +27,7 @@ const badgeVariants = cva( defaultVariants: { variant: "default", }, - }, + } ); export interface BadgeProps diff --git a/src/frontend/src/components/ui/button.tsx b/src/frontend/src/components/ui/button.tsx index ec3265bea..76f2316a0 100644 --- a/src/frontend/src/components/ui/button.tsx +++ b/src/frontend/src/components/ui/button.tsx @@ -35,7 +35,7 @@ const buttonVariants = cva( variant: "default", size: "default", }, - }, + } ); export interface ButtonProps @@ -65,7 +65,7 @@ const Button = React.forwardRef( children, ...props }, - ref, + ref ) => { const Comp = asChild ? Slot : "button"; let newChildren = children; @@ -97,7 +97,7 @@ const Button = React.forwardRef( ); - }, + } ); Button.displayName = "Button"; diff --git a/src/frontend/src/components/ui/card.tsx b/src/frontend/src/components/ui/card.tsx index a558fb645..d986c5530 100644 --- a/src/frontend/src/components/ui/card.tsx +++ b/src/frontend/src/components/ui/card.tsx @@ -9,7 +9,7 @@ const Card = React.forwardRef< ref={ref} className={cn( "flex flex-col justify-between rounded-lg border bg-muted text-card-foreground shadow-sm transition-all", - className, + className )} {...props} /> @@ -36,7 +36,7 @@ const CardTitle = React.forwardRef< ref={ref} className={cn( "text-base font-semibold leading-tight tracking-tight", - className, + className )} {...props} /> diff --git a/src/frontend/src/components/ui/checkbox.tsx b/src/frontend/src/components/ui/checkbox.tsx index 1c3d1e4fe..2c48fde84 100644 --- a/src/frontend/src/components/ui/checkbox.tsx +++ b/src/frontend/src/components/ui/checkbox.tsx @@ -13,7 +13,7 @@ const Checkbox = React.forwardRef< ref={ref} className={cn( "peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", - className, + className )} {...props} > @@ -37,7 +37,7 @@ const CheckBoxDiv = ({ className={cn( className, "peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", - checked ? "bg-primary text-primary-foreground" : "", + checked ? "bg-primary text-primary-foreground" : "" )} > {checked && ( diff --git a/src/frontend/src/components/ui/custom-accordion.tsx b/src/frontend/src/components/ui/custom-accordion.tsx index 507649ca5..9ce39b8a7 100644 --- a/src/frontend/src/components/ui/custom-accordion.tsx +++ b/src/frontend/src/components/ui/custom-accordion.tsx @@ -24,7 +24,7 @@ const AccordionTrigger = React.forwardRef<
svg]:rotate-180", - className, + className )} > {children} @@ -43,7 +43,7 @@ const AccordionContent = React.forwardRef< ref={ref} className={cn( "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden border-[1px] text-sm data-[state=open]:rounded-b-md data-[state=open]:border-t-0 data-[state=open]:bg-muted", - className, + className )} {...props} > diff --git a/src/frontend/src/components/ui/form.tsx b/src/frontend/src/components/ui/form.tsx index 69789b6f3..dcfd39449 100644 --- a/src/frontend/src/components/ui/form.tsx +++ b/src/frontend/src/components/ui/form.tsx @@ -16,18 +16,18 @@ const Form = FormProvider; type FormFieldContextValue< TFieldValues extends FieldValues = FieldValues, - TName extends FieldPath = FieldPath, + TName extends FieldPath = FieldPath > = { name: TName; }; const FormFieldContext = React.createContext( - {} as FormFieldContextValue, + {} as FormFieldContextValue ); const FormField = < TFieldValues extends FieldValues = FieldValues, - TName extends FieldPath = FieldPath, + TName extends FieldPath = FieldPath >({ ...props }: ControllerProps) => { @@ -66,7 +66,7 @@ type FormItemContextValue = { }; const FormItemContext = React.createContext( - {} as FormItemContextValue, + {} as FormItemContextValue ); const FormItem = React.forwardRef< diff --git a/src/frontend/src/components/ui/select-custom.tsx b/src/frontend/src/components/ui/select-custom.tsx index 82ba540fe..86a7bf3ac 100644 --- a/src/frontend/src/components/ui/select-custom.tsx +++ b/src/frontend/src/components/ui/select-custom.tsx @@ -36,7 +36,7 @@ const SelectContent = React.forwardRef< "relative z-50 min-w-[14rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", - className, + className )} position={position} {...props} @@ -45,7 +45,7 @@ const SelectContent = React.forwardRef< className={cn( "p-1", position === "popper" && - "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]", + "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]" )} > {children} @@ -75,7 +75,7 @@ const SelectItem = React.forwardRef< ref={ref} className={cn( "relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-3 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className, + className )} {...props} > diff --git a/src/frontend/src/components/ui/toggle.tsx b/src/frontend/src/components/ui/toggle.tsx index f41840dce..08ebb1380 100644 --- a/src/frontend/src/components/ui/toggle.tsx +++ b/src/frontend/src/components/ui/toggle.tsx @@ -25,7 +25,7 @@ const toggleVariants = cva( variant: "default", size: "default", }, - }, + } ); const Toggle = React.forwardRef< diff --git a/src/frontend/src/components/ui/tooltip.tsx b/src/frontend/src/components/ui/tooltip.tsx index 3ee8b9c7a..7f81bc3bd 100644 --- a/src/frontend/src/components/ui/tooltip.tsx +++ b/src/frontend/src/components/ui/tooltip.tsx @@ -20,7 +20,7 @@ const TooltipContent = React.forwardRef< sideOffset={sideOffset} className={cn( "z-45 overflow-y-auto rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-50 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1", - className, + className )} {...props} /> @@ -37,7 +37,7 @@ const TooltipContentWithoutPortal = React.forwardRef< sideOffset={sideOffset} className={cn( "z-45 overflow-y-auto rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-50 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1", - className, + className )} {...props} /> diff --git a/src/frontend/src/contexts/authContext.tsx b/src/frontend/src/contexts/authContext.tsx index b37816571..1817447f1 100644 --- a/src/frontend/src/contexts/authContext.tsx +++ b/src/frontend/src/contexts/authContext.tsx @@ -30,17 +30,17 @@ export function AuthProvider({ children }): React.ReactElement { const navigate = useNavigate(); const cookies = new Cookies(); const [accessToken, setAccessToken] = useState( - cookies.get("access_token_lf") ?? null, + cookies.get("access_token_lf") ?? null ); const [isAuthenticated, setIsAuthenticated] = useState( - !!cookies.get("access_token_lf"), + !!cookies.get("access_token_lf") ); const [isAdmin, setIsAdmin] = useState(false); const [userData, setUserData] = useState(null); const [autoLogin, setAutoLogin] = useState(false); const setLoading = useAlertStore((state) => state.setLoading); const [apiKey, setApiKey] = useState( - cookies.get("apikey_tkn_lflw"), + cookies.get("apikey_tkn_lflw") ); // const getFoldersApi = useFolderStore((state) => state.getFoldersApi); diff --git a/src/frontend/src/controllers/API/api.tsx b/src/frontend/src/controllers/API/api.tsx index b8035e74e..2a305cf5a 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; @@ -101,7 +101,7 @@ function ApiInterceptor() { }, (error) => { return Promise.reject(error); - }, + } ); return () => { @@ -133,7 +133,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/controllers/API/helpers/check-duplicate-requests.ts b/src/frontend/src/controllers/API/helpers/check-duplicate-requests.ts index 79a47c7a7..6486de541 100644 --- a/src/frontend/src/controllers/API/helpers/check-duplicate-requests.ts +++ b/src/frontend/src/controllers/API/helpers/check-duplicate-requests.ts @@ -8,7 +8,7 @@ export function checkDuplicateRequestAndStoreRequest(config) { const currentTime = Date.now(); const isContained = AUTHORIZED_DUPLICATE_REQUESTS.some((request) => - config?.url!.includes(request), + config?.url!.includes(request) ); if ( diff --git a/src/frontend/src/controllers/API/index.ts b/src/frontend/src/controllers/API/index.ts index 91068832e..07a9cd06d 100644 --- a/src/frontend/src/controllers/API/index.ts +++ b/src/frontend/src/controllers/API/index.ts @@ -63,7 +63,7 @@ export async function sendAll(data: sendAllProps) { } export async function postValidateCode( - code: string, + code: string ): Promise> { return await api.post(`${BASE_URL_API}validate/code`, { code }); } @@ -78,7 +78,7 @@ export async function postValidateCode( export async function postValidatePrompt( name: string, template: string, - frontend_node: APIClassType, + frontend_node: APIClassType ): Promise> { return api.post(`${BASE_URL_API}validate/prompt`, { name, @@ -151,7 +151,7 @@ export async function saveFlowToDatabase(newFlow: { * @throws Will throw an error if the update fails. */ export async function updateFlowInDatabase( - updatedFlow: FlowType, + updatedFlow: FlowType ): Promise { try { const response = await api.patch(`${BASE_URL_API}flows/${updatedFlow.id}`, { @@ -329,7 +329,7 @@ export async function getHealth() { * */ export async function getBuildStatus( - flowId: string, + flowId: string ): Promise> { return await api.get(`${BASE_URL_API}build/${flowId}/status`); } @@ -342,7 +342,7 @@ export async function getBuildStatus( * */ export async function postBuildInit( - flow: FlowType, + flow: FlowType ): Promise> { return await api.post(`${BASE_URL_API}build/init/${flow.id}`, flow); } @@ -358,7 +358,7 @@ export async function postBuildInit( */ export async function uploadFile( file: File, - id: string, + id: string ): Promise> { const formData = new FormData(); formData.append("file", file); @@ -380,7 +380,7 @@ export async function getProfilePictures(): Promise> { // let template = apiClass.template; return await api.post(`${BASE_URL_API}custom_component`, { @@ -393,7 +393,7 @@ export async function postCustomComponentUpdate( code: string, template: APITemplateType, field: string, - field_value: any, + field_value: any ): Promise> { return await api.post(`${BASE_URL_API}custom_component/update`, { code, @@ -415,7 +415,7 @@ export async function onLogin(user: LoginType) { headers: { "Content-Type": "application/x-www-form-urlencoded", }, - }, + } ); if (response.status === 200) { @@ -477,11 +477,11 @@ export async function addUser(user: UserInputType): Promise> { export async function getUsersPage( skip: number, - limit: number, + limit: number ): Promise> { try { const res = await api.get( - `${BASE_URL_API}users/?skip=${skip}&limit=${limit}`, + `${BASE_URL_API}users/?skip=${skip}&limit=${limit}` ); if (res.status === 200) { return res.data; @@ -518,7 +518,7 @@ export async function resetPassword(user_id: string, user: resetPasswordType) { try { const res = await api.patch( `${BASE_URL_API}users/${user_id}/reset-password`, - user, + user ); if (res.status === 200) { return res.data; @@ -592,7 +592,7 @@ export async function saveFlowStore( last_tested_version?: string; }, tags: string[], - publicFlow = false, + publicFlow = false ): Promise { try { const response = await api.post(`${BASE_URL_API}store/components/`, { @@ -721,7 +721,7 @@ export async function postStoreComponents(component: Component) { export async function getComponent(component_id: string) { try { const res = await api.get( - `${BASE_URL_API}store/components/${component_id}`, + `${BASE_URL_API}store/components/${component_id}` ); if (res.status === 200) { return res.data; @@ -736,7 +736,7 @@ export async function searchComponent( page?: number | null, limit?: number | null, status?: string | null, - tags?: string[], + tags?: string[] ): Promise { try { let url = `${BASE_URL_API}store/components/`; @@ -848,7 +848,7 @@ export async function updateFlowStore( }, tags: string[], publicFlow = false, - id: string, + id: string ): Promise { try { const response = await api.patch(`${BASE_URL_API}store/components/${id}`, { @@ -932,7 +932,7 @@ export async function deleteGlobalVariable(id: string) { export async function updateGlobalVariable( name: string, value: string, - id: string, + id: string ) { try { const response = api.patch(`${BASE_URL_API}variables/${id}`, { @@ -951,7 +951,7 @@ export async function getVerticesOrder( startNodeId?: string | null, stopNodeId?: string | null, nodes?: Node[], - Edges?: Edge[], + Edges?: Edge[] ): Promise> { // nodeId is optional and is a query parameter // if nodeId is not provided, the API will return all vertices @@ -971,7 +971,7 @@ export async function getVerticesOrder( return await api.post( `${BASE_URL_API}build/${flowId}/vertices`, data, - config, + config ); } @@ -979,7 +979,7 @@ export async function postBuildVertex( flowId: string, vertexId: string, input_value: string, - files?: string[], + files?: string[] ): Promise> { // input_value is optional and is a query parameter let data = {}; @@ -991,7 +991,7 @@ export async function postBuildVertex( } return await api.post( `${BASE_URL_API}build/${flowId}/vertices/${vertexId}`, - data, + data ); } @@ -1015,7 +1015,7 @@ export async function getFlowPool({ } export async function deleteFlowPool( - flowId: string, + flowId: string ): Promise> { const config = {}; config["params"] = { flow_id: flowId }; @@ -1029,7 +1029,7 @@ export async function deleteFlowPool( * @returns A promise that resolves to an array of AxiosResponse objects representing the delete responses. */ export async function multipleDeleteFlowsComponents( - flowIds: string[], + flowIds: string[] ): Promise[]> { const batches: string[][] = []; @@ -1052,7 +1052,7 @@ export async function multipleDeleteFlowsComponents( // Execute all delete requests const responses: Promise>[] = batches.map((batch) => - deleteBatch(batch), + deleteBatch(batch) ); // Return the responses after all requests are completed @@ -1062,7 +1062,7 @@ export async function multipleDeleteFlowsComponents( export async function getTransactionTable( id: string, mode: "intersection" | "union", - params = {}, + params = {} ): Promise<{ rows: Array; columns: Array }> { const config = {}; config["params"] = { flow_id: id }; @@ -1078,7 +1078,7 @@ export async function getMessagesTable( mode: "intersection" | "union", id?: string, excludedFields?: string[], - params = {}, + params = {} ): Promise<{ rows: Array; columns: Array }> { const config = {}; if (id) { diff --git a/src/frontend/src/icons/Groq/index.tsx b/src/frontend/src/icons/Groq/index.tsx index 6c4283d29..291696154 100644 --- a/src/frontend/src/icons/Groq/index.tsx +++ b/src/frontend/src/icons/Groq/index.tsx @@ -4,5 +4,5 @@ import SvgGroqLogo from "./GroqLogo"; export const GroqIcon = forwardRef>( (props, ref) => { return ; - }, + } ); diff --git a/src/frontend/src/icons/Streamlit/index.tsx b/src/frontend/src/icons/Streamlit/index.tsx index 1a4c55119..6b3391021 100644 --- a/src/frontend/src/icons/Streamlit/index.tsx +++ b/src/frontend/src/icons/Streamlit/index.tsx @@ -4,5 +4,5 @@ import SvgStreamlit from "./SvgStreamlit"; export const Streamlit = forwardRef>( (props, ref) => { return ; - }, + } ); diff --git a/src/frontend/src/index.tsx b/src/frontend/src/index.tsx index 006d93ff2..78a57298f 100644 --- a/src/frontend/src/index.tsx +++ b/src/frontend/src/index.tsx @@ -11,11 +11,11 @@ import "./style/applies.css"; import "./style/classes.css"; const root = ReactDOM.createRoot( - document.getElementById("root") as HTMLElement, + document.getElementById("root") as HTMLElement ); root.render( - , + ); reportWebVitals(); diff --git a/src/frontend/src/modals/BundleModal/hooks/submit-folder.tsx b/src/frontend/src/modals/BundleModal/hooks/submit-folder.tsx index cb12ca7cb..1347a323b 100644 --- a/src/frontend/src/modals/BundleModal/hooks/submit-folder.tsx +++ b/src/frontend/src/modals/BundleModal/hooks/submit-folder.tsx @@ -27,7 +27,7 @@ const useFolderSubmit = (setOpen, folderToEdit) => { getFoldersApi(true); setOpen(false); } - }, + } ); } else { addFolder(data).then( @@ -42,7 +42,7 @@ const useFolderSubmit = (setOpen, folderToEdit) => { setErrorData({ title: `Error creating folder.`, }); - }, + } ); } }; 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/IOFieldView/index.tsx b/src/frontend/src/modals/IOModal/components/IOFieldView/index.tsx index 20bae05c6..1ee08100e 100644 --- a/src/frontend/src/modals/IOModal/components/IOFieldView/index.tsx +++ b/src/frontend/src/modals/IOModal/components/IOFieldView/index.tsx @@ -50,7 +50,7 @@ export default function IOFieldView({ .results.result ?? ""; console.log( - (flowPool[node!.id] ?? [])[(flowPool[node!.id]?.length ?? 1) - 1]?.data, + (flowPool[node!.id] ?? [])[(flowPool[node!.id]?.length ?? 1) - 1]?.data ); function handleOutputType() { @@ -257,7 +257,7 @@ export default function IOFieldView({ rows={ Array.isArray(flowPoolNode?.data?.artifacts) ? flowPoolNode?.data?.artifacts?.map( - (artifact) => artifact.data, + (artifact) => artifact.data ) ?? [] : [flowPoolNode?.data?.artifacts] } diff --git a/src/frontend/src/modals/IOModal/components/SessionView/hooks/index.tsx b/src/frontend/src/modals/IOModal/components/SessionView/hooks/index.tsx index e8e638def..738ea9977 100644 --- a/src/frontend/src/modals/IOModal/components/SessionView/hooks/index.tsx +++ b/src/frontend/src/modals/IOModal/components/SessionView/hooks/index.tsx @@ -10,7 +10,7 @@ const useRemoveSession = (setSuccessData, setErrorData) => { await deleteMessagesFn( messages .filter((msg) => msg.session_id === session_id) - .map((msg) => msg.index), + .map((msg) => msg.index) ); deleteSession(session_id); setSuccessData({ diff --git a/src/frontend/src/modals/IOModal/components/SessionView/index.tsx b/src/frontend/src/modals/IOModal/components/SessionView/index.tsx index edabbe252..a7fc91b03 100644 --- a/src/frontend/src/modals/IOModal/components/SessionView/index.tsx +++ b/src/frontend/src/modals/IOModal/components/SessionView/index.tsx @@ -17,7 +17,7 @@ export default function SessionView({ rows }: { rows: Array }) { setSelectedRows, setSuccessData, setErrorData, - selectedRows, + selectedRows ); const { handleUpdate } = useUpdateMessage(setSuccessData, setErrorData); diff --git a/src/frontend/src/modals/IOModal/components/chatView/chatInput/components/buttonSendWrapper/index.tsx b/src/frontend/src/modals/IOModal/components/chatView/chatInput/components/buttonSendWrapper/index.tsx index bf61b2fb9..bf0600a5d 100644 --- a/src/frontend/src/modals/IOModal/components/chatView/chatInput/components/buttonSendWrapper/index.tsx +++ b/src/frontend/src/modals/IOModal/components/chatView/chatInput/components/buttonSendWrapper/index.tsx @@ -28,8 +28,8 @@ const ButtonSendWrapper = ({ noInput ? "bg-high-indigo text-background" : chatValue === "" - ? "text-primary" - : "bg-chat-send text-background", + ? "text-primary" + : "bg-chat-send text-background" )} disabled={lockChat || saveLoading} onClick={(): void => send()} diff --git a/src/frontend/src/modals/IOModal/components/chatView/chatInput/components/textAreaWrapper/index.tsx b/src/frontend/src/modals/IOModal/components/chatView/chatInput/components/textAreaWrapper/index.tsx index 29f88453a..3d41e51f4 100644 --- a/src/frontend/src/modals/IOModal/components/chatView/chatInput/components/textAreaWrapper/index.tsx +++ b/src/frontend/src/modals/IOModal/components/chatView/chatInput/components/textAreaWrapper/index.tsx @@ -18,7 +18,7 @@ const TextAreaWrapper = ({ }) => { const getPlaceholderText = ( isDragging: boolean, - noInput: boolean, + noInput: boolean ): string => { if (isDragging) { return "Drop here"; @@ -33,8 +33,8 @@ const TextAreaWrapper = ({ lockChat || saveLoading ? "form-modal-lock-true bg-input" : noInput - ? "form-modal-no-input bg-input" - : "form-modal-lock-false bg-background"; + ? "form-modal-no-input bg-input" + : "form-modal-lock-false bg-background"; const fileClass = files.length > 0 diff --git a/src/frontend/src/modals/IOModal/components/chatView/chatInput/hooks/use-drag-and-drop.tsx b/src/frontend/src/modals/IOModal/components/chatView/chatInput/hooks/use-drag-and-drop.tsx index c85617ab2..141754cbd 100644 --- a/src/frontend/src/modals/IOModal/components/chatView/chatInput/hooks/use-drag-and-drop.tsx +++ b/src/frontend/src/modals/IOModal/components/chatView/chatInput/hooks/use-drag-and-drop.tsx @@ -9,7 +9,7 @@ const useDragAndDrop = ( setIsDragging, setFiles, currentFlowId, - setErrorData, + setErrorData ) => { const dragOver = (e) => { e.preventDefault(); diff --git a/src/frontend/src/modals/IOModal/components/chatView/chatInput/hooks/use-handle-file-change.tsx b/src/frontend/src/modals/IOModal/components/chatView/chatInput/hooks/use-handle-file-change.tsx index 6316bf0c0..060481cd5 100644 --- a/src/frontend/src/modals/IOModal/components/chatView/chatInput/hooks/use-handle-file-change.tsx +++ b/src/frontend/src/modals/IOModal/components/chatView/chatInput/hooks/use-handle-file-change.tsx @@ -9,7 +9,7 @@ const snErrorTxt = "png, jpg, jpeg"; export const useHandleFileChange = (setFiles, currentFlowId) => { const setErrorData = useAlertStore((state) => state.setErrorData); const handleFileChange = async ( - event: React.ChangeEvent, + event: React.ChangeEvent ) => { const fileInput = event.target; const file = fileInput.files?.[0]; diff --git a/src/frontend/src/modals/IOModal/components/chatView/chatInput/index.tsx b/src/frontend/src/modals/IOModal/components/chatView/chatInput/index.tsx index a3c070a5f..4311f0ed2 100644 --- a/src/frontend/src/modals/IOModal/components/chatView/chatInput/index.tsx +++ b/src/frontend/src/modals/IOModal/components/chatView/chatInput/index.tsx @@ -116,7 +116,7 @@ export default function ChatInput({ key={file.id} onDelete={() => { setFiles((prev: FilePreviewType[]) => - prev.filter((f) => f.id !== file.id), + prev.filter((f) => f.id !== file.id) ); // TODO: delete file on backend }} diff --git a/src/frontend/src/modals/IOModal/components/chatView/chatMessage/index.tsx b/src/frontend/src/modals/IOModal/components/chatView/chatMessage/index.tsx index 1d4b11667..d6451d1ae 100644 --- a/src/frontend/src/modals/IOModal/components/chatView/chatMessage/index.tsx +++ b/src/frontend/src/modals/IOModal/components/chatView/chatMessage/index.tsx @@ -115,19 +115,19 @@ export default function ChatMessage({
), - [chat.message, chatMessage], + [chat.message, chatMessage] )}
@@ -292,7 +292,7 @@ dark:prose-invert" parts.push( {chat.message[match[1]]} - , + ); } 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 a034b1c40..7b56cdcc0 100644 --- a/src/frontend/src/modals/IOModal/components/chatView/fileComponent/index.tsx +++ b/src/frontend/src/modals/IOModal/components/chatView/fileComponent/index.tsx @@ -29,7 +29,7 @@ export default function FileCard({ const imgSrc = `${BACKEND_URL.slice( 0, - BACKEND_URL.length - 1, + BACKEND_URL.length - 1 )}${BASE_URL_API}files/images/${content}`; console.log(imgSrc); diff --git a/src/frontend/src/modals/IOModal/components/chatView/fileComponent/utils/handle-download.tsx b/src/frontend/src/modals/IOModal/components/chatView/fileComponent/utils/handle-download.tsx index a4be91d50..e82bf3167 100644 --- a/src/frontend/src/modals/IOModal/components/chatView/fileComponent/utils/handle-download.tsx +++ b/src/frontend/src/modals/IOModal/components/chatView/fileComponent/utils/handle-download.tsx @@ -20,8 +20,8 @@ export default async function handleDownload({ const response = await fetch( `${BACKEND_URL.slice( 0, - BACKEND_URL.length - 1, - )}${BASE_URL_API}files/download/${content}`, + BACKEND_URL.length - 1 + )}${BASE_URL_API}files/download/${content}` ); if (!response.ok) { throw new Error("Network response was not ok"); diff --git a/src/frontend/src/modals/IOModal/components/chatView/filePreviewChat/utils/format-file-name.tsx b/src/frontend/src/modals/IOModal/components/chatView/filePreviewChat/utils/format-file-name.tsx index 94258b6af..b474f8294 100644 --- a/src/frontend/src/modals/IOModal/components/chatView/filePreviewChat/utils/format-file-name.tsx +++ b/src/frontend/src/modals/IOModal/components/chatView/filePreviewChat/utils/format-file-name.tsx @@ -1,6 +1,6 @@ export default function formatFileName( name: string, - numberToTruncate: number = 25, + numberToTruncate: number = 25 ): string { if (name[numberToTruncate] === undefined) { return name; diff --git a/src/frontend/src/modals/IOModal/components/chatView/index.tsx b/src/frontend/src/modals/IOModal/components/chatView/index.tsx index 736d21a6f..d4d4c8080 100644 --- a/src/frontend/src/modals/IOModal/components/chatView/index.tsx +++ b/src/frontend/src/modals/IOModal/components/chatView/index.tsx @@ -58,7 +58,7 @@ export default function ChatView({ // .filter( (output) => - output.data.message || (!output.data.message && output.artifacts), + output.data.message || (!output.data.message && output.artifacts) ) .map((output, index) => { try { @@ -139,7 +139,7 @@ export default function ChatView({ function updateChat( chat: ChatMessageType, message: string, - stream_url?: string, + stream_url?: string ) { chat.message = message; updateFlowPool(chat.componentId, { @@ -155,7 +155,7 @@ export default function ChatView({ setIsDragging, setFiles, currentFlowId, - setErrorData, + setErrorData ); return ( diff --git a/src/frontend/src/modals/IOModal/index.tsx b/src/frontend/src/modals/IOModal/index.tsx index 2730dceb9..f1dc14182 100644 --- a/src/frontend/src/modals/IOModal/index.tsx +++ b/src/frontend/src/modals/IOModal/index.tsx @@ -36,25 +36,25 @@ export default function IOModal({ const allNodes = useFlowStore((state) => state.nodes); const setMessages = useMessagesStore((state) => state.setMessages); const inputs = useFlowStore((state) => state.inputs).filter( - (input) => input.type !== "ChatInput", + (input) => input.type !== "ChatInput" ); const chatInput = useFlowStore((state) => state.inputs).find( - (input) => input.type === "ChatInput", + (input) => input.type === "ChatInput" ); const outputs = useFlowStore((state) => state.outputs).filter( - (output) => output.type !== "ChatOutput", + (output) => output.type !== "ChatOutput" ); const chatOutput = useFlowStore((state) => state.outputs).find( - (output) => output.type === "ChatOutput", + (output) => output.type === "ChatOutput" ); const nodes = useFlowStore((state) => state.nodes).filter( (node) => inputs.some((input) => input.id === node.id) || - outputs.some((output) => output.id === node.id), + outputs.some((output) => output.id === node.id) ); const haveChat = chatInput || chatOutput; const [selectedTab, setSelectedTab] = useState( - inputs.length > 0 ? 1 : outputs.length > 0 ? 2 : 0, + inputs.length > 0 ? 1 : outputs.length > 0 ? 2 : 0 ); const setErrorData = useAlertStore((state) => state.setErrorData); const setSuccessData = useAlertStore((state) => state.setSuccessData); @@ -131,7 +131,7 @@ export default function IOModal({ const { handleRemoveSession } = useRemoveSession( setSuccessData, - setErrorData, + setErrorData ); useEffect(() => { @@ -155,7 +155,7 @@ export default function IOModal({ ({ rows, columns }) => { setMessages(rows); setColumns(columns); - }, + } ); } }, [open]); @@ -194,7 +194,7 @@ export default function IOModal({
{nodes .filter((node) => - inputs.some((input) => input.id === node.id), + inputs.some((input) => input.id === node.id) ) .map((node, index) => { const input = inputs.find( - (input) => input.id === node.id, + (input) => input.id === node.id )!; return (
{nodes .filter((node) => - outputs.some((output) => output.id === node.id), + outputs.some((output) => output.id === node.id) ) .map((node, index) => { const output = outputs.find( - (output) => output.id === node.id, + (output) => output.id === node.id )!; const textOutputValue = (flowPool[node!.id] ?? [])[ @@ -439,7 +439,7 @@ export default function IOModal({
@@ -458,7 +458,7 @@ export default function IOModal({
{inputs.some( - (input) => input.id === selectedViewField.id, + (input) => input.id === selectedViewField.id ) && ( )} {outputs.some( - (output) => output.id === selectedViewField.id, + (output) => output.id === selectedViewField.id ) && ( )} {sessions.some( - (session) => session === selectedViewField.id, + (session) => session === selectedViewField.id ) && ( - message.session_id === selectedViewField.id, + message.session_id === selectedViewField.id )} /> )} @@ -493,7 +493,7 @@ export default function IOModal({
{haveChat ? ( @@ -525,7 +525,7 @@ export default function IOModal({ "h-4 w-4", isBuilding ? "animate-spin" - : "fill-current text-medium-indigo", + : "fill-current text-medium-indigo" )} /> ), diff --git a/src/frontend/src/modals/apiModal/index.tsx b/src/frontend/src/modals/apiModal/index.tsx index ead038ad2..19f506459 100644 --- a/src/frontend/src/modals/apiModal/index.tsx +++ b/src/frontend/src/modals/apiModal/index.tsx @@ -39,7 +39,7 @@ const ApiModal = forwardRef( open?: boolean; setOpen?: (a: boolean | ((o?: boolean) => boolean)) => void; }, - ref, + ref ) => { const tweak = useTweaksStore((state) => state.tweak); const addTweaks = useTweaksStore((state) => state.setTweak); @@ -57,18 +57,18 @@ const ApiModal = forwardRef( flow?.id, autoLogin, tweak, - flow?.endpoint_name, + flow?.endpoint_name ); const curl_run_code = getCurlRunCode( flow?.id, autoLogin, tweak, - flow?.endpoint_name, + flow?.endpoint_name ); const curl_webhook_code = getCurlWebhookCode( flow?.id, autoLogin, - flow?.endpoint_name, + flow?.endpoint_name ); const pythonCode = getPythonCode(flow?.name, tweak); const widgetCode = getWidgetCode(flow?.id, flow?.name, autoLogin); @@ -83,7 +83,7 @@ const ApiModal = forwardRef( pythonCode, ]; const [tabs, setTabs] = useState( - createTabsArray(codesArray, includeWebhook), + createTabsArray(codesArray, includeWebhook) ); const canShowTweaks = @@ -132,7 +132,7 @@ const ApiModal = forwardRef( buildTweakObject( nodeId, element.data.node.template[templateField].value, - element.data.node.template[templateField], + element.data.node.template[templateField] ); } }); @@ -149,7 +149,7 @@ const ApiModal = forwardRef( async function buildTweakObject( tw: string, changes: string | string[] | boolean | number | Object[] | Object, - template: TemplateVariableType, + template: TemplateVariableType ) { changes = getChangesType(changes, template); @@ -191,7 +191,7 @@ const ApiModal = forwardRef( flow?.id, autoLogin, cloneTweak, - flow?.endpoint_name, + flow?.endpoint_name ); const pythonCode = getPythonCode(flow?.name, cloneTweak); const widgetCode = getWidgetCode(flow?.id, flow?.name, autoLogin); @@ -235,7 +235,7 @@ const ApiModal = forwardRef( ); - }, + } ); export default ApiModal; diff --git a/src/frontend/src/modals/apiModal/utils/check-can-build-tweak-object.ts b/src/frontend/src/modals/apiModal/utils/check-can-build-tweak-object.ts index 5a859cae8..592a812c4 100644 --- a/src/frontend/src/modals/apiModal/utils/check-can-build-tweak-object.ts +++ b/src/frontend/src/modals/apiModal/utils/check-can-build-tweak-object.ts @@ -6,7 +6,7 @@ export const checkCanBuildTweakObject = (element, templateField) => { templateField.charAt(0) !== "_" && element.data.node.template[templateField].show && LANGFLOW_SUPPORTED_TYPES.has( - element.data.node.template[templateField].type, + element.data.node.template[templateField].type ) && templateField !== "code" ); diff --git a/src/frontend/src/modals/apiModal/utils/get-changes-types.ts b/src/frontend/src/modals/apiModal/utils/get-changes-types.ts index e8e912ff3..7e295e358 100644 --- a/src/frontend/src/modals/apiModal/utils/get-changes-types.ts +++ b/src/frontend/src/modals/apiModal/utils/get-changes-types.ts @@ -3,7 +3,7 @@ import { convertArrayToObj } from "../../../utils/reactflowUtils"; export const getChangesType = ( changes: string | string[] | boolean | number | Object[] | Object, - template: TemplateVariableType, + template: TemplateVariableType ) => { if (typeof changes === "string" && template.type === "float") { changes = parseFloat(changes); diff --git a/src/frontend/src/modals/apiModal/utils/get-curl-code.tsx b/src/frontend/src/modals/apiModal/utils/get-curl-code.tsx index c17118d1a..40257d73d 100644 --- a/src/frontend/src/modals/apiModal/utils/get-curl-code.tsx +++ b/src/frontend/src/modals/apiModal/utils/get-curl-code.tsx @@ -8,14 +8,14 @@ export function getCurlRunCode( flowId: string, isAuth: boolean, tweaksBuildedObject, - endpointName?: string, + endpointName?: string ): string { const tweaksObject = tweaksBuildedObject[0]; // show the endpoint name in the curl command if it exists return `curl -X POST \\ "${window.location.protocol}//${window.location.host}/api/v1/run/${ - endpointName || flowId - }?stream=false" \\ + endpointName || flowId + }?stream=false" \\ -H 'Content-Type: application/json'\\${ !isAuth ? `\n -H 'x-api-key: '\\` : "" } diff --git a/src/frontend/src/modals/apiModal/utils/get-nodes-with-default-value.ts b/src/frontend/src/modals/apiModal/utils/get-nodes-with-default-value.ts index 4cd3763c6..657526dda 100644 --- a/src/frontend/src/modals/apiModal/utils/get-nodes-with-default-value.ts +++ b/src/frontend/src/modals/apiModal/utils/get-nodes-with-default-value.ts @@ -13,8 +13,8 @@ export const getNodesWithDefaultValue = (flow) => { templateField.charAt(0) !== "_" && node.data.node.template[templateField]?.show && LANGFLOW_SUPPORTED_TYPES.has( - node.data.node.template[templateField]?.type, - ), + node.data.node.template[templateField]?.type + ) ) .map((n, i) => { arrNodesWithValues.push(node["id"]); 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 9aa946746..a876b18c3 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 @@ -10,7 +10,7 @@ export default function getPythonApiCode( flowId: string, isAuth: boolean, tweaksBuildedObject: any[], - endpointName?: string, + endpointName?: string ): string { let tweaksString = "{}"; if (tweaksBuildedObject && tweaksBuildedObject.length > 0) { diff --git a/src/frontend/src/modals/apiModal/utils/get-python-code.tsx b/src/frontend/src/modals/apiModal/utils/get-python-code.tsx index 734e16bbe..846a4c6e9 100644 --- a/src/frontend/src/modals/apiModal/utils/get-python-code.tsx +++ b/src/frontend/src/modals/apiModal/utils/get-python-code.tsx @@ -6,7 +6,7 @@ */ export default function getPythonCode( flowName: string, - tweaksBuildedObject: any[], + tweaksBuildedObject: any[] ): string { let tweaksString = "{}"; if (tweaksBuildedObject && tweaksBuildedObject.length > 0) { diff --git a/src/frontend/src/modals/apiModal/utils/get-value.ts b/src/frontend/src/modals/apiModal/utils/get-value.ts index df8e5bdde..8db7666bf 100644 --- a/src/frontend/src/modals/apiModal/utils/get-value.ts +++ b/src/frontend/src/modals/apiModal/utils/get-value.ts @@ -5,7 +5,7 @@ export const getValue = ( value: string, node: NodeType, template: TemplateVariableType, - tweak: Object[], + tweak: Object[] ) => { let returnValue = value ?? ""; diff --git a/src/frontend/src/modals/apiModal/utils/get-widget-code.tsx b/src/frontend/src/modals/apiModal/utils/get-widget-code.tsx index 0d3d02f91..a05dc192a 100644 --- a/src/frontend/src/modals/apiModal/utils/get-widget-code.tsx +++ b/src/frontend/src/modals/apiModal/utils/get-widget-code.tsx @@ -6,7 +6,7 @@ export default function getWidgetCode( flowId: string, flowName: string, - isAuth: boolean, + isAuth: boolean ): string { return ` diff --git a/src/frontend/src/modals/apiModal/utils/tabs-array.tsx b/src/frontend/src/modals/apiModal/utils/tabs-array.tsx index deed73332..adc15f932 100644 --- a/src/frontend/src/modals/apiModal/utils/tabs-array.tsx +++ b/src/frontend/src/modals/apiModal/utils/tabs-array.tsx @@ -1,7 +1,7 @@ export function createTabsArray( codes, includeWebhookCurl = false, - includeTweaks = false, + includeTweaks = false ) { const tabs = [ { diff --git a/src/frontend/src/modals/baseModal/index.tsx b/src/frontend/src/modals/baseModal/index.tsx index 3ee7788af..834c367b3 100644 --- a/src/frontend/src/modals/baseModal/index.tsx +++ b/src/frontend/src/modals/baseModal/index.tsx @@ -37,7 +37,7 @@ const Content: React.FC = ({ children, overflowHidden }) => {
{children} @@ -122,7 +122,7 @@ interface BaseModalProps { React.ReactElement, React.ReactElement, React.ReactElement?, - React.ReactElement?, + React.ReactElement? ]; open?: boolean; setOpen?: (open: boolean) => void; @@ -158,16 +158,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); @@ -189,7 +189,7 @@ function BaseModal({ const contentClasses = cn( minWidth, height, - "flex flex-col duration-300 overflow-hidden", + "flex flex-col duration-300 overflow-hidden" ); //UPDATE COLORS AND STYLE CLASSSES diff --git a/src/frontend/src/modals/dictAreaModal/index.tsx b/src/frontend/src/modals/dictAreaModal/index.tsx index afcab7857..77887f478 100644 --- a/src/frontend/src/modals/dictAreaModal/index.tsx +++ b/src/frontend/src/modals/dictAreaModal/index.tsx @@ -4,6 +4,7 @@ import "ace-builds/src-noconflict/mode-python"; import "ace-builds/src-noconflict/theme-github"; import "ace-builds/src-noconflict/theme-twilight"; // import "ace-builds/webpack-resolver"; +import { cloneDeep } from "lodash"; import { useEffect, useState } from "react"; import JsonView from "react18-json-view"; import "react18-json-view/src/dark.css"; @@ -12,7 +13,6 @@ import IconComponent from "../../components/genericIconComponent"; import { CODE_DICT_DIALOG_SUBTITLE } from "../../constants/constants"; import { useDarkStore } from "../../stores/darkStore"; import BaseModal from "../baseModal"; -import { cloneDeep } from "lodash"; export default function DictAreaModal({ children, 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 14263a9c6..83590f409 100644 --- a/src/frontend/src/modals/editNodeModal/hooks/use-column-defs.tsx +++ b/src/frontend/src/modals/editNodeModal/hooks/use-column-defs.tsx @@ -8,7 +8,7 @@ const useColumnDefs = ( handleOnNewValue: (newValue: any, name: string) => void, handleOnChangeDb: (value: boolean, key: string) => void, changeAdvanced: (n: string) => void, - open: boolean, + open: boolean ) => { const columnDefs: ColDef[] = useMemo( () => [ @@ -76,7 +76,7 @@ const useColumnDefs = ( cellClass: "no-border", }, ], - [open, myData], + [open, myData] ); return columnDefs; diff --git a/src/frontend/src/modals/editNodeModal/index.tsx b/src/frontend/src/modals/editNodeModal/index.tsx index b8e6a11a5..05a3a4354 100644 --- a/src/frontend/src/modals/editNodeModal/index.tsx +++ b/src/frontend/src/modals/editNodeModal/index.tsx @@ -1,6 +1,6 @@ import { ColDef, GridApi } from "ag-grid-community"; +import { cloneDeep } from "lodash"; 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"; @@ -9,7 +9,6 @@ import { NodeDataType } from "../../types/flow"; import BaseModal from "../baseModal"; import useColumnDefs from "./hooks/use-column-defs"; import useRowData from "./hooks/use-row-data"; -import { cloneDeep } from "lodash"; const EditNodeModal = forwardRef( ( @@ -26,7 +25,7 @@ const EditNodeModal = forwardRef( // setOpenWDoubleClick: (open: boolean) => void; data: NodeDataType; }, - ref, + ref ) => { const myData = useRef(cloneDeep(data)); @@ -54,7 +53,7 @@ const EditNodeModal = forwardRef( handleOnNewValue, handleOnChangeDb, changeAdvanced, - open, + open ); const [gridApi, setGridApi] = useState(null); @@ -118,7 +117,7 @@ const EditNodeModal = forwardRef( /> ); - }, + } ); export default EditNodeModal; diff --git a/src/frontend/src/modals/exportModal/index.tsx b/src/frontend/src/modals/exportModal/index.tsx index b7e7e0f9d..9ed28def8 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/flowLogsModal/index.tsx b/src/frontend/src/modals/flowLogsModal/index.tsx index 1ba42f9eb..840de14ca 100644 --- a/src/frontend/src/modals/flowLogsModal/index.tsx +++ b/src/frontend/src/modals/flowLogsModal/index.tsx @@ -37,7 +37,7 @@ export default function FlowLogsModal({ const { columns, rows } = data; setColumns(columns.map((col) => ({ ...col, editable: true }))); setRows(rows); - }, + } ); } @@ -47,7 +47,7 @@ export default function FlowLogsModal({ .some((template) => template["stream"] && template["stream"].value); console.log( haStream, - nodes.map((nodes) => (nodes.data as NodeDataType).node!.template), + nodes.map((nodes) => (nodes.data as NodeDataType).node!.template) ); if (haStream) { setNoticeData({ diff --git a/src/frontend/src/modals/foldersModal/hooks/submit-folder.tsx b/src/frontend/src/modals/foldersModal/hooks/submit-folder.tsx index 71a8ac944..c35d7c450 100644 --- a/src/frontend/src/modals/foldersModal/hooks/submit-folder.tsx +++ b/src/frontend/src/modals/foldersModal/hooks/submit-folder.tsx @@ -33,7 +33,7 @@ const useFolderSubmit = (setOpen, folderToEdit) => { getFoldersApi(true); setOpen(false); } - }, + } ); } else { addFolder(data).then( @@ -49,7 +49,7 @@ const useFolderSubmit = (setOpen, folderToEdit) => { setErrorData({ title: `Error creating folder.`, }); - }, + } ); } }; diff --git a/src/frontend/src/modals/genericModal/index.tsx b/src/frontend/src/modals/genericModal/index.tsx index 326be58db..250192dc9 100644 --- a/src/frontend/src/modals/genericModal/index.tsx +++ b/src/frontend/src/modals/genericModal/index.tsx @@ -83,7 +83,7 @@ export default function GenericModal({ } const filteredWordsHighlight = matches.filter( - (word) => !invalid_chars.includes(word), + (word) => !invalid_chars.includes(word) ); setWordsHighlight(filteredWordsHighlight); @@ -134,7 +134,7 @@ export default function GenericModal({ // to the first key of the custom_fields object if (field_name === "") { field_name = Array.isArray( - apiReturn.data?.frontend_node?.custom_fields?.[""], + apiReturn.data?.frontend_node?.custom_fields?.[""] ) ? apiReturn.data?.frontend_node?.custom_fields?.[""][0] ?? "" : apiReturn.data?.frontend_node?.custom_fields?.[""] ?? ""; @@ -209,7 +209,7 @@ export default function GenericModal({
{type === TypeModal.PROMPT && isEdit && !readonly ? ( diff --git a/src/frontend/src/modals/newFlowModal/index.tsx b/src/frontend/src/modals/newFlowModal/index.tsx index f9d1f98b2..7e64ed5dc 100644 --- a/src/frontend/src/modals/newFlowModal/index.tsx +++ b/src/frontend/src/modals/newFlowModal/index.tsx @@ -32,7 +32,7 @@ export default function NewFlowModal({ key={0} flow={ examples.find( - (e) => e.name == "Basic Prompting (Hello, World)", + (e) => e.name == "Basic Prompting (Hello, World)" )! } /> diff --git a/src/frontend/src/modals/shareModal/index.tsx b/src/frontend/src/modals/shareModal/index.tsx index ac6832082..0bc66092a 100644 --- a/src/frontend/src/modals/shareModal/index.tsx +++ b/src/frontend/src/modals/shareModal/index.tsx @@ -131,14 +131,14 @@ export default function ShareModal({ title: "Error sharing " + is_component ? "component" : "flow", list: [err["response"]["data"]["detail"]], }); - }, + } ); else updateFlowStore( flow!, getTagsIds(selectedTags, tags), sharePublic, - unavaliableNames.find((e) => e.name === name)!.id, + unavaliableNames.find((e) => e.name === name)!.id ).then(successShare, (err) => { setErrorData({ title: "Error sharing " + is_component ? "component" : "flow", @@ -205,7 +205,7 @@ export default function ShareModal({ setOpen={internalSetOpen} onSubmit={() => { const isNameAvailable = !unavaliableNames.some( - (element) => element.name === name, + (element) => element.name === name ); if (isNameAvailable) { diff --git a/src/frontend/src/modals/shareModal/utils/get-tags-ids.tsx b/src/frontend/src/modals/shareModal/utils/get-tags-ids.tsx index 364d310a5..1eb1c650e 100644 --- a/src/frontend/src/modals/shareModal/utils/get-tags-ids.tsx +++ b/src/frontend/src/modals/shareModal/utils/get-tags-ids.tsx @@ -1,6 +1,6 @@ export default function getTagsIds( tags: string[], - tagListId: { name: string; id: string }[], + tagListId: { name: string; id: string }[] ) { return tags .map((tag) => tagListId.find((tagObj) => tagObj.name === tag))! diff --git a/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx b/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx index 43e6a320c..797fb0368 100644 --- a/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx +++ b/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx @@ -62,19 +62,19 @@ export default function Page({ const preventDefault = true; const uploadFlow = useFlowsManagerStore((state) => state.uploadFlow); const autoSaveCurrentFlow = useFlowsManagerStore( - (state) => state.autoSaveCurrentFlow, + (state) => state.autoSaveCurrentFlow ); const types = useTypesStore((state) => state.types); const templates = useTypesStore((state) => state.templates); const setFilterEdge = useFlowStore((state) => state.setFilterEdge); const reactFlowWrapper = useRef(null); const [showCanvas, setSHowCanvas] = useState( - Object.keys(templates).length > 0 && Object.keys(types).length > 0, + Object.keys(templates).length > 0 && Object.keys(types).length > 0 ); const reactFlowInstance = useFlowStore((state) => state.reactFlowInstance); const setReactFlowInstance = useFlowStore( - (state) => state.setReactFlowInstance, + (state) => state.setReactFlowInstance ); const nodes = useFlowStore((state) => state.nodes); const edges = useFlowStore((state) => state.edges); @@ -91,10 +91,10 @@ export default function Page({ const paste = useFlowStore((state) => state.paste); const resetFlow = useFlowStore((state) => state.resetFlow); const lastCopiedSelection = useFlowStore( - (state) => state.lastCopiedSelection, + (state) => state.lastCopiedSelection ); const setLastCopiedSelection = useFlowStore( - (state) => state.setLastCopiedSelection, + (state) => state.setLastCopiedSelection ); const onConnect = useFlowStore((state) => state.onConnect); const currentFlowId = useFlowsManagerStore((state) => state.currentFlowId); @@ -117,7 +117,7 @@ export default function Page({ clonedSelection!, clonedNodes, clonedEdges, - getRandomName(), + getRandomName() ); const newGroupNode = generateNodeFromFlow(newFlow, getNodeId); const newEdges = reconnectEdges(newGroupNode, removedEdges); @@ -125,8 +125,8 @@ export default function Page({ ...clonedNodes.filter( (oldNodes) => !clonedSelection?.nodes.some( - (selectionNode) => selectionNode.id === oldNodes.id, - ), + (selectionNode) => selectionNode.id === oldNodes.id + ) ), newGroupNode, ]); @@ -136,8 +136,8 @@ export default function Page({ !clonedSelection!.nodes.some( (selectionNode) => selectionNode.id === oldEdge.target || - selectionNode.id === oldEdge.source, - ), + selectionNode.id === oldEdge.source + ) ), ...newEdges, ]); @@ -213,7 +213,7 @@ export default function Page({ { x: position.current.x, y: position.current.y, - }, + } ); } } @@ -297,7 +297,7 @@ export default function Page({ useEffect(() => { setSHowCanvas( - Object.keys(templates).length > 0 && Object.keys(types).length > 0, + Object.keys(templates).length > 0 && Object.keys(types).length > 0 ); }, [templates, types]); @@ -306,7 +306,7 @@ export default function Page({ takeSnapshot(); onConnect(params); }, - [takeSnapshot, onConnect], + [takeSnapshot, onConnect] ); const onNodeDragStart: NodeDragHandler = useCallback(() => { @@ -347,7 +347,7 @@ export default function Page({ // Extract the data from the drag event and parse it as a JSON object const data: { type: string; node?: APIClassType } = JSON.parse( - event.dataTransfer.getData("nodedata"), + event.dataTransfer.getData("nodedata") ); const newId = getNodeId(data.type); @@ -363,7 +363,7 @@ export default function Page({ }; paste( { nodes: [newNode], edges: [] }, - { x: event.clientX, y: event.clientY }, + { x: event.clientX, y: event.clientY } ); } else if (event.dataTransfer.types.some((types) => types === "Files")) { takeSnapshot(); @@ -392,7 +392,7 @@ export default function Page({ } }, // Specify dependencies for useCallback - [getNodeId, setNodes, takeSnapshot, paste], + [getNodeId, setNodes, takeSnapshot, paste] ); const onEdgeUpdateStart = useCallback(() => { @@ -408,7 +408,7 @@ export default function Page({ setEdges((els) => updateEdge(oldEdge, newConnection, els)); } }, - [setEdges], + [setEdges] ); const onEdgeUpdateEnd = useCallback((_, edge: Edge): void => { @@ -441,7 +441,7 @@ export default function Page({ (flow: OnSelectionChangeParams): void => { setLastSelection(flow); }, - [], + [] ); const onPaneClick = useCallback((flow) => { diff --git a/src/frontend/src/pages/FlowPage/components/PageComponent/utils/get-random-name.tsx b/src/frontend/src/pages/FlowPage/components/PageComponent/utils/get-random-name.tsx index d3bcf4d55..a58b83ec3 100644 --- a/src/frontend/src/pages/FlowPage/components/PageComponent/utils/get-random-name.tsx +++ b/src/frontend/src/pages/FlowPage/components/PageComponent/utils/get-random-name.tsx @@ -5,7 +5,7 @@ import { toTitleCase } from "../../../../../utils/utils"; export default function getRandomName( retry: number = 0, noSpace: boolean = false, - maxRetries: number = 3, + maxRetries: number = 3 ): string { const left: string[] = ADJECTIVES; const right: string[] = NOUNS; diff --git a/src/frontend/src/pages/FlowPage/components/SelectionMenuComponent/index.tsx b/src/frontend/src/pages/FlowPage/components/SelectionMenuComponent/index.tsx index 7b8193caa..8734d54f8 100644 --- a/src/frontend/src/pages/FlowPage/components/SelectionMenuComponent/index.tsx +++ b/src/frontend/src/pages/FlowPage/components/SelectionMenuComponent/index.tsx @@ -13,7 +13,7 @@ export default function SelectionMenu({ const [disable, setDisable] = useState( lastSelection && edges.length > 0 ? validateSelection(lastSelection!, edges).length > 0 - : false, + : false ); const [isOpen, setIsOpen] = useState(false); const [isTransitioning, setIsTransitioning] = useState(false); diff --git a/src/frontend/src/pages/FlowPage/components/extraSidebarComponent/index.tsx b/src/frontend/src/pages/FlowPage/components/extraSidebarComponent/index.tsx index 696f9898a..d193d2e6b 100644 --- a/src/frontend/src/pages/FlowPage/components/extraSidebarComponent/index.tsx +++ b/src/frontend/src/pages/FlowPage/components/extraSidebarComponent/index.tsx @@ -41,7 +41,7 @@ export default function ExtraSidebar(): JSX.Element { const [search, setSearch] = useState(""); function onDragStart( event: React.DragEvent, - data: { type: string; node?: APIClassType }, + data: { type: string; node?: APIClassType } ): void { //start drag event var crt = event.currentTarget.cloneNode(true); @@ -67,7 +67,7 @@ export default function ExtraSidebar(): JSX.Element { let keys = Object.keys(data[d]).filter( (nd) => nd.toLowerCase().includes(e.toLowerCase()) || - data[d][nd].display_name?.toLowerCase().includes(e.toLowerCase()), + data[d][nd].display_name?.toLowerCase().includes(e.toLowerCase()) ); keys.forEach((element) => { ret[d][element] = data[d][element]; @@ -134,7 +134,7 @@ export default function ExtraSidebar(): JSX.Element { if (filtered.some((x) => x !== "")) { let keys = Object.keys(dataClone[d]).filter((nd) => - filtered.includes(nd), + filtered.includes(nd) ); Object.keys(dataClone[d]).forEach((element) => { if (!keys.includes(element)) { @@ -171,7 +171,7 @@ export default function ExtraSidebar(): JSX.Element { if (filtered.some((x) => x !== "")) { let keys = Object.keys(dataClone[d]).filter((nd) => - filtered.includes(nd), + filtered.includes(nd) ); Object.keys(dataClone[d]).forEach((element) => { if (!keys.includes(element)) { @@ -200,7 +200,7 @@ export default function ExtraSidebar(): JSX.Element { "extra-side-bar-buttons gap-[4px] text-sm font-semibold", !hasApiKey || !validApiKey || !hasStore ? "button-disable cursor-default text-muted-foreground" - : "", + : "" )} > Share ), - [hasApiKey, validApiKey, currentFlow, hasStore], + [hasApiKey, validApiKey, currentFlow, hasStore] ); const ExportMemo = useMemo( @@ -227,7 +227,7 @@ export default function ExtraSidebar(): JSX.Element { ), - [], + [] ); const getIcon = useMemo(() => { @@ -311,8 +311,8 @@ export default function ExtraSidebar(): JSX.Element { .sort((a, b) => sensitiveSort( dataFilter[SBSectionName][a].display_name, - dataFilter[SBSectionName][b].display_name, - ), + dataFilter[SBSectionName][b].display_name + ) ) .map((SBItemName: string, index) => ( ) : (
- ), + ) )}{" "} sensitiveSort( dataFilter[SBSectionName][a].display_name, - dataFilter[SBSectionName][b].display_name, - ), + dataFilter[SBSectionName][b].display_name + ) ) .map((SBItemName: string, index) => ( ) : (
- ), + ) )}
diff --git a/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx b/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx index 8d217b2b2..bcf9e7018 100644 --- a/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx +++ b/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx @@ -50,7 +50,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 preventDefault = true; const isMac = navigator.platform.toUpperCase().includes("MAC"); @@ -67,7 +67,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 hasStore = useStoreStore((state) => state.hasStore); @@ -220,7 +220,7 @@ export default function NodeToolbarComponent({ const updateNodeInternals = useUpdateNodeInternals(); const setLastCopiedSelection = useFlowStore( - (state) => state.setLastCopiedSelection, + (state) => state.setLastCopiedSelection ); const setSuccessData = useAlertStore((state) => state.setSuccessData); @@ -294,7 +294,7 @@ export default function NodeToolbarComponent({ nodes, edges, setNodes, - setEdges, + setEdges ); break; case "override": @@ -321,14 +321,14 @@ 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; } }; const isSaved = flows.some((flow) => - Object.values(flow).includes(data.node?.display_name!), + Object.values(flow).includes(data.node?.display_name!) ); function displayShortcut({ @@ -346,7 +346,7 @@ export default function NodeToolbarComponent({ } }); const filteredShortcut = fixedShortcut.filter( - (key) => !key.toLowerCase().includes("shift"), + (key) => !key.toLowerCase().includes("shift") ); let shortcutWPlus: string[] = []; if (!hasShift) shortcutWPlus = filteredShortcut.join("+").split(" "); @@ -370,7 +370,7 @@ export default function NodeToolbarComponent({ 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(); @@ -426,8 +426,8 @@ export default function NodeToolbarComponent({ name.split(" ")[0].toLowerCase() === "code", - )!, + ({ name }) => name.split(" ")[0].toLowerCase() === "code" + )! )} side="top" > @@ -446,8 +446,8 @@ export default function NodeToolbarComponent({ name.split(" ")[0].toLowerCase() === "advanced", - )!, + ({ name }) => name.split(" ")[0].toLowerCase() === "advanced" + )! )} side="top" > @@ -486,14 +486,14 @@ export default function NodeToolbarComponent({ name.split(" ")[0].toLowerCase() === "freeze", - )!, + ({ name }) => name.split(" ")[0].toLowerCase() === "freeze" + )! )} side="top" > @@ -542,7 +542,7 @@ export default function NodeToolbarComponent({
!key.toLowerCase().includes("shift"), + (key) => !key.toLowerCase().includes("shift") ); let shortcutWPlus: string[] = []; if (!hasShift) shortcutWPlus = filteredShortcut.join("+").split(" "); diff --git a/src/frontend/src/pages/FlowPage/index.tsx b/src/frontend/src/pages/FlowPage/index.tsx index 49fdb1eca..e5a67bd35 100644 --- a/src/frontend/src/pages/FlowPage/index.tsx +++ b/src/frontend/src/pages/FlowPage/index.tsx @@ -10,7 +10,7 @@ import ExtraSidebar from "./components/extraSidebarComponent"; export default function FlowPage({ view }: { view?: boolean }): JSX.Element { const setCurrentFlowId = useFlowsManagerStore( - (state) => state.setCurrentFlowId, + (state) => state.setCurrentFlowId ); const version = useDarkStore((state) => state.version); const setOnFlowPage = useFlowStore((state) => state.setOnFlowPage); diff --git a/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-delete-multiple.tsx b/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-delete-multiple.tsx index 395088193..af78db50d 100644 --- a/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-delete-multiple.tsx +++ b/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-delete-multiple.tsx @@ -9,7 +9,7 @@ const useDeleteMultipleFlows = ( myCollectionId, getFolderById, setSuccessData, - setErrorData, + setErrorData ) => { const handleDeleteMultiple = useCallback(() => { removeFlow(selectedFlowsComponentsCards) diff --git a/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-filtered-flows.tsx b/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-filtered-flows.tsx index 96b1757ff..b391d9c8e 100644 --- a/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-filtered-flows.tsx +++ b/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-filtered-flows.tsx @@ -4,7 +4,7 @@ import { useEffect } from "react"; const useFilteredFlows = ( flowsFromFolder, searchFlowsComponents, - setAllFlows, + setAllFlows ) => { useEffect(() => { const newFlows = cloneDeep(flowsFromFolder || []); @@ -13,7 +13,7 @@ const useFilteredFlows = ( f.name.toLowerCase().includes(searchFlowsComponents.toLowerCase()) || f.description .toLowerCase() - .includes(searchFlowsComponents.toLowerCase()), + .includes(searchFlowsComponents.toLowerCase()) ); if (searchFlowsComponents === "") { diff --git a/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-handle-duplicate.tsx b/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-handle-duplicate.tsx index fc49fc0d1..97e966b91 100644 --- a/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-handle-duplicate.tsx +++ b/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-handle-duplicate.tsx @@ -12,16 +12,16 @@ const useDuplicateFlows = ( setSuccessData, setSelectedFlowsComponentsCards, handleSelectAll, - cardTypes, + cardTypes ) => { const handleDuplicate = useCallback(() => { Promise.all( selectedFlowsComponentsCards.map((selectedFlow) => addFlow( true, - allFlows.find((flow) => flow.id === selectedFlow), - ), - ), + allFlows.find((flow) => flow.id === selectedFlow) + ) + ) ).then(() => { resetFilter(); getFoldersApi(true); diff --git a/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-handle-export.tsx b/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-handle-export.tsx index bd742045b..446525f13 100644 --- a/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-handle-export.tsx +++ b/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-handle-export.tsx @@ -9,7 +9,7 @@ const useExportFlows = ( setSuccessData, setSelectedFlowsComponentsCards, handleSelectAll, - cardTypes, + cardTypes ) => { const handleExport = useCallback(() => { selectedFlowsComponentsCards.forEach((selectedFlowId) => { @@ -25,7 +25,7 @@ const useExportFlows = ( is_component: false, }), selectedFlow.name, - selectedFlow.description, + selectedFlow.description ); } }); diff --git a/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-handle-select-all.tsx b/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-handle-select-all.tsx index a81515e0a..5b20a4ddc 100644 --- a/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-handle-select-all.tsx +++ b/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-handle-select-all.tsx @@ -16,7 +16,7 @@ const useSelectAll = (flowsFromFolder, getValues, setValue) => { setValue(key, false); }); }, - [flowsFromFolder, getValues, setValue], + [flowsFromFolder, getValues, setValue] ); return { handleSelectAll }; diff --git a/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-select-options-change.tsx b/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-select-options-change.tsx index 56dc204c7..b19ec4f4f 100644 --- a/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-select-options-change.tsx +++ b/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-select-options-change.tsx @@ -5,7 +5,7 @@ const useSelectOptionsChange = ( setErrorData, setOpenDelete, handleDuplicate, - handleExport, + handleExport ) => { const handleSelectOptionsChange = useCallback( (action) => { @@ -31,7 +31,7 @@ const useSelectOptionsChange = ( setOpenDelete, handleDuplicate, handleExport, - ], + ] ); return { handleSelectOptionsChange }; diff --git a/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-selected-flows.tsx b/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-selected-flows.tsx index b6f00934e..aa70b025f 100644 --- a/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-selected-flows.tsx +++ b/src/frontend/src/pages/MainPage/components/componentsComponent/hooks/use-selected-flows.tsx @@ -2,7 +2,7 @@ import { useEffect } from "react"; const useSelectedFlows = ( entireFormValues, - setSelectedFlowsComponentsCards, + setSelectedFlowsComponentsCards ) => { useEffect(() => { if (!entireFormValues || Object.keys(entireFormValues).length === 0) return; diff --git a/src/frontend/src/pages/MainPage/components/componentsComponent/index.tsx b/src/frontend/src/pages/MainPage/components/componentsComponent/index.tsx index af13e2bb4..81d2aa18d 100644 --- a/src/frontend/src/pages/MainPage/components/componentsComponent/index.tsx +++ b/src/frontend/src/pages/MainPage/components/componentsComponent/index.tsx @@ -40,22 +40,22 @@ export default function ComponentsComponent({ const allFlows = useFlowsManagerStore((state) => state.allFlows); const flowsFromFolder = useFolderStore( - (state) => state.selectedFolder?.flows, + (state) => state.selectedFolder?.flows ); const setSuccessData = useAlertStore((state) => state.setSuccessData); const setErrorData = useAlertStore((state) => state.setErrorData); const [openDelete, setOpenDelete] = useState(false); const searchFlowsComponents = useFlowsManagerStore( - (state) => state.searchFlowsComponents, + (state) => state.searchFlowsComponents ); const setSelectedFlowsComponentsCards = useFlowsManagerStore( - (state) => state.setSelectedFlowsComponentsCards, + (state) => state.setSelectedFlowsComponentsCards ); const selectedFlowsComponentsCards = useFlowsManagerStore( - (state) => state.selectedFlowsComponentsCards, + (state) => state.selectedFlowsComponentsCards ); const [handleFileDrop] = useFileDrop(uploadFlow, type)!; @@ -109,7 +109,7 @@ export default function ComponentsComponent({ const { handleSelectAll } = useSelectAll( flowsFromFolder, getValues, - setValue, + setValue ); const { handleDuplicate } = useDuplicateFlows( @@ -124,7 +124,7 @@ export default function ComponentsComponent({ setSuccessData, setSelectedFlowsComponentsCards, handleSelectAll, - cardTypes, + cardTypes ); const version = useDarkStore((state) => state.version); @@ -138,7 +138,7 @@ export default function ComponentsComponent({ setSuccessData, setSelectedFlowsComponentsCards, handleSelectAll, - cardTypes, + cardTypes ); const { handleSelectOptionsChange } = useSelectOptionsChange( @@ -146,7 +146,7 @@ export default function ComponentsComponent({ setErrorData, setOpenDelete, handleDuplicate, - handleExport, + handleExport ); const { handleDeleteMultiple } = useDeleteMultipleFlows( @@ -158,21 +158,21 @@ export default function ComponentsComponent({ myCollectionId, getFolderById, setSuccessData, - setErrorData, + setErrorData ); useSelectedFlows(entireFormValues, setSelectedFlowsComponentsCards); const descriptionModal = useDescriptionModal( selectedFlowsComponentsCards, - type, + type ); const getTotalRowsCount = () => { if (type === "all") return allFlows?.length; return allFlows?.filter( - (f) => (f.is_component ?? false) === (type === "component"), + (f) => (f.is_component ?? false) === (type === "component") )?.length; }; diff --git a/src/frontend/src/pages/MainPage/components/headerComponent/index.tsx b/src/frontend/src/pages/MainPage/components/headerComponent/index.tsx index 151cdd902..26999fbd5 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-status-red", + disableFunctions ? "" : "hover:text-status-red" )} /> diff --git a/src/frontend/src/pages/MainPage/components/myCollectionComponent/components/headerTabsSearchComponent/index.tsx b/src/frontend/src/pages/MainPage/components/myCollectionComponent/components/headerTabsSearchComponent/index.tsx index 2c1b9cd49..17916f05b 100644 --- a/src/frontend/src/pages/MainPage/components/myCollectionComponent/components/headerTabsSearchComponent/index.tsx +++ b/src/frontend/src/pages/MainPage/components/myCollectionComponent/components/headerTabsSearchComponent/index.tsx @@ -20,7 +20,7 @@ const HeaderTabsSearchComponent = ({}: HeaderTabsSearchComponentProps) => { const [inputValue, setInputValue] = useState(""); const setSearchFlowsComponents = useFlowsManagerStore( - (state) => state.setSearchFlowsComponents, + (state) => state.setSearchFlowsComponents ); const handleDownloadFolder = () => { diff --git a/src/frontend/src/pages/MainPage/components/myCollectionComponent/components/inputSearchComponent/index.tsx b/src/frontend/src/pages/MainPage/components/myCollectionComponent/components/inputSearchComponent/index.tsx index 59809425e..8619cb2d5 100644 --- a/src/frontend/src/pages/MainPage/components/myCollectionComponent/components/inputSearchComponent/index.tsx +++ b/src/frontend/src/pages/MainPage/components/myCollectionComponent/components/inputSearchComponent/index.tsx @@ -23,7 +23,7 @@ const InputSearchComponent = ({ const pagePath = window.location.pathname; const allFlows = useFlowsManagerStore((state) => state.allFlows); const searchFlowsComponents = useFlowsManagerStore( - (state) => state.searchFlowsComponents, + (state) => state.searchFlowsComponents ); const disableInputSearch = diff --git a/src/frontend/src/pages/MainPage/pages/mainPage/index.tsx b/src/frontend/src/pages/MainPage/pages/mainPage/index.tsx index ce2b653a2..0daa61257 100644 --- a/src/frontend/src/pages/MainPage/pages/mainPage/index.tsx +++ b/src/frontend/src/pages/MainPage/pages/mainPage/index.tsx @@ -16,7 +16,7 @@ import useDropdownOptions from "../../hooks/use-dropdown-options"; export default function HomePage(): JSX.Element { const uploadFlow = useFlowsManagerStore((state) => state.uploadFlow); const setCurrentFlowId = useFlowsManagerStore( - (state) => state.setCurrentFlowId, + (state) => state.setCurrentFlowId ); const location = useLocation(); diff --git a/src/frontend/src/pages/MainPage/services/index.ts b/src/frontend/src/pages/MainPage/services/index.ts index 3e1286d5e..fbfc34389 100644 --- a/src/frontend/src/pages/MainPage/services/index.ts +++ b/src/frontend/src/pages/MainPage/services/index.ts @@ -30,12 +30,12 @@ export async function addFolder(data: AddFolderType): Promise { export async function updateFolder( body: FolderType, - folderId: string, + folderId: string ): Promise { try { const response = await api.patch( `${BASE_URL_API}folders/${folderId}`, - body, + body ); return response?.data; } catch (error) { @@ -68,7 +68,7 @@ export async function downloadFlowsFromFolders(folderId: string): Promise<{ }> { try { const response = await api.get( - `${BASE_URL_API}folders/download/${folderId}`, + `${BASE_URL_API}folders/download/${folderId}` ); if (response?.status !== 200) { throw new Error(`HTTP error! status: ${response?.status}`); @@ -82,7 +82,7 @@ export async function downloadFlowsFromFolders(folderId: string): Promise<{ } export async function uploadFlowsFromFolders( - flows: FormData, + flows: FormData ): Promise { try { const response = await api.post(`${BASE_URL_API}folders/upload/`, flows); @@ -99,11 +99,11 @@ export async function uploadFlowsFromFolders( export async function moveFlowToFolder( flowId: string, - folderId: string, + folderId: string ): Promise { try { const response = await api.patch( - `${BASE_URL_API}folders/move_to_folder/${flowId}/${folderId}`, + `${BASE_URL_API}folders/move_to_folder/${flowId}/${folderId}` ); return response?.data; } catch (error) { diff --git a/src/frontend/src/pages/MainPage/utils/handle-download-folder.ts b/src/frontend/src/pages/MainPage/utils/handle-download-folder.ts index 6817622d0..d6a8e957c 100644 --- a/src/frontend/src/pages/MainPage/utils/handle-download-folder.ts +++ b/src/frontend/src/pages/MainPage/utils/handle-download-folder.ts @@ -11,7 +11,7 @@ export function handleDownloadFolderFn(folderId: string) { data.folder_description = folder?.description || ""; const jsonString = `data:text/json;chatset=utf-8,${encodeURIComponent( - JSON.stringify(data), + JSON.stringify(data) )}`; const link = document.createElement("a"); diff --git a/src/frontend/src/pages/Playground/index.tsx b/src/frontend/src/pages/Playground/index.tsx index 4ea3cc506..d26147df6 100644 --- a/src/frontend/src/pages/Playground/index.tsx +++ b/src/frontend/src/pages/Playground/index.tsx @@ -11,7 +11,7 @@ export default function PlaygroundPage() { const currentFlow = useFlowsManagerStore((state) => state.currentFlow); const getFlowById = useFlowsManagerStore((state) => state.getFlowById); const setCurrentFlowId = useFlowsManagerStore( - (state) => state.setCurrentFlowId, + (state) => state.setCurrentFlowId ); const currentFlowId = useFlowsManagerStore((state) => state.currentFlowId); const setCurrentFlow = useFlowsManagerStore((state) => state.setCurrentFlow); diff --git a/src/frontend/src/pages/ProfileSettingsPage/index.tsx b/src/frontend/src/pages/ProfileSettingsPage/index.tsx index 5cedc5841..c1635dc9e 100644 --- a/src/frontend/src/pages/ProfileSettingsPage/index.tsx +++ b/src/frontend/src/pages/ProfileSettingsPage/index.tsx @@ -24,11 +24,11 @@ import { gradients } from "../../utils/styleUtils"; import GradientChooserComponent from "../SettingsPage/pages/GeneralPage/components/ProfilePictureForm/components/profilePictureChooserComponent"; export default function ProfileSettingsPage(): JSX.Element { const setCurrentFlowId = useFlowsManagerStore( - (state) => state.setCurrentFlowId, + (state) => state.setCurrentFlowId ); const [inputState, setInputState] = useState( - CONTROL_PATCH_USER_STATE, + CONTROL_PATCH_USER_STATE ); // set null id diff --git a/src/frontend/src/pages/SettingsPage/index.tsx b/src/frontend/src/pages/SettingsPage/index.tsx index 2e8f49cfc..e6eb41b2f 100644 --- a/src/frontend/src/pages/SettingsPage/index.tsx +++ b/src/frontend/src/pages/SettingsPage/index.tsx @@ -8,7 +8,7 @@ import useFlowsManagerStore from "../../stores/flowsManagerStore"; export default function SettingsPage(): JSX.Element { const pathname = location.pathname; const setCurrentFlowId = useFlowsManagerStore( - (state) => state.setCurrentFlowId, + (state) => state.setCurrentFlowId ); useEffect(() => { setCurrentFlowId(""); diff --git a/src/frontend/src/pages/SettingsPage/pages/ApiKeysPage/hooks/use-handle-delete-key.tsx b/src/frontend/src/pages/SettingsPage/pages/ApiKeysPage/hooks/use-handle-delete-key.tsx index 74d5dae99..01b4b7415 100644 --- a/src/frontend/src/pages/SettingsPage/pages/ApiKeysPage/hooks/use-handle-delete-key.tsx +++ b/src/frontend/src/pages/SettingsPage/pages/ApiKeysPage/hooks/use-handle-delete-key.tsx @@ -10,7 +10,7 @@ const useDeleteApiKeys = ( selectedRows, resetFilter, setSuccessData, - setErrorData, + setErrorData ) => { const handleDeleteKey = () => { Promise.all(selectedRows.map((selectedRow) => deleteApiKey(selectedRow))) diff --git a/src/frontend/src/pages/SettingsPage/pages/ApiKeysPage/index.tsx b/src/frontend/src/pages/SettingsPage/pages/ApiKeysPage/index.tsx index af5280f72..e5b224a58 100644 --- a/src/frontend/src/pages/SettingsPage/pages/ApiKeysPage/index.tsx +++ b/src/frontend/src/pages/SettingsPage/pages/ApiKeysPage/index.tsx @@ -25,7 +25,7 @@ export default function ApiKeysPage() { userData, setLoadingKeys, keysList, - setUserId, + setUserId ); function resetFilter() { @@ -36,7 +36,7 @@ export default function ApiKeysPage() { selectedRows, resetFilter, setSuccessData, - setErrorData, + setErrorData ); const columnDefs = getColumnDefs(); diff --git a/src/frontend/src/pages/SettingsPage/pages/GeneralPage/components/PasswordForm/index.tsx b/src/frontend/src/pages/SettingsPage/pages/GeneralPage/components/PasswordForm/index.tsx index 28edb2f09..d99752e7b 100644 --- a/src/frontend/src/pages/SettingsPage/pages/GeneralPage/components/PasswordForm/index.tsx +++ b/src/frontend/src/pages/SettingsPage/pages/GeneralPage/components/PasswordForm/index.tsx @@ -17,7 +17,7 @@ type PasswordFormComponentProps = { handlePatchPassword: ( password: string, cnfPassword: string, - handleInput: any, + handleInput: any ) => void; }; const PasswordFormComponent = ({ diff --git a/src/frontend/src/pages/SettingsPage/pages/GeneralPage/components/ProfilePictureForm/components/profilePictureChooserComponent/hooks/use-preload-images.tsx b/src/frontend/src/pages/SettingsPage/pages/GeneralPage/components/ProfilePictureForm/components/profilePictureChooserComponent/hooks/use-preload-images.tsx index 988af6ea9..1948c9482 100644 --- a/src/frontend/src/pages/SettingsPage/pages/GeneralPage/components/ProfilePictureForm/components/profilePictureChooserComponent/hooks/use-preload-images.tsx +++ b/src/frontend/src/pages/SettingsPage/pages/GeneralPage/components/ProfilePictureForm/components/profilePictureChooserComponent/hooks/use-preload-images.tsx @@ -14,8 +14,8 @@ const usePreloadImages = (profilePictures, setImagesLoaded) => { img.src = src; img.onload = resolve; img.onerror = resolve; - }), - ), + }) + ) ); }; @@ -26,9 +26,9 @@ const usePreloadImages = (profilePictures, setImagesLoaded) => { Object.keys(profilePictures).flatMap((folder) => profilePictures[folder].map((path) => imageArray.push( - `${firstUrl}${BASE_URL_API}files/profile_pictures/${folder}/${path}`, - ), - ), + `${firstUrl}${BASE_URL_API}files/profile_pictures/${folder}/${path}` + ) + ) ); preloadImages(imageArray).then(() => { diff --git a/src/frontend/src/pages/SettingsPage/pages/GeneralPage/components/ProfilePictureForm/components/profilePictureChooserComponent/index.tsx b/src/frontend/src/pages/SettingsPage/pages/GeneralPage/components/ProfilePictureForm/components/profilePictureChooserComponent/index.tsx index 408bd8ee1..edfe58a16 100644 --- a/src/frontend/src/pages/SettingsPage/pages/GeneralPage/components/ProfilePictureForm/components/profilePictureChooserComponent/index.tsx +++ b/src/frontend/src/pages/SettingsPage/pages/GeneralPage/components/ProfilePictureForm/components/profilePictureChooserComponent/index.tsx @@ -58,7 +58,7 @@ export default function ProfilePictureChooserComponent({ key={idx} src={`${BACKEND_URL.slice( 0, - BACKEND_URL.length - 1, + BACKEND_URL.length - 1 )}${BASE_URL_API}files/profile_pictures/${ folder + "/" + path }`} diff --git a/src/frontend/src/pages/SettingsPage/pages/GeneralPage/components/StoreApiKeyForm/index.tsx b/src/frontend/src/pages/SettingsPage/pages/GeneralPage/components/StoreApiKeyForm/index.tsx index 5bc5ea38b..1fbf34024 100644 --- a/src/frontend/src/pages/SettingsPage/pages/GeneralPage/components/StoreApiKeyForm/index.tsx +++ b/src/frontend/src/pages/SettingsPage/pages/GeneralPage/components/StoreApiKeyForm/index.tsx @@ -47,8 +47,8 @@ const StoreApiKeyFormComponent = ({ {(hasApiKey && !validApiKey ? INVALID_API_KEY : !hasApiKey - ? NO_API_KEY - : "") + INSERT_API_KEY} + ? NO_API_KEY + : "") + INSERT_API_KEY} diff --git a/src/frontend/src/pages/SettingsPage/pages/GeneralPage/index.tsx b/src/frontend/src/pages/SettingsPage/pages/GeneralPage/index.tsx index 239103777..917d61714 100644 --- a/src/frontend/src/pages/SettingsPage/pages/GeneralPage/index.tsx +++ b/src/frontend/src/pages/SettingsPage/pages/GeneralPage/index.tsx @@ -21,13 +21,13 @@ import StoreApiKeyFormComponent from "./components/StoreApiKeyForm"; export default function GeneralPage() { const setCurrentFlowId = useFlowsManagerStore( - (state) => state.setCurrentFlowId, + (state) => state.setCurrentFlowId ); const { scrollId } = useParams(); const [inputState, setInputState] = useState( - CONTROL_PATCH_USER_STATE, + CONTROL_PATCH_USER_STATE ); const { autoLogin } = useContext(AuthContext); @@ -48,7 +48,7 @@ export default function GeneralPage() { const { handlePatchPassword } = usePatchPassword( userData, setSuccessData, - setErrorData, + setErrorData ); const { handleGetProfilePictures } = useGetProfilePictures(setErrorData); @@ -57,7 +57,7 @@ export default function GeneralPage() { setSuccessData, setErrorData, userData, - setUserData, + setUserData ); useScrollToElement(scrollId, setCurrentFlowId); @@ -67,7 +67,7 @@ export default function GeneralPage() { setErrorData, setHasApiKey, setValidApiKey, - setLoadingApiKey, + setLoadingApiKey ); function handleInput({ diff --git a/src/frontend/src/pages/SettingsPage/pages/GlobalVariablesPage/index.tsx b/src/frontend/src/pages/SettingsPage/pages/GlobalVariablesPage/index.tsx index 6f0dac836..ba9c465d7 100644 --- a/src/frontend/src/pages/SettingsPage/pages/GlobalVariablesPage/index.tsx +++ b/src/frontend/src/pages/SettingsPage/pages/GlobalVariablesPage/index.tsx @@ -14,13 +14,13 @@ import { useGlobalVariablesStore } from "../../../../stores/globalVariablesStore export default function GlobalVariablesPage() { const globalVariablesEntries = useGlobalVariablesStore( - (state) => state.globalVariablesEntries, + (state) => state.globalVariablesEntries ); const removeGlobalVariable = useGlobalVariablesStore( - (state) => state.removeGlobalVariable, + (state) => state.removeGlobalVariable ); const globalVariables = useGlobalVariablesStore( - (state) => state.globalVariables, + (state) => state.globalVariables ); const setErrorData = useAlertStore((state) => state.setErrorData); const getVariableId = useGlobalVariablesStore((state) => state.getVariableId); diff --git a/src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/EditShortcutButton/index.tsx b/src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/EditShortcutButton/index.tsx index e2e49e815..894969f52 100644 --- a/src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/EditShortcutButton/index.tsx +++ b/src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/EditShortcutButton/index.tsx @@ -31,7 +31,7 @@ export default function EditShortcutButton({ ? defaultShortcuts.find( (s) => s.name.split(" ")[0].toLowerCase().toLowerCase() === - shortcut[0]?.split(" ")[0].toLowerCase(), + shortcut[0]?.split(" ")[0].toLowerCase() )?.shortcut : ""; const [key, setKey] = useState(null); @@ -50,7 +50,7 @@ export default function EditShortcutButton({ } const setUniqueShortcut = useShortcutsStore( - (state) => state.updateUniqueShortcut, + (state) => state.updateUniqueShortcut ); function editCombination(): void { @@ -74,7 +74,7 @@ export default function EditShortcutButton({ setShortcuts(newCombination); localStorage.setItem( "langflow-shortcuts", - JSON.stringify(newCombination), + JSON.stringify(newCombination) ); setKey(null); setOpen(false); @@ -116,7 +116,7 @@ export default function EditShortcutButton({ const keysArr = keys.split(" "); let hasNewKey = false; return keysArr.some( - (k) => k.toLowerCase().trim() === keyToCompare.toLowerCase().trim(), + (k) => k.toLowerCase().trim() === keyToCompare.toLowerCase().trim() ); } @@ -137,7 +137,7 @@ export default function EditShortcutButton({ if (checkForKeys(key, fixedKey)) return; } setKey((oldKey) => - getFixedCombination({ oldKey: oldKey!, key: fixedKey }), + getFixedCombination({ oldKey: oldKey!, key: fixedKey }) ); } diff --git a/src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/index.tsx b/src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/index.tsx index 5e1228c7d..90e442897 100644 --- a/src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/index.tsx +++ b/src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/index.tsx @@ -40,7 +40,7 @@ export default function ShortcutsPage() { const combinationToEdit = shortcuts.filter((s) => s.name === selectedRows[0]); const [open, setOpen] = useState(false); const updateUniqueShortcut = useShortcutsStore( - (state) => state.updateUniqueShortcut, + (state) => state.updateUniqueShortcut ); function handleRestore() { diff --git a/src/frontend/src/pages/SettingsPage/pages/hooks/use-patch-profile-picture.tsx b/src/frontend/src/pages/SettingsPage/pages/hooks/use-patch-profile-picture.tsx index 584300fdf..537c579af 100644 --- a/src/frontend/src/pages/SettingsPage/pages/hooks/use-patch-profile-picture.tsx +++ b/src/frontend/src/pages/SettingsPage/pages/hooks/use-patch-profile-picture.tsx @@ -9,7 +9,7 @@ const usePatchProfilePicture = ( setSuccessData, setErrorData, currentUserData, - setUserData, + setUserData ) => { const handlePatchProfilePicture = async (profile_picture) => { try { diff --git a/src/frontend/src/pages/SettingsPage/pages/hooks/use-save-key.tsx b/src/frontend/src/pages/SettingsPage/pages/hooks/use-save-key.tsx index cf5871a26..bdd105fef 100644 --- a/src/frontend/src/pages/SettingsPage/pages/hooks/use-save-key.tsx +++ b/src/frontend/src/pages/SettingsPage/pages/hooks/use-save-key.tsx @@ -11,7 +11,7 @@ const useSaveKey = ( setErrorData, setHasApiKey, setValidApiKey, - setLoadingApiKey, + setLoadingApiKey ) => { const { storeApiKey } = useContext(AuthContext); @@ -35,7 +35,7 @@ const useSaveKey = ( setHasApiKey(false); setValidApiKey(false); setLoadingApiKey(false); - }, + } ); } }; diff --git a/src/frontend/src/pages/SettingsPage/pages/messagesPage/hooks/use-remove-messages.tsx b/src/frontend/src/pages/SettingsPage/pages/messagesPage/hooks/use-remove-messages.tsx index d7f4d5202..f4de52cbb 100644 --- a/src/frontend/src/pages/SettingsPage/pages/messagesPage/hooks/use-remove-messages.tsx +++ b/src/frontend/src/pages/SettingsPage/pages/messagesPage/hooks/use-remove-messages.tsx @@ -5,7 +5,7 @@ const useRemoveMessages = ( setSelectedRows, setSuccessData, setErrorData, - selectedRows, + selectedRows ) => { const deleteMessages = useMessagesStore((state) => state.removeMessages); diff --git a/src/frontend/src/pages/SettingsPage/pages/messagesPage/index.tsx b/src/frontend/src/pages/SettingsPage/pages/messagesPage/index.tsx index 8b6f2a0a0..5b1766d8c 100644 --- a/src/frontend/src/pages/SettingsPage/pages/messagesPage/index.tsx +++ b/src/frontend/src/pages/SettingsPage/pages/messagesPage/index.tsx @@ -26,7 +26,7 @@ export default function MessagesPage() { setSelectedRows, setSuccessData, setErrorData, - selectedRows, + selectedRows ); const { handleUpdate } = useUpdateMessage(setSuccessData, setErrorData); @@ -63,7 +63,7 @@ export default function MessagesPage() { overlayNoRowsTemplate="No data available" onSelectionChanged={(event: SelectionChangedEvent) => { setSelectedRows( - event.api.getSelectedRows().map((row) => row.index), + event.api.getSelectedRows().map((row) => row.index) ); }} rowSelection="multiple" diff --git a/src/frontend/src/pages/StorePage/index.tsx b/src/frontend/src/pages/StorePage/index.tsx index 718888c66..80b842db7 100644 --- a/src/frontend/src/pages/StorePage/index.tsx +++ b/src/frontend/src/pages/StorePage/index.tsx @@ -46,7 +46,7 @@ export default function StorePage(): JSX.Element { const setErrorData = useAlertStore((state) => state.setErrorData); const setCurrentFlowId = useFlowsManagerStore( - (state) => state.setCurrentFlowId, + (state) => state.setCurrentFlowId ); const currentFlowId = useFlowsManagerStore((state) => state.currentFlowId); const [loading, setLoading] = useState(true); @@ -143,7 +143,7 @@ export default function StorePage(): JSX.Element { setTotalRowsCount( filteredCategories?.length === 0 ? Number(res?.count ?? 0) - : res?.results?.length ?? 0, + : res?.results?.length ?? 0 ); } }) @@ -183,7 +183,7 @@ export default function StorePage(): JSX.Element { disabled={loading} className={cn( `${!validApiKey ? "animate-pulse border-error" : ""}`, - loading ? "cursor-not-allowed" : "", + loading ? "cursor-not-allowed" : "" )} variant="primary" onClick={() => { diff --git a/src/frontend/src/routes.tsx b/src/frontend/src/routes.tsx index a1997e510..5623f0871 100644 --- a/src/frontend/src/routes.tsx +++ b/src/frontend/src/routes.tsx @@ -11,25 +11,25 @@ import MessagesPage from "./pages/SettingsPage/pages/messagesPage"; const AdminPage = lazy(() => import("./pages/AdminPage")); const LoginAdminPage = lazy(() => import("./pages/AdminPage/LoginPage")); const ApiKeysPage = lazy( - () => import("./pages/SettingsPage/pages/ApiKeysPage"), + () => import("./pages/SettingsPage/pages/ApiKeysPage") ); const DeleteAccountPage = lazy(() => import("./pages/DeleteAccountPage")); const FlowPage = lazy(() => import("./pages/FlowPage")); const LoginPage = lazy(() => import("./pages/LoginPage")); const MyCollectionComponent = lazy( - () => import("./pages/MainPage/components/myCollectionComponent"), + () => import("./pages/MainPage/components/myCollectionComponent") ); const HomePage = lazy(() => import("./pages/MainPage/pages/mainPage")); const PlaygroundPage = lazy(() => import("./pages/Playground")); const SettingsPage = lazy(() => import("./pages/SettingsPage")); const GeneralPage = lazy( - () => import("./pages/SettingsPage/pages/GeneralPage"), + () => import("./pages/SettingsPage/pages/GeneralPage") ); const GlobalVariablesPage = lazy( - () => import("./pages/SettingsPage/pages/GlobalVariablesPage"), + () => import("./pages/SettingsPage/pages/GlobalVariablesPage") ); const ShortcutsPage = lazy( - () => import("./pages/SettingsPage/pages/ShortcutsPage"), + () => import("./pages/SettingsPage/pages/ShortcutsPage") ); const SignUp = lazy(() => import("./pages/SignUpPage")); const StorePage = lazy(() => import("./pages/StorePage")); diff --git a/src/frontend/src/stores/darkStore.ts b/src/frontend/src/stores/darkStore.ts index 8c9c10951..79f5518da 100644 --- a/src/frontend/src/stores/darkStore.ts +++ b/src/frontend/src/stores/darkStore.ts @@ -36,7 +36,7 @@ export const useDarkStore = create((set, get) => ({ window.localStorage.setItem("githubStars", res?.toString() ?? "0"); window.localStorage.setItem( "githubStarsLastUpdated", - new Date().toString(), + new Date().toString() ); set(() => ({ stars: res, lastUpdated: new Date() })); }); diff --git a/src/frontend/src/stores/flowStore.ts b/src/frontend/src/stores/flowStore.ts index 99aea0515..6d1c2ad5c 100644 --- a/src/frontend/src/stores/flowStore.ts +++ b/src/frontend/src/stores/flowStore.ts @@ -74,7 +74,7 @@ const useFlowStore = create((set, get) => ({ updateFlowPool: ( nodeId: string, data: VertexBuildTypeAPI | ChatOutputType | ChatInputType, - buildId?: string, + buildId?: string ) => { let newFlowPool = cloneDeep({ ...get().flowPool }); if (!newFlowPool[nodeId]) { @@ -167,7 +167,7 @@ const useFlowStore = create((set, get) => ({ flowsManager.autoSaveCurrentFlow( newChange, newEdges, - get().reactFlowInstance?.getViewport() ?? { x: 0, y: 0, zoom: 1 }, + get().reactFlowInstance?.getViewport() ?? { x: 0, y: 0, zoom: 1 } ); } }, @@ -183,7 +183,7 @@ const useFlowStore = create((set, get) => ({ flowsManager.autoSaveCurrentFlow( get().nodes, newChange, - get().reactFlowInstance?.getViewport() ?? { x: 0, y: 0, zoom: 1 }, + get().reactFlowInstance?.getViewport() ?? { x: 0, y: 0, zoom: 1 } ); } }, @@ -201,7 +201,7 @@ const useFlowStore = create((set, get) => ({ return newChange; } return node; - }), + }) ); }, getNode: (id: string) => { @@ -212,8 +212,8 @@ const useFlowStore = create((set, get) => ({ get().nodes.filter((node) => typeof nodeId === "string" ? node.id !== nodeId - : !nodeId.includes(node.id), - ), + : !nodeId.includes(node.id) + ) ); }, deleteEdge: (edgeId) => { @@ -221,8 +221,8 @@ const useFlowStore = create((set, get) => ({ get().edges.filter((edge) => typeof edgeId === "string" ? edge.id !== edgeId - : !edgeId.includes(edge.id), - ), + : !edgeId.includes(edge.id) + ) ); }, paste: (selection, position) => { @@ -288,7 +288,7 @@ const useFlowStore = create((set, get) => ({ let source = idsMap[edge.source]; let target = idsMap[edge.target]; const sourceHandleObject: sourceHandleType = scapeJSONParse( - edge.sourceHandle!, + edge.sourceHandle! ); let sourceHandle = scapedJSONStringfy({ ...sourceHandleObject, @@ -298,7 +298,7 @@ const useFlowStore = create((set, get) => ({ edge.data.sourceHandle = sourceHandleObject; const targetHandleObject: targetHandleType = scapeJSONParse( - edge.targetHandle!, + edge.targetHandle! ); let targetHandle = scapedJSONStringfy({ ...targetHandleObject, @@ -317,7 +317,7 @@ const useFlowStore = create((set, get) => ({ data: cloneDeep(edge.data), selected: false, }, - newEdges.map((edge) => ({ ...edge, selected: false })), + newEdges.map((edge) => ({ ...edge, selected: false })) ); }); get().setEdges(newEdges); @@ -336,10 +336,10 @@ const useFlowStore = create((set, get) => ({ }); const newNodes = get().nodes.filter( - (node) => !nodesIdsSelected.includes(node.id), + (node) => !nodesIdsSelected.includes(node.id) ); const newEdges = get().edges.filter( - (edge) => !edgesIdsSelected.includes(edge.id), + (edge) => !edgesIdsSelected.includes(edge.id) ); set({ nodes: newNodes, edges: newEdges }); @@ -397,7 +397,7 @@ const useFlowStore = create((set, get) => ({ // style: { stroke: "#555" }, // className: "stroke-foreground stroke-connection", }, - oldEdges, + oldEdges ); return newEdges; @@ -407,7 +407,7 @@ const useFlowStore = create((set, get) => ({ .autoSaveCurrentFlow( get().nodes, newEdges, - get().reactFlowInstance?.getViewport() ?? { x: 0, y: 0, zoom: 1 }, + get().reactFlowInstance?.getViewport() ?? { x: 0, y: 0, zoom: 1 } ); }, unselectAll: () => { @@ -442,7 +442,7 @@ const useFlowStore = create((set, get) => ({ function validateSubgraph(nodes: string[]) { const errorsObjs = validateNodes( get().nodes.filter((node) => nodes.includes(node.id)), - get().edges, + get().edges ); const errors = errorsObjs.map((obj) => obj.errors).flat(); @@ -461,13 +461,13 @@ const useFlowStore = create((set, get) => ({ function handleBuildUpdate( vertexBuildData: VertexBuildTypeAPI, status: BuildStatus, - runId: string, + runId: string ) { if (vertexBuildData && vertexBuildData.inactivated_vertices) { get().removeFromVerticesBuild(vertexBuildData.inactivated_vertices); get().updateBuildStatus( vertexBuildData.inactivated_vertices, - BuildStatus.INACTIVE, + BuildStatus.INACTIVE ); } @@ -483,14 +483,14 @@ const useFlowStore = create((set, get) => ({ // next_vertices_ids should be next_vertices_ids without the inactivated vertices const next_vertices_ids = vertexBuildData.next_vertices_ids.filter( - (id) => !vertexBuildData.inactivated_vertices?.includes(id), + (id) => !vertexBuildData.inactivated_vertices?.includes(id) ); const top_level_vertices = vertexBuildData.top_level_vertices.filter( - (vertex) => !vertexBuildData.inactivated_vertices?.includes(vertex), + (vertex) => !vertexBuildData.inactivated_vertices?.includes(vertex) ); const nextVertices: VertexLayerElementType[] = zip( next_vertices_ids, - top_level_vertices, + top_level_vertices ).map(([id, reference]) => ({ id: id!, reference })); const newLayers = [ @@ -512,7 +512,7 @@ const useFlowStore = create((set, get) => ({ get().addDataToFlowPool( { ...vertexBuildData, run_id: runId }, - vertexBuildData.id, + vertexBuildData.id ); useFlowStore.getState().updateBuildStatus([vertexBuildData.id], status); @@ -521,7 +521,7 @@ const useFlowStore = create((set, get) => ({ const newFlowBuildStatus = { ...get().flowBuildStatus }; // filter out the vertices that are not status const verticesToUpdate = verticesIds?.filter( - (id) => newFlowBuildStatus[id]?.status !== BuildStatus.BUILT, + (id) => newFlowBuildStatus[id]?.status !== BuildStatus.BUILT ); if (verticesToUpdate) { @@ -591,7 +591,7 @@ const useFlowStore = create((set, get) => ({ verticesLayers: VertexLayerElementType[][]; runId: string; verticesToRun: string[]; - } | null, + } | null ) => { set({ verticesBuild: vertices }); }, @@ -616,7 +616,7 @@ const useFlowStore = create((set, get) => ({ // that are going to be built verticesIds: get().verticesBuild!.verticesIds.filter( // keep the vertices that are not in the list of vertices to remove - (vertex) => !vertices.includes(vertex), + (vertex) => !vertices.includes(vertex) ), }, }); diff --git a/src/frontend/src/stores/flowsManagerStore.ts b/src/frontend/src/stores/flowsManagerStore.ts index 393681b72..d6bc8338e 100644 --- a/src/frontend/src/stores/flowsManagerStore.ts +++ b/src/frontend/src/stores/flowsManagerStore.ts @@ -87,12 +87,12 @@ const useFlowsManagerStore = create((set, get) => ({ if (dbData) { const { data, flows } = processFlows(dbData); const examples = flows.filter( - (flow) => flow.folder_id === starterFolderId, + (flow) => flow.folder_id === starterFolderId ); get().setExamples(examples); const flowsWithoutStarterFolder = flows.filter( - (flow) => flow.folder_id !== starterFolderId, + (flow) => flow.folder_id !== starterFolderId ); get().setFlows(flowsWithoutStarterFolder); @@ -120,7 +120,7 @@ const useFlowsManagerStore = create((set, get) => ({ if (get().currentFlow) { get().saveFlow( { ...get().currentFlow!, data: { nodes, edges, viewport } }, - true, + true ); } }, @@ -146,7 +146,7 @@ const useFlowsManagerStore = create((set, get) => ({ return updatedFlow; } return flow; - }), + }) ); //update tabs state @@ -195,7 +195,7 @@ const useFlowsManagerStore = create((set, get) => ({ flow?: FlowType, override?: boolean, position?: XYPosition, - fromDragAndDrop?: boolean, + fromDragAndDrop?: boolean ): Promise => { if (newProject) { let flowData = flow @@ -211,7 +211,7 @@ const useFlowsManagerStore = create((set, get) => ({ const newFlow = createNewFlow( flowData!, flow!, - folder_id || my_collection_id!, + folder_id || my_collection_id! ); const { id } = await saveFlowToDatabase(newFlow); newFlow.id = id; @@ -234,7 +234,7 @@ const useFlowsManagerStore = create((set, get) => ({ const newFlow = createNewFlow( flowData!, flow!, - folder_id || my_collection_id!, + folder_id || my_collection_id! ); const newName = addVersionToDuplicates(newFlow, get().flows); @@ -270,7 +270,7 @@ const useFlowsManagerStore = create((set, get) => ({ .getState() .paste( { nodes: flow!.data!.nodes, edges: flow!.data!.edges }, - position ?? { x: 10, y: 10 }, + position ?? { x: 10, y: 10 } ); } }, @@ -280,7 +280,7 @@ const useFlowsManagerStore = create((set, get) => ({ multipleDeleteFlowsComponents(id) .then(() => { const { data, flows } = processFlows( - get().flows.filter((flow) => !id.includes(flow.id)), + get().flows.filter((flow) => !id.includes(flow.id)) ); get().setFlows(flows); set({ isLoading: false }); @@ -300,7 +300,7 @@ const useFlowsManagerStore = create((set, get) => ({ deleteFlowFromDatabase(id) .then(() => { const { data, flows } = processFlows( - get().flows.filter((flow) => flow.id !== id), + get().flows.filter((flow) => flow.id !== id) ); get().setFlows(flows); set({ isLoading: false }); @@ -322,7 +322,7 @@ const useFlowsManagerStore = create((set, get) => ({ return new Promise((resolve) => { let componentFlow = get().flows.find( (componentFlow) => - componentFlow.is_component && componentFlow.name === key, + componentFlow.is_component && componentFlow.name === key ); if (componentFlow) { @@ -370,7 +370,7 @@ const useFlowsManagerStore = create((set, get) => ({ fileData, undefined, position, - true, + true ); resolve(id); } @@ -411,7 +411,7 @@ const useFlowsManagerStore = create((set, get) => ({ return get().addFlow( true, createFlowComponent(component, useDarkStore.getState().version), - override, + override ); }, takeSnapshot: () => { @@ -432,7 +432,7 @@ const useFlowsManagerStore = create((set, get) => ({ if (pastLength > 0) { past[currentFlowId] = past[currentFlowId].slice( pastLength - defaultOptions.maxHistorySize + 1, - pastLength, + pastLength ); past[currentFlowId].push(newState); diff --git a/src/frontend/src/stores/foldersStore.tsx b/src/frontend/src/stores/foldersStore.tsx index e72610987..25247ce76 100644 --- a/src/frontend/src/stores/foldersStore.tsx +++ b/src/frontend/src/stores/foldersStore.tsx @@ -17,18 +17,18 @@ export const useFolderStore = create((set, get) => ({ getFolders().then( (res) => { const foldersWithoutStarterProjects = res.filter( - (folder) => folder.name !== STARTER_FOLDER_NAME, + (folder) => folder.name !== STARTER_FOLDER_NAME ); const starterProjects = res.find( - (folder) => folder.name === STARTER_FOLDER_NAME, + (folder) => folder.name === STARTER_FOLDER_NAME ); set({ starterProjectId: starterProjects!.id ?? "" }); set({ folders: foldersWithoutStarterProjects }); const myCollectionId = res?.find( - (f) => f.name === DEFAULT_FOLDER, + (f) => f.name === DEFAULT_FOLDER )?.id; set({ myCollectionId }); @@ -45,7 +45,7 @@ export const useFolderStore = create((set, get) => ({ set({ folders: [] }); get().setLoading(false); reject(error); - }, + } ); } }); @@ -65,7 +65,7 @@ export const useFolderStore = create((set, get) => ({ }, () => { get().setLoadingById(false); - }, + } ); } }, diff --git a/src/frontend/src/stores/globalVariablesStore/globalVariables.ts b/src/frontend/src/stores/globalVariablesStore/globalVariables.ts index 708f7ec09..c07813858 100644 --- a/src/frontend/src/stores/globalVariablesStore/globalVariables.ts +++ b/src/frontend/src/stores/globalVariablesStore/globalVariables.ts @@ -45,5 +45,5 @@ export const useGlobalVariablesStore = create( getVariableId: (name) => { return get().globalVariables[name]?.id; }, - }), + }) ); diff --git a/src/frontend/src/stores/messagesStore.ts b/src/frontend/src/stores/messagesStore.ts index 349a1c447..c6bf2042b 100644 --- a/src/frontend/src/stores/messagesStore.ts +++ b/src/frontend/src/stores/messagesStore.ts @@ -5,7 +5,7 @@ export const useMessagesStore = create((set, get) => ({ deleteSession: (id) => { set((state) => { const updatedMessages = state.messages.filter( - (msg) => msg.session_id !== id, + (msg) => msg.session_id !== id ); return { messages: updatedMessages }; }); @@ -29,7 +29,7 @@ export const useMessagesStore = create((set, get) => ({ updateMessage: (message) => { set(() => ({ messages: get().messages.map((msg) => - msg.index === message.index ? message : msg, + msg.index === message.index ? message : msg ), })); }, @@ -41,7 +41,7 @@ export const useMessagesStore = create((set, get) => ({ try { set((state) => { const updatedMessages = state.messages.filter( - (msg) => !ids.includes(msg.index), + (msg) => !ids.includes(msg.index) ); get().setMessages(updatedMessages); resolve(updatedMessages); diff --git a/src/frontend/src/types/components/index.ts b/src/frontend/src/types/components/index.ts index 99f890ebf..bb4b6d74e 100644 --- a/src/frontend/src/types/components/index.ts +++ b/src/frontend/src/types/components/index.ts @@ -492,7 +492,7 @@ export type ChatInputType = { isDragging: boolean; files: FilePreviewType[]; setFiles: ( - files: FilePreviewType[] | ((prev: FilePreviewType[]) => FilePreviewType[]), + files: FilePreviewType[] | ((prev: FilePreviewType[]) => FilePreviewType[]) ) => void; chatValue: string; inputRef: { @@ -595,7 +595,7 @@ export type chatMessagePropsType = { updateChat: ( chat: ChatMessageType, message: string, - stream_url?: string, + stream_url?: string ) => void; }; @@ -687,12 +687,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; diff --git a/src/frontend/src/types/store/index.ts b/src/frontend/src/types/store/index.ts index 54b7cb478..a3b26cb64 100644 --- a/src/frontend/src/types/store/index.ts +++ b/src/frontend/src/types/store/index.ts @@ -48,7 +48,7 @@ export type shortcutsStoreType = { shortcut: string; }>; setShortcuts: ( - newShortcuts: Array<{ name: string; shortcut: string }>, + newShortcuts: Array<{ name: string; shortcut: string }> ) => void; getShortcutsFromStorage: () => void; }; diff --git a/src/frontend/src/types/zustand/flow/index.ts b/src/frontend/src/types/zustand/flow/index.ts index 7449f7bc1..e8b88e8d3 100644 --- a/src/frontend/src/types/zustand/flow/index.ts +++ b/src/frontend/src/types/zustand/flow/index.ts @@ -86,7 +86,7 @@ export type FlowStoreType = { state: | FlowState | undefined - | ((oldState: FlowState | undefined) => FlowState), + | ((oldState: FlowState | undefined) => FlowState) ) => void; nodes: Node[]; edges: Edge[]; @@ -94,11 +94,11 @@ export type FlowStoreType = { onEdgesChange: OnEdgesChange; setNodes: ( update: Node[] | ((oldState: Node[]) => Node[]), - skipSave?: boolean, + skipSave?: boolean ) => void; setEdges: ( update: Edge[] | ((oldState: Edge[]) => Edge[]), - skipSave?: boolean, + skipSave?: boolean ) => void; setNode: (id: string, update: Node | ((oldState: Node) => Node)) => void; getNode: (id: string) => Node | undefined; @@ -106,12 +106,12 @@ export type FlowStoreType = { deleteEdge: (edgeId: string | Array) => void; paste: ( selection: { nodes: any; edges: any }, - position: { x: number; y: number; paneX?: number; paneY?: number }, + position: { x: number; y: number; paneX?: number; paneY?: number } ) => void; lastCopiedSelection: { nodes: any; edges: any } | null; setLastCopiedSelection: ( newSelection: { nodes: any; edges: any } | null, - isCrop?: boolean, + isCrop?: boolean ) => void; cleanFlow: () => void; setFilterEdge: (newState) => void; @@ -138,7 +138,7 @@ export type FlowStoreType = { verticesLayers: VertexLayerElementType[][]; runId: string; verticesToRun: string[]; - } | null, + } | null ) => void; addToVerticesBuild: (vertices: string[]) => void; removeFromVerticesBuild: (vertices: string[]) => void; @@ -156,7 +156,7 @@ export type FlowStoreType = { updateFlowPool: ( nodeId: string, data: VertexBuildTypeAPI | ChatOutputType | ChatInputType, - buildId?: string, + buildId?: string ) => void; getNodePosition: (nodeId: string) => { x: number; y: number }; }; diff --git a/src/frontend/src/types/zustand/flowsManager/index.ts b/src/frontend/src/types/zustand/flowsManager/index.ts index aaafebb7b..e0770626e 100644 --- a/src/frontend/src/types/zustand/flowsManager/index.ts +++ b/src/frontend/src/types/zustand/flowsManager/index.ts @@ -17,12 +17,12 @@ export type FlowsManagerStoreType = { saveFlow: (flow: FlowType, silent?: boolean) => Promise | undefined; saveFlowDebounce: ( flow: FlowType, - silent?: boolean, + silent?: boolean ) => Promise | undefined; autoSaveCurrentFlow: ( nodes: Node[], edges: Edge[], - viewport: Viewport, + viewport: Viewport ) => void; uploadFlows: () => Promise; uploadFlow: ({ @@ -41,13 +41,13 @@ export type FlowsManagerStoreType = { flow?: FlowType, override?: boolean, position?: XYPosition, - fromDragAndDrop?: boolean, + fromDragAndDrop?: boolean ) => Promise; deleteComponent: (key: string) => Promise; removeFlow: (id: string | string[]) => Promise; saveComponent: ( component: any, - override: boolean, + override: boolean ) => Promise; undo: () => void; redo: () => void; diff --git a/src/frontend/src/types/zustand/globalVariables/index.ts b/src/frontend/src/types/zustand/globalVariables/index.ts index 4b178088c..90817780f 100644 --- a/src/frontend/src/types/zustand/globalVariables/index.ts +++ b/src/frontend/src/types/zustand/globalVariables/index.ts @@ -21,7 +21,7 @@ export type GlobalVariablesStore = { id: string, type?: string, default_fields?: string[], - value?: string, + value?: string ) => void; removeGlobalVariable: (name: string) => Promise; getVariableId: (name: string) => string | undefined; diff --git a/src/frontend/src/utils/buildUtils.ts b/src/frontend/src/utils/buildUtils.ts index 5d70e1d12..4d0a3e147 100644 --- a/src/frontend/src/utils/buildUtils.ts +++ b/src/frontend/src/utils/buildUtils.ts @@ -17,7 +17,7 @@ type BuildVerticesParams = { onBuildUpdate?: ( data: VertexBuildTypeAPI, status: BuildStatus, - buildId: string, + buildId: string ) => void; // Replace any with the actual type if it's not any onBuildComplete?: (allNodesValid: boolean) => void; onBuildError?: (title, list, idList: VertexLayerElementType[]) => void; @@ -55,7 +55,7 @@ export async function updateVerticesOrder( startNodeId?: string | null, stopNodeId?: string | null, nodes?: Node[], - edges?: Edge[], + edges?: Edge[] ): Promise<{ verticesLayers: VertexLayerElementType[][]; verticesIds: string[]; @@ -71,7 +71,7 @@ export async function updateVerticesOrder( startNodeId, stopNodeId, nodes, - edges, + edges ); } catch (error: any) { setErrorData({ @@ -128,7 +128,7 @@ export async function buildVertices({ startNodeId, stopNodeId, nodes, - edges, + edges ); if (onValidateNodes) { try { @@ -190,14 +190,14 @@ export async function buildVertices({ onBuildUpdate( getInactiveVertexData(element.id), BuildStatus.INACTIVE, - runId, + runId ); } if (element.reference) { onBuildUpdate( getInactiveVertexData(element.reference), BuildStatus.INACTIVE, - runId, + runId ); } buildResults.push(false); @@ -223,7 +223,7 @@ export async function buildVertices({ if (stop) { return; } - }), + }) ); // Once the current layer is built, move to the next layer currentLayerIndex += 1; @@ -268,7 +268,7 @@ async function buildVertex({ onBuildError!( "Error Building Component", buildData.data.logs.map((log) => log.message), - verticesIds.map((id) => ({ id })), + verticesIds.map((id) => ({ id })) ); stopBuild(); } @@ -283,7 +283,7 @@ async function buildVertex({ (error as AxiosError).response?.data?.detail ?? "An unexpected error occurred while building the Component. Please try again.", ], - verticesIds.map((id) => ({ id })), + verticesIds.map((id) => ({ id })) ); stopBuild(); } diff --git a/src/frontend/src/utils/parameterUtils.ts b/src/frontend/src/utils/parameterUtils.ts index d1d53dde7..a1d2f2154 100644 --- a/src/frontend/src/utils/parameterUtils.ts +++ b/src/frontend/src/utils/parameterUtils.ts @@ -21,7 +21,7 @@ export const handleUpdateValues = async (name: string, data: NodeDataType) => { code, template, name, - data.node?.template[name]?.value, + data.node?.template[name]?.value ); if (res.status === 200 && data.node?.template) { return res.data.template; @@ -34,5 +34,5 @@ export const handleUpdateValues = async (name: string, data: NodeDataType) => { export const debouncedHandleUpdateValues = debounce( handleUpdateValues, - SAVE_DEBOUNCE_TIME, + SAVE_DEBOUNCE_TIME ); diff --git a/src/frontend/src/utils/storeUtils.ts b/src/frontend/src/utils/storeUtils.ts index c8391b211..637e4331a 100644 --- a/src/frontend/src/utils/storeUtils.ts +++ b/src/frontend/src/utils/storeUtils.ts @@ -7,7 +7,7 @@ export default function cloneFLowWithParent( flow: FlowType, parent: string, is_component: boolean, - keepId = false, + keepId = false ) { let childFLow = cloneDeep(flow); childFLow.parent = parent; diff --git a/src/frontend/src/utils/utils.ts b/src/frontend/src/utils/utils.ts index 302d9e0a7..5a1f6621f 100644 --- a/src/frontend/src/utils/utils.ts +++ b/src/frontend/src/utils/utils.ts @@ -56,7 +56,7 @@ export function normalCaseToSnakeCase(str: string): string { export function toTitleCase( str: string | undefined, - isNodeField?: boolean, + isNodeField?: boolean ): string { if (!str) return ""; let result = str @@ -65,7 +65,7 @@ export function toTitleCase( if (isNodeField) return word; if (index === 0) { return checkUpperWords( - word[0].toUpperCase() + word.slice(1).toLowerCase(), + word[0].toUpperCase() + word.slice(1).toLowerCase() ); } return checkUpperWords(word.toLowerCase()); @@ -78,7 +78,7 @@ export function toTitleCase( if (isNodeField) return word; if (index === 0) { return checkUpperWords( - word[0].toUpperCase() + word.slice(1).toLowerCase(), + word[0].toUpperCase() + word.slice(1).toLowerCase() ); } return checkUpperWords(word.toLowerCase()); @@ -182,7 +182,7 @@ export function checkLocalStorageKey(key: string): boolean { export function IncrementObjectKey( object: object, - key: string, + key: string ): { newKey: string; increment: number } { let count = 1; const type = removeCountFromString(key); @@ -217,7 +217,7 @@ export function groupByFamily( data: APIDataType, baseClasses: string, left: boolean, - flow?: NodeType[], + flow?: NodeType[] ): groupedObjType[] { const baseClassesSet = new Set(baseClasses.split("\n")); let arrOfPossibleInputs: Array<{ @@ -243,7 +243,7 @@ export function groupByFamily( baseClassesSet.has(template.type)) || (template?.input_types && template?.input_types.some((inputType) => - baseClassesSet.has(inputType), + baseClassesSet.has(inputType) ))) ); }; @@ -263,7 +263,7 @@ export function groupByFamily( hasBaseClassInBaseClasses: foundNode?.hasBaseClassInBaseClasses || nodeData.node!.base_classes.some((baseClass) => - baseClassesSet.has(baseClass), + baseClassesSet.has(baseClass) ), //seta como anterior ou verifica se o node tem base class displayName: nodeData.node?.display_name, }); @@ -280,10 +280,10 @@ export function groupByFamily( if (!foundNode) { foundNode = { hasBaseClassInTemplate: Object.values(node!.template).some( - checkBaseClass, + checkBaseClass ), hasBaseClassInBaseClasses: node!.base_classes.some((baseClass) => - baseClassesSet.has(baseClass), + baseClassesSet.has(baseClass) ), displayName: node?.display_name, }; @@ -355,7 +355,7 @@ export function isTimeStampString(str: string): boolean { export function extractColumnsFromRows( rows: object[], mode: "intersection" | "union", - excludeColumns?: Array, + excludeColumns?: Array ): (ColDef | ColGroupDef)[] { let columnsKeys: { [key: string]: ColDef | ColGroupDef } = {}; if (rows.length === 0) { diff --git a/src/frontend/tests/end-to-end/chatInputOutput.spec.ts b/src/frontend/tests/end-to-end/chatInputOutput.spec.ts index c34c953ec..17cc25efb 100644 --- a/src/frontend/tests/end-to-end/chatInputOutput.spec.ts +++ b/src/frontend/tests/end-to-end/chatInputOutput.spec.ts @@ -24,7 +24,7 @@ test("chat_io_teste", async ({ page }) => { const jsonContent = readFileSync( "src/frontend/tests/end-to-end/assets/ChatTest.json", - "utf-8", + "utf-8" ); await page.getByTestId("blank-flow").click(); @@ -62,7 +62,7 @@ test("chat_io_teste", async ({ page }) => { // Click and hold on the first element await page .locator( - '//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[2]/div/div[2]/div[10]/button/div/div', + '//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[2]/div/div[2]/div[10]/button/div/div' ) .hover(); await page.mouse.down(); @@ -70,7 +70,7 @@ test("chat_io_teste", async ({ page }) => { // Move to the second element await page .locator( - '//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[1]/div/div[2]/div[4]/div/button/div/div', + '//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[1]/div/div[2]/div[4]/div/button/div/div' ) .hover(); diff --git a/src/frontend/tests/end-to-end/chatInputOutputUser.spec.ts b/src/frontend/tests/end-to-end/chatInputOutputUser.spec.ts index 6950ca230..89a066415 100644 --- a/src/frontend/tests/end-to-end/chatInputOutputUser.spec.ts +++ b/src/frontend/tests/end-to-end/chatInputOutputUser.spec.ts @@ -56,7 +56,7 @@ test("user must interact with chat with Input/Output", async ({ page }) => { .getByTestId("textarea-input_value") .nth(1) .fill( - "testtesttesttesttesttestte;.;.,;,.;,.;.,;,..,;;;;;;;;;;;;;;;;;;;;;,;.;,.;,.,;.,;.;.,~~çççççççççççççççççççççççççççççççççççççççisdajfdasiopjfaodisjhvoicxjiovjcxizopjviopasjioasfhjaiohf23432432432423423sttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttestççççççççççççççççççççççççççççççççç,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,!", + "testtesttesttesttesttestte;.;.,;,.;,.;.,;,..,;;;;;;;;;;;;;;;;;;;;;,;.;,.;,.,;.,;.;.,~~çççççççççççççççççççççççççççççççççççççççisdajfdasiopjfaodisjhvoicxjiovjcxizopjviopasjioasfhjaiohf23432432432423423sttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttestççççççççççççççççççççççççççççççççç,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,!" ); await page.getByText("Playground", { exact: true }).last().click(); await page.getByTestId("icon-LucideSend").click(); @@ -92,9 +92,9 @@ test("user must interact with chat with Input/Output", async ({ page }) => { await page .getByText( "testtesttesttesttesttestte;.;.,;,.;,.;.,;,..,;;;;;;;;;;;;;;;;;;;;;,;.;,.;,.,;.,;.;.,~~çççççççççççççççççççççççççççççççççççççççisdajfdasiopjfaodisjhvoicxjiovjcxizopjviopasjioasfhjaiohf23432432432423423sttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttestççççççççççççççççççççççççççççççççç,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,!", - { exact: true }, + { exact: true } ) - .isVisible(), + .isVisible() ); }); @@ -204,7 +204,7 @@ test("user must be able to send an image on chat", async ({ page }) => { const jsonContent = readFileSync( "src/frontend/tests/end-to-end/assets/chain.png", - "utf-8", + "utf-8" ); // Create the DataTransfer and File diff --git a/src/frontend/tests/end-to-end/dragAndDrop.spec.ts b/src/frontend/tests/end-to-end/dragAndDrop.spec.ts index 03d11aaf7..3e760901d 100644 --- a/src/frontend/tests/end-to-end/dragAndDrop.spec.ts +++ b/src/frontend/tests/end-to-end/dragAndDrop.spec.ts @@ -27,7 +27,7 @@ test.describe("drag and drop test", () => { // Read your file into a buffer. const jsonContent = readFileSync( "src/frontend/tests/end-to-end/assets/collection.json", - "utf-8", + "utf-8" ); // Create the DataTransfer and File @@ -47,7 +47,7 @@ test.describe("drag and drop test", () => { "drop", { dataTransfer, - }, + } ); const genericNoda = page.getByTestId("div-generic-node"); diff --git a/src/frontend/tests/end-to-end/dropdownComponent.spec.ts b/src/frontend/tests/end-to-end/dropdownComponent.spec.ts index 6c0a7dd9e..0152ca7ed 100644 --- a/src/frontend/tests/end-to-end/dropdownComponent.spec.ts +++ b/src/frontend/tests/end-to-end/dropdownComponent.spec.ts @@ -80,32 +80,32 @@ test("dropDownComponent", async ({ page }) => { await page.locator('//*[@id="showcredentials_profile_name"]').click(); expect( - await page.locator('//*[@id="showcredentials_profile_name"]').isChecked(), + await page.locator('//*[@id="showcredentials_profile_name"]').isChecked() ).toBeFalsy(); await page.locator('//*[@id="showcredentials_profile_name"]').click(); expect( - await page.locator('//*[@id="showcredentials_profile_name"]').isChecked(), + await page.locator('//*[@id="showcredentials_profile_name"]').isChecked() ).toBeTruthy(); await page.locator('//*[@id="showendpoint_url"]').click(); expect( - await page.locator('//*[@id="showendpoint_url"]').isChecked(), + await page.locator('//*[@id="showendpoint_url"]').isChecked() ).toBeFalsy(); await page.locator('//*[@id="showendpoint_url"]').click(); expect( - await page.locator('//*[@id="showendpoint_url"]').isChecked(), + await page.locator('//*[@id="showendpoint_url"]').isChecked() ).toBeTruthy(); await page.locator('//*[@id="showregion_name"]').click(); expect( - await page.locator('//*[@id="showregion_name"]').isChecked(), + await page.locator('//*[@id="showregion_name"]').isChecked() ).toBeFalsy(); await page.locator('//*[@id="showregion_name"]').click(); expect( - await page.locator('//*[@id="showregion_name"]').isChecked(), + await page.locator('//*[@id="showregion_name"]').isChecked() ).toBeTruthy(); // showmodel_id @@ -115,7 +115,7 @@ test("dropDownComponent", async ({ page }) => { // showmodel_id await page.locator('//*[@id="showmodel_id"]').click(); expect( - await page.locator('//*[@id="showmodel_id"]').isChecked(), + await page.locator('//*[@id="showmodel_id"]').isChecked() ).toBeTruthy(); await page.locator('//*[@id="showcache"]').click(); @@ -126,32 +126,32 @@ test("dropDownComponent", async ({ page }) => { await page.locator('//*[@id="showcredentials_profile_name"]').click(); expect( - await page.locator('//*[@id="showcredentials_profile_name"]').isChecked(), + await page.locator('//*[@id="showcredentials_profile_name"]').isChecked() ).toBeFalsy(); await page.locator('//*[@id="showcredentials_profile_name"]').click(); expect( - await page.locator('//*[@id="showcredentials_profile_name"]').isChecked(), + await page.locator('//*[@id="showcredentials_profile_name"]').isChecked() ).toBeTruthy(); await page.locator('//*[@id="showendpoint_url"]').click(); expect( - await page.locator('//*[@id="showendpoint_url"]').isChecked(), + await page.locator('//*[@id="showendpoint_url"]').isChecked() ).toBeFalsy(); await page.locator('//*[@id="showendpoint_url"]').click(); expect( - await page.locator('//*[@id="showendpoint_url"]').isChecked(), + await page.locator('//*[@id="showendpoint_url"]').isChecked() ).toBeTruthy(); await page.locator('//*[@id="showregion_name"]').click(); expect( - await page.locator('//*[@id="showregion_name"]').isChecked(), + await page.locator('//*[@id="showregion_name"]').isChecked() ).toBeFalsy(); await page.locator('//*[@id="showregion_name"]').click(); expect( - await page.locator('//*[@id="showregion_name"]').isChecked(), + await page.locator('//*[@id="showregion_name"]').isChecked() ).toBeTruthy(); // showmodel_id @@ -161,7 +161,7 @@ test("dropDownComponent", async ({ page }) => { // showmodel_id await page.locator('//*[@id="showmodel_id"]').click(); expect( - await page.locator('//*[@id="showmodel_id"]').isChecked(), + await page.locator('//*[@id="showmodel_id"]').isChecked() ).toBeTruthy(); await page.getByTestId("dropdown-edit-model_id").click(); diff --git a/src/frontend/tests/end-to-end/fileUploadComponent.spec.ts b/src/frontend/tests/end-to-end/fileUploadComponent.spec.ts index 00f761dea..93b471c43 100644 --- a/src/frontend/tests/end-to-end/fileUploadComponent.spec.ts +++ b/src/frontend/tests/end-to-end/fileUploadComponent.spec.ts @@ -64,7 +64,7 @@ test("dropDownComponent", async ({ page }) => { // Click and hold on the first element await page .locator( - '//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[1]/div/div[2]/div[6]/button/div/div', + '//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[1]/div/div[2]/div[6]/button/div/div' ) .hover(); await page.mouse.down(); @@ -72,7 +72,7 @@ test("dropDownComponent", async ({ page }) => { // Move to the second element await page .locator( - '//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[2]/div/div[2]/div[3]/div/button/div/div', + '//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[2]/div/div[2]/div[3]/div/button/div/div' ) .hover(); diff --git a/src/frontend/tests/end-to-end/filterEdge.spec.ts b/src/frontend/tests/end-to-end/filterEdge.spec.ts index 7edbc0436..9cb5a567e 100644 --- a/src/frontend/tests/end-to-end/filterEdge.spec.ts +++ b/src/frontend/tests/end-to-end/filterEdge.spec.ts @@ -40,7 +40,7 @@ test("LLMChain - Tooltip", async ({ page }) => { await page .locator( - '//*[@id="react-flow-id"]/div[1]/div[1]/div/div/div[2]/div/div/div[2]/div[3]/div/button/div/div', + '//*[@id="react-flow-id"]/div[1]/div[1]/div/div/div[2]/div/div/div[2]/div[3]/div/button/div/div' ) .hover() .then(async () => { @@ -60,17 +60,17 @@ test("LLMChain - Tooltip", async ({ page }) => { await page.getByTitle("zoom out").click(); await page .locator( - '//*[@id="react-flow-id"]/div[1]/div[1]/div/div/div[2]/div/div/div[2]/div[4]/div/button/div/div', + '//*[@id="react-flow-id"]/div[1]/div[1]/div/div/div[2]/div/div/div[2]/div[4]/div/button/div/div' ) .hover() .then(async () => { await expect( - page.getByTestId("tooltip-Model Specs").first(), + page.getByTestId("tooltip-Model Specs").first() ).toBeVisible(); await page.waitForTimeout(2000); await expect( - page.getByTestId("tooltip-Model Specs").first(), + page.getByTestId("tooltip-Model Specs").first() ).toBeVisible(); await page.getByTestId("icon-Search").click(); @@ -81,12 +81,12 @@ test("LLMChain - Tooltip", async ({ page }) => { await page .locator( - '//*[@id="react-flow-id"]/div[1]/div[1]/div/div/div[2]/div/div/div[2]/div[5]/div/button/div/div', + '//*[@id="react-flow-id"]/div[1]/div[1]/div/div/div[2]/div/div/div[2]/div[5]/div/button/div/div' ) .hover() .then(async () => { await expect( - page.getByTestId("empty-tooltip-filter").first(), + page.getByTestId("empty-tooltip-filter").first() ).toBeVisible(); }); }); @@ -113,7 +113,7 @@ test("LLMChain - Filter", async ({ page }) => { await page.waitForTimeout(1000); await page.getByTestId( - "input-list-plus-btn-edit_metadata_indexing_include-2", + "input-list-plus-btn-edit_metadata_indexing_include-2" ); await page.getByTestId("blank-flow").click(); @@ -136,7 +136,7 @@ test("LLMChain - Filter", async ({ page }) => { await page .locator( - '//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div/div/div[2]/div[4]/div/button/div/div', + '//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div/div/div[2]/div[4]/div/button/div/div' ) .click(); @@ -149,14 +149,14 @@ test("LLMChain - Filter", async ({ page }) => { await expect(page.getByTestId("model_specsChatOpenAI")).toBeVisible(); await expect(page.getByTestId("model_specsChatVertexAI")).toBeVisible(); await expect( - page.getByTestId("model_specsGoogle Generative AI"), + page.getByTestId("model_specsGoogle Generative AI") ).toBeVisible(); await expect( - page.getByTestId("model_specsHugging Face Inference API"), + page.getByTestId("model_specsHugging Face Inference API") ).toBeVisible(); await expect(page.getByTestId("model_specsOllama")).toBeVisible(); await expect( - page.getByTestId("model_specsQianfanChatEndpoint"), + page.getByTestId("model_specsQianfanChatEndpoint") ).toBeVisible(); await expect(page.getByTestId("model_specsQianfanLLMEndpoint")).toBeVisible(); await expect(page.getByTestId("model_specsVertexAI")).toBeVisible(); @@ -168,7 +168,7 @@ test("LLMChain - Filter", async ({ page }) => { await expect(page.getByTestId("model_specsAmazon Bedrock")).not.toBeVisible(); await expect(page.getByTestId("modelsAzure OpenAI")).not.toBeVisible(); await expect( - page.getByTestId("model_specsAzureChatOpenAI"), + page.getByTestId("model_specsAzureChatOpenAI") ).not.toBeVisible(); await expect(page.getByTestId("model_specsChatAnthropic")).not.toBeVisible(); await expect(page.getByTestId("model_specsChatLiteLLM")).not.toBeVisible(); @@ -178,13 +178,13 @@ test("LLMChain - Filter", async ({ page }) => { await page .locator( - '//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div/div/div[2]/div[7]/button/div/div', + '//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div/div/div[2]/div[7]/button/div/div' ) .click(); await page .locator( - '//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div/div/div[2]/div[7]/button/div/div', + '//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div/div/div[2]/div[7]/button/div/div' ) .click(); diff --git a/src/frontend/tests/end-to-end/floatComponent.spec.ts b/src/frontend/tests/end-to-end/floatComponent.spec.ts index e172a92e3..0577a62b4 100644 --- a/src/frontend/tests/end-to-end/floatComponent.spec.ts +++ b/src/frontend/tests/end-to-end/floatComponent.spec.ts @@ -71,27 +71,27 @@ test("FloatComponent", async ({ page }) => { await page.getByTestId("showmirostat").click(); expect( - await page.locator('//*[@id="showmirostat"]').isChecked(), + await page.locator('//*[@id="showmirostat"]').isChecked() ).toBeTruthy(); await page.getByTestId("showmirostat_eta").click(); expect( - await page.locator('//*[@id="showmirostat_eta"]').isChecked(), + await page.locator('//*[@id="showmirostat_eta"]').isChecked() ).toBeTruthy(); await page.getByTestId("showmirostat_eta").click(); expect( - await page.locator('//*[@id="showmirostat_eta"]').isChecked(), + await page.locator('//*[@id="showmirostat_eta"]').isChecked() ).toBeFalsy(); await page.getByTestId("showmirostat_tau").click(); expect( - await page.locator('//*[@id="showmirostat_tau"]').isChecked(), + await page.locator('//*[@id="showmirostat_tau"]').isChecked() ).toBeTruthy(); await page.getByTestId("showmirostat_tau").click(); expect( - await page.locator('//*[@id="showmirostat_tau"]').isChecked(), + await page.locator('//*[@id="showmirostat_tau"]').isChecked() ).toBeFalsy(); await page.getByTestId("showmodel").click(); @@ -114,22 +114,22 @@ test("FloatComponent", async ({ page }) => { await page.getByTestId("shownum_thread").click(); expect( - await page.locator('//*[@id="shownum_thread"]').isChecked(), + await page.locator('//*[@id="shownum_thread"]').isChecked() ).toBeTruthy(); await page.getByTestId("shownum_thread").click(); expect( - await page.locator('//*[@id="shownum_thread"]').isChecked(), + await page.locator('//*[@id="shownum_thread"]').isChecked() ).toBeFalsy(); await page.getByTestId("showrepeat_last_n").click(); expect( - await page.locator('//*[@id="showrepeat_last_n"]').isChecked(), + await page.locator('//*[@id="showrepeat_last_n"]').isChecked() ).toBeTruthy(); await page.getByTestId("showrepeat_last_n").click(); expect( - await page.locator('//*[@id="showrepeat_last_n"]').isChecked(), + await page.locator('//*[@id="showrepeat_last_n"]').isChecked() ).toBeFalsy(); await page.getByText("Save Changes", { exact: true }).click(); @@ -145,7 +145,7 @@ test("FloatComponent", async ({ page }) => { // showtemperature await page.locator('//*[@id="showtemperature"]').click(); expect( - await page.locator('//*[@id="showtemperature"]').isChecked(), + await page.locator('//*[@id="showtemperature"]').isChecked() ).toBeTruthy(); await page.getByText("Save Changes", { exact: true }).click(); diff --git a/src/frontend/tests/end-to-end/flowSettings.spec.ts b/src/frontend/tests/end-to-end/flowSettings.spec.ts index 25807ed88..a2e9f25c0 100644 --- a/src/frontend/tests/end-to-end/flowSettings.spec.ts +++ b/src/frontend/tests/end-to-end/flowSettings.spec.ts @@ -29,7 +29,7 @@ test("flowSettings", async ({ page }) => { await page .getByPlaceholder("Flow name") .fill( - "Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test", + "Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test" ); await page.getByText("Character limit reached").isVisible(); @@ -41,7 +41,7 @@ test("flowSettings", async ({ page }) => { await page .getByPlaceholder("Flow description") .fill( - "Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test", + "Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test" ); await page.getByTestId("save-flow-settings").click(); diff --git a/src/frontend/tests/end-to-end/folders.spec.ts b/src/frontend/tests/end-to-end/folders.spec.ts index e0f694910..384816b3f 100644 --- a/src/frontend/tests/end-to-end/folders.spec.ts +++ b/src/frontend/tests/end-to-end/folders.spec.ts @@ -58,7 +58,7 @@ test("add folder by drag and drop", async ({ page }) => { const jsonContent = readFileSync( "src/frontend/tests/end-to-end/assets/collection.json", - "utf-8", + "utf-8" ); // Create the DataTransfer and File @@ -78,7 +78,7 @@ test("add folder by drag and drop", async ({ page }) => { "drop", { dataTransfer, - }, + } ); await page.getByText("Getting Started").first().isVisible(); diff --git a/src/frontend/tests/end-to-end/inputComponent.spec.ts b/src/frontend/tests/end-to-end/inputComponent.spec.ts index 3e6936b43..d944cffe5 100644 --- a/src/frontend/tests/end-to-end/inputComponent.spec.ts +++ b/src/frontend/tests/end-to-end/inputComponent.spec.ts @@ -60,69 +60,69 @@ test("InputComponent", async ({ page }) => { expect( await page .locator('//*[@id="showchroma_server_cors_allow_origins"]') - .isChecked(), + .isChecked() ).toBeTruthy(); await page.locator('//*[@id="showchroma_server_grpc_port"]').click(); expect( - await page.locator('//*[@id="showchroma_server_grpc_port"]').isChecked(), + await page.locator('//*[@id="showchroma_server_grpc_port"]').isChecked() ).toBeTruthy(); await page.locator('//*[@id="showchroma_server_host"]').click(); expect( - await page.locator('//*[@id="showchroma_server_host"]').isChecked(), + await page.locator('//*[@id="showchroma_server_host"]').isChecked() ).toBeTruthy(); await page.locator('//*[@id="showchroma_server_http_port"]').click(); expect( - await page.locator('//*[@id="showchroma_server_http_port"]').isChecked(), + await page.locator('//*[@id="showchroma_server_http_port"]').isChecked() ).toBeTruthy(); await page.locator('//*[@id="showchroma_server_ssl_enabled"]').click(); expect( - await page.locator('//*[@id="showchroma_server_ssl_enabled"]').isChecked(), + await page.locator('//*[@id="showchroma_server_ssl_enabled"]').isChecked() ).toBeTruthy(); await page.locator('//*[@id="showcollection_name"]').click(); expect( - await page.locator('//*[@id="showcollection_name"]').isChecked(), + await page.locator('//*[@id="showcollection_name"]').isChecked() ).toBeFalsy(); await page.locator('//*[@id="showindex_directory"]').click(); expect( - await page.locator('//*[@id="showindex_directory"]').isChecked(), + await page.locator('//*[@id="showindex_directory"]').isChecked() ).toBeFalsy(); await page.locator('//*[@id="showchroma_server_cors_allow_origins"]').click(); expect( await page .locator('//*[@id="showchroma_server_cors_allow_origins"]') - .isChecked(), + .isChecked() ).toBeFalsy(); await page.locator('//*[@id="showchroma_server_grpc_port"]').click(); expect( - await page.locator('//*[@id="showchroma_server_grpc_port"]').isChecked(), + await page.locator('//*[@id="showchroma_server_grpc_port"]').isChecked() ).toBeFalsy(); await page.locator('//*[@id="showchroma_server_host"]').click(); expect( - await page.locator('//*[@id="showchroma_server_host"]').isChecked(), + await page.locator('//*[@id="showchroma_server_host"]').isChecked() ).toBeFalsy(); await page.locator('//*[@id="showchroma_server_http_port"]').click(); expect( - await page.locator('//*[@id="showchroma_server_http_port"]').isChecked(), + await page.locator('//*[@id="showchroma_server_http_port"]').isChecked() ).toBeFalsy(); await page.locator('//*[@id="showchroma_server_ssl_enabled"]').click(); expect( - await page.locator('//*[@id="showchroma_server_ssl_enabled"]').isChecked(), + await page.locator('//*[@id="showchroma_server_ssl_enabled"]').isChecked() ).toBeFalsy(); await page.locator('//*[@id="showindex_directory"]').click(); expect( - await page.locator('//*[@id="showindex_directory"]').isChecked(), + await page.locator('//*[@id="showindex_directory"]').isChecked() ).toBeTruthy(); let valueEditNode = await page @@ -152,7 +152,7 @@ test("InputComponent", async ({ page }) => { await page.locator('//*[@id="showcollection_name"]').click(); expect( - await page.locator('//*[@id="showcollection_name"]').isChecked(), + await page.locator('//*[@id="showcollection_name"]').isChecked() ).toBeTruthy(); await page.getByText("Save Changes", { exact: true }).click(); diff --git a/src/frontend/tests/end-to-end/inputListComponent.spec.ts b/src/frontend/tests/end-to-end/inputListComponent.spec.ts index 74c527892..6414c92db 100644 --- a/src/frontend/tests/end-to-end/inputListComponent.spec.ts +++ b/src/frontend/tests/end-to-end/inputListComponent.spec.ts @@ -41,19 +41,19 @@ test("InputListComponent", async ({ page }) => { await page.getByTestId("edit-button-modal").click(); expect( - await page.getByTestId("showmetadata_indexing_exclude").isChecked(), + await page.getByTestId("showmetadata_indexing_exclude").isChecked() ).toBeFalsy(); await page.getByTestId("showmetadata_indexing_exclude").click(); expect( - await page.getByTestId("showmetadata_indexing_exclude").isChecked(), + await page.getByTestId("showmetadata_indexing_exclude").isChecked() ).toBeTruthy(); expect( - await page.getByTestId("showmetadata_indexing_include").isChecked(), + await page.getByTestId("showmetadata_indexing_include").isChecked() ).toBeFalsy(); await page.getByTestId("showmetadata_indexing_include").click(); expect( - await page.getByTestId("showmetadata_indexing_include").isChecked(), + await page.getByTestId("showmetadata_indexing_include").isChecked() ).toBeTruthy(); await page @@ -93,7 +93,7 @@ test("InputListComponent", async ({ page }) => { .click(); const plusButtonLocator = page.getByTestId( - "input-list-plus-btn_metadata_indexing_include-1", + "input-list-plus-btn_metadata_indexing_include-1" ); const elementCount = await plusButtonLocator?.count(); @@ -164,12 +164,12 @@ test("InputListComponent", async ({ page }) => { .click(); const plusButtonLocatorEdit0 = await page.getByTestId( - "input-list-plus-btn-edit_metadata_indexing_include-0", + "input-list-plus-btn-edit_metadata_indexing_include-0" ); const elementCountEdit0 = await plusButtonLocatorEdit0?.count(); const plusButtonLocatorEdit2 = await page.getByTestId( - "input-list-plus-btn-edit_metadata_indexing_include-2", + "input-list-plus-btn-edit_metadata_indexing_include-2" ); const elementCountEdit2 = await plusButtonLocatorEdit2?.count(); @@ -178,13 +178,13 @@ test("InputListComponent", async ({ page }) => { } const minusButtonLocatorEdit1 = await page.getByTestId( - "input-list-minus-btn-edit_metadata_indexing_include-1", + "input-list-minus-btn-edit_metadata_indexing_include-1" ); const elementCountMinusEdit1 = await minusButtonLocatorEdit1?.count(); const minusButtonLocatorEdit2 = await page.getByTestId( - "input-list-minus-btn-edit_metadata_indexing_include-2", + "input-list-minus-btn-edit_metadata_indexing_include-2" ); const elementCountMinusEdit2 = await minusButtonLocatorEdit2?.count(); diff --git a/src/frontend/tests/end-to-end/keyPairListComponent.spec.ts b/src/frontend/tests/end-to-end/keyPairListComponent.spec.ts index 31a4521ae..165dd685b 100644 --- a/src/frontend/tests/end-to-end/keyPairListComponent.spec.ts +++ b/src/frontend/tests/end-to-end/keyPairListComponent.spec.ts @@ -81,7 +81,7 @@ test("KeypairListComponent", async ({ page }) => { expect(await page.locator('//*[@id="showcache"]').isChecked()).toBeFalsy(); await page.locator('//*[@id="showcredentials_profile_name"]').click(); expect( - await page.locator('//*[@id="showcredentials_profile_name"]').isChecked(), + await page.locator('//*[@id="showcredentials_profile_name"]').isChecked() ).toBeFalsy(); await page.getByText("Save Changes", { exact: true }).click(); @@ -96,7 +96,7 @@ test("KeypairListComponent", async ({ page }) => { await page.locator('//*[@id="showcredentials_profile_name"]').click(); expect( - await page.locator('//*[@id="showcredentials_profile_name"]').isChecked(), + await page.locator('//*[@id="showcredentials_profile_name"]').isChecked() ).toBeTruthy(); await page.locator('//*[@id="showcache"]').click(); expect(await page.locator('//*[@id="showcache"]').isChecked()).toBeTruthy(); diff --git a/src/frontend/tests/end-to-end/langflowShortcuts.spec.ts b/src/frontend/tests/end-to-end/langflowShortcuts.spec.ts index 42b8744d1..58615dd55 100644 --- a/src/frontend/tests/end-to-end/langflowShortcuts.spec.ts +++ b/src/frontend/tests/end-to-end/langflowShortcuts.spec.ts @@ -61,7 +61,7 @@ test("LangflowShortcuts", async ({ page }) => { await page .locator( - '//*[@id="react-flow-id"]/div[1]/div[1]/div[1]/div/div[2]/div[2]/div/div[1]/div/div[1]/div/div/div[1]', + '//*[@id="react-flow-id"]/div[1]/div[1]/div[1]/div/div[2]/div[2]/div/div[1]/div/div[1]/div/div/div[1]' ) .click(); await page.keyboard.press("Backspace"); @@ -84,7 +84,7 @@ test("LangflowShortcuts", async ({ page }) => { await page .locator( - '//*[@id="react-flow-id"]/div[1]/div[1]/div[1]/div/div[2]/div[2]/div/div[1]/div/div[1]/div/div/div[1]', + '//*[@id="react-flow-id"]/div[1]/div[1]/div[1]/div/div[2]/div[2]/div/div[1]/div/div[1]/div/div/div[1]' ) .click(); await page.keyboard.press("Backspace"); diff --git a/src/frontend/tests/end-to-end/nestedComponent.spec.ts b/src/frontend/tests/end-to-end/nestedComponent.spec.ts index 2df9c1b7b..3cd319576 100644 --- a/src/frontend/tests/end-to-end/nestedComponent.spec.ts +++ b/src/frontend/tests/end-to-end/nestedComponent.spec.ts @@ -41,7 +41,7 @@ test("NestedComponent", async ({ page }) => { await page.locator('//*[@id="showpool_threads"]').click(); expect( - await page.locator('//*[@id="showpool_threads"]').isChecked(), + await page.locator('//*[@id="showpool_threads"]').isChecked() ).toBeTruthy(); //showtext_key @@ -53,140 +53,140 @@ test("NestedComponent", async ({ page }) => { await page.locator('//*[@id="showindex_name"]').click(); expect( - await page.locator('//*[@id="showindex_name"]').isChecked(), + await page.locator('//*[@id="showindex_name"]').isChecked() ).toBeFalsy(); // shownamespace await page.locator('//*[@id="shownamespace"]').click(); expect( - await page.locator('//*[@id="shownamespace"]').isChecked(), + await page.locator('//*[@id="shownamespace"]').isChecked() ).toBeFalsy(); // showpinecone_api_key await page.locator('//*[@id="showpinecone_api_key"]').click(); expect( - await page.locator('//*[@id="showpinecone_api_key"]').isChecked(), + await page.locator('//*[@id="showpinecone_api_key"]').isChecked() ).toBeFalsy(); // showindex_name await page.locator('//*[@id="showindex_name"]').click(); expect( - await page.locator('//*[@id="showindex_name"]').isChecked(), + await page.locator('//*[@id="showindex_name"]').isChecked() ).toBeTruthy(); // shownamespace await page.locator('//*[@id="shownamespace"]').click(); expect( - await page.locator('//*[@id="shownamespace"]').isChecked(), + await page.locator('//*[@id="shownamespace"]').isChecked() ).toBeTruthy(); // showpinecone_api_key await page.locator('//*[@id="showpinecone_api_key"]').click(); expect( - await page.locator('//*[@id="showpinecone_api_key"]').isChecked(), + await page.locator('//*[@id="showpinecone_api_key"]').isChecked() ).toBeTruthy(); // showindex_name await page.locator('//*[@id="showindex_name"]').click(); expect( - await page.locator('//*[@id="showindex_name"]').isChecked(), + await page.locator('//*[@id="showindex_name"]').isChecked() ).toBeFalsy(); // shownamespace await page.locator('//*[@id="shownamespace"]').click(); expect( - await page.locator('//*[@id="shownamespace"]').isChecked(), + await page.locator('//*[@id="shownamespace"]').isChecked() ).toBeFalsy(); // showpinecone_api_key await page.locator('//*[@id="showpinecone_api_key"]').click(); expect( - await page.locator('//*[@id="showpinecone_api_key"]').isChecked(), + await page.locator('//*[@id="showpinecone_api_key"]').isChecked() ).toBeFalsy(); // showindex_name await page.locator('//*[@id="showindex_name"]').click(); expect( - await page.locator('//*[@id="showindex_name"]').isChecked(), + await page.locator('//*[@id="showindex_name"]').isChecked() ).toBeTruthy(); // shownamespace await page.locator('//*[@id="shownamespace"]').click(); expect( - await page.locator('//*[@id="shownamespace"]').isChecked(), + await page.locator('//*[@id="shownamespace"]').isChecked() ).toBeTruthy(); // showpinecone_api_key await page.locator('//*[@id="showpinecone_api_key"]').click(); expect( - await page.locator('//*[@id="showpinecone_api_key"]').isChecked(), + await page.locator('//*[@id="showpinecone_api_key"]').isChecked() ).toBeTruthy(); // showindex_name await page.locator('//*[@id="showindex_name"]').click(); expect( - await page.locator('//*[@id="showindex_name"]').isChecked(), + await page.locator('//*[@id="showindex_name"]').isChecked() ).toBeFalsy(); // shownamespace await page.locator('//*[@id="shownamespace"]').click(); expect( - await page.locator('//*[@id="shownamespace"]').isChecked(), + await page.locator('//*[@id="shownamespace"]').isChecked() ).toBeFalsy(); // showpinecone_api_key await page.locator('//*[@id="showpinecone_api_key"]').click(); expect( - await page.locator('//*[@id="showpinecone_api_key"]').isChecked(), + await page.locator('//*[@id="showpinecone_api_key"]').isChecked() ).toBeFalsy(); // showindex_name await page.locator('//*[@id="showindex_name"]').click(); expect( - await page.locator('//*[@id="showindex_name"]').isChecked(), + await page.locator('//*[@id="showindex_name"]').isChecked() ).toBeTruthy(); // shownamespace await page.locator('//*[@id="shownamespace"]').click(); expect( - await page.locator('//*[@id="shownamespace"]').isChecked(), + await page.locator('//*[@id="shownamespace"]').isChecked() ).toBeTruthy(); // showpinecone_api_key await page.locator('//*[@id="showpinecone_api_key"]').click(); expect( - await page.locator('//*[@id="showpinecone_api_key"]').isChecked(), + await page.locator('//*[@id="showpinecone_api_key"]').isChecked() ).toBeTruthy(); //showpool_threads await page.locator('//*[@id="showpool_threads"]').click(); expect( - await page.locator('//*[@id="showpool_threads"]').isChecked(), + await page.locator('//*[@id="showpool_threads"]').isChecked() ).toBeFalsy(); //showtext_key await page.locator('//*[@id="showtext_key"]').click(); expect( - await page.locator('//*[@id="showtext_key"]').isChecked(), + await page.locator('//*[@id="showtext_key"]').isChecked() ).toBeTruthy(); await page.getByText("Save Changes", { exact: true }).click(); diff --git a/src/frontend/tests/end-to-end/store.spec.ts b/src/frontend/tests/end-to-end/store.spec.ts index 8e443ecdd..13963d698 100644 --- a/src/frontend/tests/end-to-end/store.spec.ts +++ b/src/frontend/tests/end-to-end/store.spec.ts @@ -262,7 +262,7 @@ test("should share component with share button", async ({ page }) => { await page.getByText("Set workflow status to public").isVisible(); await page .getByText( - "Attention: API keys in specified fields are automatically removed upon sharing.", + "Attention: API keys in specified fields are automatically removed upon sharing." ) .isVisible(); await page.getByText("Export").first().isVisible(); diff --git a/src/frontend/tests/end-to-end/textAreaModalComponent.spec.ts b/src/frontend/tests/end-to-end/textAreaModalComponent.spec.ts index 9443586e6..fa4248a63 100644 --- a/src/frontend/tests/end-to-end/textAreaModalComponent.spec.ts +++ b/src/frontend/tests/end-to-end/textAreaModalComponent.spec.ts @@ -51,7 +51,7 @@ test("TextAreaModalComponent", async ({ page }) => { await page .getByTestId("textarea-text") .fill( - "test test test test test test test test test test test !@#%*)( 123456789101010101010101111111111 !!!!!!!!!!", + "test test test test test test test test test test test !@#%*)( 123456789101010101010101111111111 !!!!!!!!!!" ); await page.getByTestId("textarea-text-ExternalLink").click(); diff --git a/src/frontend/tests/end-to-end/toggleComponent.spec.ts b/src/frontend/tests/end-to-end/toggleComponent.spec.ts index 58d909af4..5a8d9a36a 100644 --- a/src/frontend/tests/end-to-end/toggleComponent.spec.ts +++ b/src/frontend/tests/end-to-end/toggleComponent.spec.ts @@ -45,7 +45,7 @@ test("ToggleComponent", async ({ page }) => { await page.locator('//*[@id="showload_hidden"]').click(); expect( - await page.locator('//*[@id="showload_hidden"]').isChecked(), + await page.locator('//*[@id="showload_hidden"]').isChecked() ).toBeTruthy(); await page.getByText("Save Changes", { exact: true }).click(); @@ -81,12 +81,12 @@ test("ToggleComponent", async ({ page }) => { await page.locator('//*[@id="showload_hidden"]').click(); expect( - await page.locator('//*[@id="showload_hidden"]').isChecked(), + await page.locator('//*[@id="showload_hidden"]').isChecked() ).toBeFalsy(); await page.locator('//*[@id="showmax_concurrency"]').click(); expect( - await page.locator('//*[@id="showmax_concurrency"]').isChecked(), + await page.locator('//*[@id="showmax_concurrency"]').isChecked() ).toBeTruthy(); await page.locator('//*[@id="showpath"]').click(); @@ -94,22 +94,22 @@ test("ToggleComponent", async ({ page }) => { await page.locator('//*[@id="showrecursive"]').click(); expect( - await page.locator('//*[@id="showrecursive"]').isChecked(), + await page.locator('//*[@id="showrecursive"]').isChecked() ).toBeTruthy(); await page.locator('//*[@id="showsilent_errors"]').click(); expect( - await page.locator('//*[@id="showsilent_errors"]').isChecked(), + await page.locator('//*[@id="showsilent_errors"]').isChecked() ).toBeTruthy(); await page.locator('//*[@id="showuse_multithreading"]').click(); expect( - await page.locator('//*[@id="showuse_multithreading"]').isChecked(), + await page.locator('//*[@id="showuse_multithreading"]').isChecked() ).toBeTruthy(); await page.locator('//*[@id="showmax_concurrency"]').click(); expect( - await page.locator('//*[@id="showmax_concurrency"]').isChecked(), + await page.locator('//*[@id="showmax_concurrency"]').isChecked() ).toBeFalsy(); await page.locator('//*[@id="showpath"]').click(); @@ -117,17 +117,17 @@ test("ToggleComponent", async ({ page }) => { await page.locator('//*[@id="showrecursive"]').click(); expect( - await page.locator('//*[@id="showrecursive"]').isChecked(), + await page.locator('//*[@id="showrecursive"]').isChecked() ).toBeFalsy(); await page.locator('//*[@id="showsilent_errors"]').click(); expect( - await page.locator('//*[@id="showsilent_errors"]').isChecked(), + await page.locator('//*[@id="showsilent_errors"]').isChecked() ).toBeFalsy(); await page.locator('//*[@id="showuse_multithreading"]').click(); expect( - await page.locator('//*[@id="showuse_multithreading"]').isChecked(), + await page.locator('//*[@id="showuse_multithreading"]').isChecked() ).toBeFalsy(); await page.getByText("Save Changes", { exact: true }).click(); @@ -144,38 +144,38 @@ test("ToggleComponent", async ({ page }) => { await page.locator('//*[@id="showload_hidden"]').click(); expect( - await page.locator('//*[@id="showload_hidden"]').isChecked(), + await page.locator('//*[@id="showload_hidden"]').isChecked() ).toBeTruthy(); expect( - await page.getByTestId("toggle-edit-load_hidden").isChecked(), + await page.getByTestId("toggle-edit-load_hidden").isChecked() ).toBeTruthy(); await page.getByText("Save Changes", { exact: true }).click(); await page.getByTestId("toggle-load_hidden").click(); expect( - await page.getByTestId("toggle-load_hidden").isChecked(), + await page.getByTestId("toggle-load_hidden").isChecked() ).toBeFalsy(); await page.getByTestId("toggle-load_hidden").click(); expect( - await page.getByTestId("toggle-load_hidden").isChecked(), + await page.getByTestId("toggle-load_hidden").isChecked() ).toBeTruthy(); await page.getByTestId("toggle-load_hidden").click(); expect( - await page.getByTestId("toggle-load_hidden").isChecked(), + await page.getByTestId("toggle-load_hidden").isChecked() ).toBeFalsy(); await page.getByTestId("toggle-load_hidden").click(); expect( - await page.getByTestId("toggle-load_hidden").isChecked(), + await page.getByTestId("toggle-load_hidden").isChecked() ).toBeTruthy(); await page.getByTestId("toggle-load_hidden").click(); expect( - await page.getByTestId("toggle-load_hidden").isChecked(), + await page.getByTestId("toggle-load_hidden").isChecked() ).toBeFalsy(); } });