🔧 chore(frontend): update dependencies and formatting in package.json and postcss.config.js

🐛 fix(frontend): add missing semicolon in EditFlowSettingsComponent
The package.json and postcss.config.js files were updated to improve formatting and update dependencies. The EditFlowSettingsComponent had a missing semicolon which was added.

🔧 chore: fix formatting issues in multiple files
The changes in this commit are purely cosmetic and do not affect the functionality of the application. The changes include fixing formatting issues such as indentation, whitespace, and semicolons in multiple files. These changes improve the readability and maintainability of the codebase.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-06-15 10:20:14 -03:00
commit f6f9ef5a27
10 changed files with 9932 additions and 9933 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,106 +1,106 @@
{ {
"name": "langflow", "name": "langflow",
"version": "0.1.2", "version": "0.1.2",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@emotion/react": "^11.10.5", "@emotion/react": "^11.10.5",
"@emotion/styled": "^11.10.5", "@emotion/styled": "^11.10.5",
"@headlessui/react": "^1.7.10", "@headlessui/react": "^1.7.10",
"@heroicons/react": "^2.0.15", "@heroicons/react": "^2.0.15",
"@mui/material": "^5.11.9", "@mui/material": "^5.11.9",
"@radix-ui/react-dropdown-menu": "^2.0.5", "@radix-ui/react-dropdown-menu": "^2.0.5",
"@radix-ui/react-menubar": "^1.0.3", "@radix-ui/react-menubar": "^1.0.3",
"@radix-ui/react-separator": "^1.0.3", "@radix-ui/react-separator": "^1.0.3",
"@radix-ui/react-slot": "^1.0.2", "@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-tabs": "^1.0.4", "@radix-ui/react-tabs": "^1.0.4",
"@radix-ui/react-checkbox": "^1.0.4", "@radix-ui/react-checkbox": "^1.0.4",
"@radix-ui/react-dialog": "^1.0.4", "@radix-ui/react-dialog": "^1.0.4",
"@radix-ui/react-label": "^2.0.2", "@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-switch": "^1.0.3", "@radix-ui/react-switch": "^1.0.3",
"@radix-ui/react-tooltip": "^1.0.6", "@radix-ui/react-tooltip": "^1.0.6",
"@tabler/icons-react": "^2.18.0", "@tabler/icons-react": "^2.18.0",
"@tailwindcss/forms": "^0.5.3", "@tailwindcss/forms": "^0.5.3",
"@tailwindcss/line-clamp": "^0.4.4", "@tailwindcss/line-clamp": "^0.4.4",
"ace-builds": "^1.16.0", "ace-builds": "^1.16.0",
"add": "^2.0.6", "add": "^2.0.6",
"ansi-to-html": "^0.7.2", "ansi-to-html": "^0.7.2",
"axios": "^1.3.2", "axios": "^1.3.2",
"base64-js": "^1.5.1", "base64-js": "^1.5.1",
"class-variance-authority": "^0.6.0", "class-variance-authority": "^0.6.0",
"clsx": "^1.2.1", "clsx": "^1.2.1",
"esbuild": "^0.17.18", "esbuild": "^0.17.18",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"lucide-react": "^0.233.0", "lucide-react": "^0.233.0",
"react": "^18.2.0", "react": "^18.2.0",
"react-ace": "^10.1.0", "react-ace": "^10.1.0",
"react-cookie": "^4.1.1", "react-cookie": "^4.1.1",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-error-boundary": "^4.0.2", "react-error-boundary": "^4.0.2",
"react-icons": "^4.8.0", "react-icons": "^4.8.0",
"react-laag": "^2.0.5", "react-laag": "^2.0.5",
"react-markdown": "^8.0.7", "react-markdown": "^8.0.7",
"react-router-dom": "^6.8.1", "react-router-dom": "^6.8.1",
"react-syntax-highlighter": "^15.5.0", "react-syntax-highlighter": "^15.5.0",
"react-tabs": "^6.0.0", "react-tabs": "^6.0.0",
"react-tooltip": "^5.13.1", "react-tooltip": "^5.13.1",
"reactflow": "^11.5.5", "reactflow": "^11.5.5",
"rehype-mathjax": "^4.0.2", "rehype-mathjax": "^4.0.2",
"remark-gfm": "^3.0.1", "remark-gfm": "^3.0.1",
"remark-math": "^5.1.1", "remark-math": "^5.1.1",
"shadcn-ui": "^0.1.3", "shadcn-ui": "^0.1.3",
"short-unique-id": "^4.4.4", "short-unique-id": "^4.4.4",
"switch": "^0.0.0", "switch": "^0.0.0",
"table": "^6.8.1", "table": "^6.8.1",
"tailwind-merge": "^1.13.0", "tailwind-merge": "^1.13.0",
"tailwindcss-animate": "^1.0.5", "tailwindcss-animate": "^1.0.5",
"uuid": "^9.0.0", "uuid": "^9.0.0",
"vite-plugin-svgr": "^3.2.0", "vite-plugin-svgr": "^3.2.0",
"web-vitals": "^2.1.4" "web-vitals": "^2.1.4"
}, },
"scripts": { "scripts": {
"dev:docker": "vite --host 0.0.0.0", "dev:docker": "vite --host 0.0.0.0",
"start": "vite", "start": "vite",
"build": "vite build", "build": "vite build",
"serve": "vite preview", "serve": "vite preview",
"format": "npx prettier --write \"src/**/*.{js,jsx,ts,tsx,json,md}\"" "format": "npx prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\""
}, },
"eslintConfig": { "eslintConfig": {
"extends": [ "extends": [
"react-app", "react-app",
"react-app/jest" "react-app/jest"
] ]
}, },
"browserslist": { "browserslist": {
"production": [ "production": [
">0.2%", ">0.2%",
"not dead", "not dead",
"not op_mini all" "not op_mini all"
], ],
"development": [ "development": [
"last 1 chrome version", "last 1 chrome version",
"last 1 firefox version", "last 1 firefox version",
"last 1 safari version" "last 1 safari version"
] ]
}, },
"proxy": "http://127.0.0.1:7860", "proxy": "http://127.0.0.1:7860",
"devDependencies": { "devDependencies": {
"@swc/cli": "^0.1.62", "@swc/cli": "^0.1.62",
"@swc/core": "^1.3.62", "@swc/core": "^1.3.62",
"@tailwindcss/typography": "^0.5.9", "@tailwindcss/typography": "^0.5.9",
"@testing-library/jest-dom": "^5.16.5", "@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0", "@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0", "@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.5.2", "@types/jest": "^27.5.2",
"@types/lodash": "^4.14.194", "@types/lodash": "^4.14.194",
"@types/node": "^16.18.12", "@types/node": "^16.18.12",
"@types/react": "^18.0.28", "@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11", "@types/react-dom": "^18.0.11",
"@types/uuid": "^9.0.1", "@types/uuid": "^9.0.1",
"@vitejs/plugin-react-swc": "^3.0.0", "@vitejs/plugin-react-swc": "^3.0.0",
"autoprefixer": "^10.4.14", "autoprefixer": "^10.4.14",
"postcss": "^8.4.23", "postcss": "^8.4.23",
"tailwindcss": "^3.3.2", "tailwindcss": "^3.3.2",
"typescript": "^5.0.2", "typescript": "^5.0.2",
"vite": "^4.3.5" "vite": "^4.3.5"
} }
} }

View file

@ -3,4 +3,4 @@ module.exports = {
tailwindcss: {}, tailwindcss: {},
autoprefixer: {}, autoprefixer: {},
}, },
} };

View file

@ -34,7 +34,7 @@ export const EditFlowSettings: React.FC<InputProps> = ({
setIsMaxLength(false); setIsMaxLength(false);
} }
setName(value) setName(value);
}; };
const handleDescriptionChange = (event: ChangeEvent<HTMLTextAreaElement>) => { const handleDescriptionChange = (event: ChangeEvent<HTMLTextAreaElement>) => {

View file

@ -60,7 +60,7 @@ export default function BuildTrigger({
let finished = false; let finished = false;
const apiUrl = `/api/v1/build/stream/${flowId}`; const apiUrl = `/api/v1/build/stream/${flowId}`;
const eventSource = new EventSource(apiUrl); const eventSource = new EventSource(apiUrl);
try{ try {
eventSource.onmessage = (event) => { eventSource.onmessage = (event) => {
// If the event is parseable, return // If the event is parseable, return
if (!event.data) { if (!event.data) {
@ -70,14 +70,14 @@ export default function BuildTrigger({
// if the event is the end of the stream, close the connection // if the event is the end of the stream, close the connection
if (parsedData.end_of_stream) { if (parsedData.end_of_stream) {
eventSource.close(); eventSource.close();
return; return;
} }
// Otherwise, process the data // Otherwise, process the data
const isValid = processStreamResult(parsedData); const isValid = processStreamResult(parsedData);
validationResults.push(isValid); validationResults.push(isValid);
}; };
eventSource.onerror = (error) => { eventSource.onerror = (error) => {
console.error("EventSource failed:", error); console.error("EventSource failed:", error);
eventSource.close(); eventSource.close();
@ -89,9 +89,8 @@ export default function BuildTrigger({
} }
// Step 4: Return true if all nodes are valid, false otherwise // Step 4: Return true if all nodes are valid, false otherwise
return validationResults.every((result) => result); return validationResults.every((result) => result);
} } catch (e) {
catch(e){ console.log(e);
console.log(e)
eventSource.close(); eventSource.close();
return false; return false;
} }

View file

@ -50,7 +50,11 @@ export const MenuBar = ({ flows, tabId }) => {
<div className="flex items-center font-medium text-sm rounded-md py-1 px-1.5 gap-0.5"> <div className="flex items-center font-medium text-sm rounded-md py-1 px-1.5 gap-0.5">
<DropdownMenu> <DropdownMenu>
<DropdownMenuTrigger> <DropdownMenuTrigger>
<Button className="gap-2 flex items-center" variant="primary" size="sm"> <Button
className="gap-2 flex items-center"
variant="primary"
size="sm"
>
{current_flow.name} {current_flow.name}
<ChevronDown className="w-4 h-4" /> <ChevronDown className="w-4 h-4" />
</Button> </Button>

View file

@ -15,7 +15,8 @@ const buttonVariants = cva(
"border border-input hover:bg-accent hover:text-accent-foreground", "border border-input hover:bg-accent hover:text-accent-foreground",
primary: primary:
"border bg-background text-secondary-foreground hover:bg-background/80 hover:shadow-sm", "border bg-background text-secondary-foreground hover:bg-background/80 hover:shadow-sm",
secondary: "border border-muted bg-muted text-secondary-foreground hover:bg-secondary/80", secondary:
"border border-muted bg-muted text-secondary-foreground hover:bg-secondary/80",
ghost: "hover:bg-accent hover:text-accent-foreground", ghost: "hover:bg-accent hover:text-accent-foreground",
link: "underline-offset-4 hover:underline text-primary", link: "underline-offset-4 hover:underline text-primary",
}, },

View file

@ -280,7 +280,6 @@ export default function ChatModal({
if (ref.current) ref.current.scrollIntoView({ behavior: "smooth" }); if (ref.current) ref.current.scrollIntoView({ behavior: "smooth" });
}, [chatHistory]); }, [chatHistory]);
const ref = useRef(null); const ref = useRef(null);
useEffect(() => { useEffect(() => {

View file

@ -1,5 +1,5 @@
/** @type {import('tailwindcss').Config} */ /** @type {import('tailwindcss').Config} */
const { fontFamily } = require("tailwindcss/defaultTheme") const { fontFamily } = require("tailwindcss/defaultTheme");
import plugin from "tailwindcss/plugin"; import plugin from "tailwindcss/plugin";
@ -75,7 +75,7 @@ module.exports = {
}, },
}, },
plugins: [require("tailwindcss-animate")], plugins: [require("tailwindcss-animate")],
} };
module.exports = { module.exports = {
content: ["./index.html", "./src/**/*.{js,ts,tsx,jsx}"], content: ["./index.html", "./src/**/*.{js,ts,tsx,jsx}"],
@ -151,7 +151,7 @@ module.exports = {
"accordion-down": "accordion-down 0.2s ease-out", "accordion-down": "accordion-down 0.2s ease-out",
"accordion-up": "accordion-up 0.2s ease-out", "accordion-up": "accordion-up 0.2s ease-out",
"pulse-green": "pulseGreen 1s linear", "pulse-green": "pulseGreen 1s linear",
'spin-once': 'spin 1s linear 0.7' "spin-once": "spin 1s linear 0.7",
}, },
borderColor: { borderColor: {
"red-outline": "rgba(255, 0, 0, 0.8)", "red-outline": "rgba(255, 0, 0, 0.8)",
@ -181,17 +181,19 @@ module.exports = {
}, },
}, },
".truncate-multiline": { ".truncate-multiline": {
"display": "-webkit-box", display: "-webkit-box",
"-webkit-line-clamp": "3", /* Change this number to the number of lines you want to show */ "-webkit-line-clamp":
"3" /* Change this number to the number of lines you want to show */,
"-webkit-box-orient": "vertical", "-webkit-box-orient": "vertical",
"overflow": "hidden", overflow: "hidden",
"text-overflow": "ellipsis", "text-overflow": "ellipsis",
}, },
".truncate-doubleline": { ".truncate-doubleline": {
"display": "-webkit-box", display: "-webkit-box",
"-webkit-line-clamp": "2", /* Change this number to the number of lines you want to show */ "-webkit-line-clamp":
"2" /* Change this number to the number of lines you want to show */,
"-webkit-box-orient": "vertical", "-webkit-box-orient": "vertical",
"overflow": "hidden", overflow: "hidden",
"text-overflow": "ellipsis", "text-overflow": "ellipsis",
}, },
@ -240,4 +242,4 @@ module.exports = {
}), }),
require("@tailwindcss/typography"), require("@tailwindcss/typography"),
], ],
}; };

View file

@ -1,11 +1,7 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es5", "target": "es5",
"lib": [ "lib": ["dom", "dom.iterable", "esnext"],
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true, "allowJs": true,
"skipLibCheck": true, "skipLibCheck": true,
"esModuleInterop": true, "esModuleInterop": true,
@ -19,9 +15,7 @@
"isolatedModules": true, "isolatedModules": true,
"noEmit": true, "noEmit": true,
"jsx": "react-jsx", "jsx": "react-jsx",
"noImplicitAny": false, "noImplicitAny": false
}, },
"include": [ "include": ["src"]
"src"
]
} }