Remove unused imports and fix formatting issues
This commit is contained in:
parent
dc65f4681c
commit
7610fa2657
9 changed files with 52 additions and 27 deletions
|
|
@ -205,7 +205,7 @@ export default function CodeTabsComponent({
|
||||||
<div className="api-modal-according-display">
|
<div className="api-modal-according-display">
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(
|
||||||
"h-[70vh] w-full rounded-lg bg-muted overflow-y-auto overflow-x-hidden custom-scroll"
|
"h-[70vh] w-full overflow-y-auto overflow-x-hidden rounded-lg bg-muted custom-scroll"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{data?.map((node: any, i) => (
|
{data?.map((node: any, i) => (
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,28 @@
|
||||||
const SvgGoogleGenerativeAI = (props) => (<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" {...props}>
|
const SvgGoogleGenerativeAI = (props) => (
|
||||||
<path d="M16 8.016A8.522 8.522 0 008.016 16h-.032A8.521 8.521 0 000 8.016v-.032A8.521 8.521 0 007.984 0h.032A8.522 8.522 0 0016 7.984v.032z" fill="url(#prefix__paint0_radial_980_20147)"/>
|
<svg
|
||||||
<defs>
|
fill="none"
|
||||||
<radialGradient id="prefix__paint0_radial_980_20147" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(16.1326 5.4553 -43.70045 129.2322 1.588 6.503)">
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
<stop offset=".067" stop-color="#9168C0"/><stop offset=".343" stop-color="#5684D1"/><stop offset=".672" stop-color="#1BA1E3"/>
|
viewBox="0 0 16 16"
|
||||||
|
{...props}
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M16 8.016A8.522 8.522 0 008.016 16h-.032A8.521 8.521 0 000 8.016v-.032A8.521 8.521 0 007.984 0h.032A8.522 8.522 0 0016 7.984v.032z"
|
||||||
|
fill="url(#prefix__paint0_radial_980_20147)"
|
||||||
|
/>
|
||||||
|
<defs>
|
||||||
|
<radialGradient
|
||||||
|
id="prefix__paint0_radial_980_20147"
|
||||||
|
cx="0"
|
||||||
|
cy="0"
|
||||||
|
r="1"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(16.1326 5.4553 -43.70045 129.2322 1.588 6.503)"
|
||||||
|
>
|
||||||
|
<stop offset=".067" stop-color="#9168C0" />
|
||||||
|
<stop offset=".343" stop-color="#5684D1" />
|
||||||
|
<stop offset=".672" stop-color="#1BA1E3" />
|
||||||
</radialGradient>
|
</radialGradient>
|
||||||
</defs>
|
</defs>
|
||||||
</svg>
|
</svg>
|
||||||
);
|
);
|
||||||
export default SvgGoogleGenerativeAI;
|
export default SvgGoogleGenerativeAI;
|
||||||
|
|
|
||||||
|
|
@ -28,9 +28,7 @@ import {
|
||||||
LANGFLOW_SUPPORTED_TYPES,
|
LANGFLOW_SUPPORTED_TYPES,
|
||||||
limitScrollFieldsModal,
|
limitScrollFieldsModal,
|
||||||
} from "../../constants/constants";
|
} from "../../constants/constants";
|
||||||
import useAlertStore from "../../stores/alertStore";
|
|
||||||
import useFlowStore from "../../stores/flowStore";
|
import useFlowStore from "../../stores/flowStore";
|
||||||
import { useGlobalVariablesStore } from "../../stores/globalVariables";
|
|
||||||
import { NodeDataType } from "../../types/flow";
|
import { NodeDataType } from "../../types/flow";
|
||||||
import {
|
import {
|
||||||
convertObjToArray,
|
convertObjToArray,
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,9 @@ export default function IOFieldView({
|
||||||
case "TextInput":
|
case "TextInput":
|
||||||
return (
|
return (
|
||||||
<Textarea
|
<Textarea
|
||||||
className={`w-full custom-scroll ${left ? " min-h-32" : " h-full"}`}
|
className={`w-full custom-scroll ${
|
||||||
|
left ? " min-h-32" : " h-full"
|
||||||
|
}`}
|
||||||
placeholder={"Enter text..."}
|
placeholder={"Enter text..."}
|
||||||
value={node.data.node!.template["input_value"].value}
|
value={node.data.node!.template["input_value"].value}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
|
|
@ -54,7 +56,9 @@ export default function IOFieldView({
|
||||||
default:
|
default:
|
||||||
return (
|
return (
|
||||||
<Textarea
|
<Textarea
|
||||||
className={`w-full custom-scroll ${left ? " min-h-32" : " h-full"}`}
|
className={`w-full custom-scroll ${
|
||||||
|
left ? " min-h-32" : " h-full"
|
||||||
|
}`}
|
||||||
placeholder={"Enter text..."}
|
placeholder={"Enter text..."}
|
||||||
value={node.data.node!.template["input_value"]}
|
value={node.data.node!.template["input_value"]}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
|
|
@ -74,7 +78,9 @@ export default function IOFieldView({
|
||||||
case "TextOutput":
|
case "TextOutput":
|
||||||
return (
|
return (
|
||||||
<Textarea
|
<Textarea
|
||||||
className={`w-full custom-scroll ${left ? " min-h-32" : " h-full"}`}
|
className={`w-full custom-scroll ${
|
||||||
|
left ? " min-h-32" : " h-full"
|
||||||
|
}`}
|
||||||
placeholder={"Empty"}
|
placeholder={"Empty"}
|
||||||
// update to real value on flowPool
|
// update to real value on flowPool
|
||||||
value={
|
value={
|
||||||
|
|
@ -89,7 +95,9 @@ export default function IOFieldView({
|
||||||
default:
|
default:
|
||||||
return (
|
return (
|
||||||
<Textarea
|
<Textarea
|
||||||
className={`w-full custom-scroll ${left ? " min-h-32" : " h-full"}`}
|
className={`w-full custom-scroll ${
|
||||||
|
left ? " min-h-32" : " h-full"
|
||||||
|
}`}
|
||||||
placeholder={"Empty"}
|
placeholder={"Empty"}
|
||||||
// update to real value on flowPool
|
// update to real value on flowPool
|
||||||
value={
|
value={
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,11 @@ import Robot from "../../../../../assets/robot.png";
|
||||||
import SanitizedHTMLWrapper from "../../../../../components/SanitizedHTMLWrapper";
|
import SanitizedHTMLWrapper from "../../../../../components/SanitizedHTMLWrapper";
|
||||||
import CodeTabsComponent from "../../../../../components/codeTabsComponent";
|
import CodeTabsComponent from "../../../../../components/codeTabsComponent";
|
||||||
import IconComponent from "../../../../../components/genericIconComponent";
|
import IconComponent from "../../../../../components/genericIconComponent";
|
||||||
|
import useAlertStore from "../../../../../stores/alertStore";
|
||||||
import useFlowStore from "../../../../../stores/flowStore";
|
import useFlowStore from "../../../../../stores/flowStore";
|
||||||
import { chatMessagePropsType } from "../../../../../types/components";
|
import { chatMessagePropsType } from "../../../../../types/components";
|
||||||
import { classNames, cn } from "../../../../../utils/utils";
|
import { classNames, cn } from "../../../../../utils/utils";
|
||||||
import FileCard from "../fileComponent";
|
import FileCard from "../fileComponent";
|
||||||
import useAlertStore from "../../../../../stores/alertStore";
|
|
||||||
import { Message } from "@radix-ui/react-form";
|
|
||||||
|
|
||||||
export default function ChatMessage({
|
export default function ChatMessage({
|
||||||
chat,
|
chat,
|
||||||
|
|
@ -56,12 +55,15 @@ export default function ChatMessage({
|
||||||
setChatMessage((prev) => prev + parsedData.chunk);
|
setChatMessage((prev) => prev + parsedData.chunk);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
eventSource.current.onerror = (event:any) => {
|
eventSource.current.onerror = (event: any) => {
|
||||||
setIsStreaming(false);
|
setIsStreaming(false);
|
||||||
eventSource.current?.close();
|
eventSource.current?.close();
|
||||||
setStreamUrl(undefined);
|
setStreamUrl(undefined);
|
||||||
if(JSON.parse(event.data)?.error){
|
if (JSON.parse(event.data)?.error) {
|
||||||
setErrorData({title: "Error on Streaming", list: [JSON.parse(event.data)?.error]});
|
setErrorData({
|
||||||
|
title: "Error on Streaming",
|
||||||
|
list: [JSON.parse(event.data)?.error],
|
||||||
|
});
|
||||||
}
|
}
|
||||||
updateChat(chat, chatMessageRef.current);
|
updateChat(chat, chatMessageRef.current);
|
||||||
reject(new Error("Streaming failed"));
|
reject(new Error("Streaming failed"));
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import { useEffect, useRef, useState } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
import IconComponent from "../../../../components/genericIconComponent";
|
import IconComponent from "../../../../components/genericIconComponent";
|
||||||
import { NOCHATOUTPUT_NOTICE_ALERT } from "../../../../constants/alerts_constants";
|
|
||||||
import {
|
import {
|
||||||
CHAT_FIRST_INITIAL_TEXT,
|
CHAT_FIRST_INITIAL_TEXT,
|
||||||
CHAT_SECOND_INITIAL_TEXT,
|
CHAT_SECOND_INITIAL_TEXT,
|
||||||
|
|
|
||||||
|
|
@ -477,8 +477,8 @@ export default function Page({
|
||||||
<Background className="" />
|
<Background className="" />
|
||||||
{!view && (
|
{!view && (
|
||||||
<Controls
|
<Controls
|
||||||
className="[&>button]:bg-muted fill-foreground stroke-foreground text-primary
|
className="fill-foreground stroke-foreground text-primary [&>button]:border-b-border
|
||||||
[&>button]:border-b-border hover:[&>button]:bg-border"
|
[&>button]:bg-muted hover:[&>button]:bg-border"
|
||||||
></Controls>
|
></Controls>
|
||||||
)}
|
)}
|
||||||
<SelectionMenu
|
<SelectionMenu
|
||||||
|
|
|
||||||
|
|
@ -377,7 +377,7 @@ export default function ExtraSidebar(): JSX.Element {
|
||||||
Object.keys(dataFilter[SBSectionName]).length > 0 ? (
|
Object.keys(dataFilter[SBSectionName]).length > 0 ? (
|
||||||
<>
|
<>
|
||||||
<DisclosureComponent
|
<DisclosureComponent
|
||||||
isChild={false}
|
isChild={false}
|
||||||
openDisc={
|
openDisc={
|
||||||
getFilterEdge.length !== 0 || search.length !== 0
|
getFilterEdge.length !== 0 || search.length !== 0
|
||||||
? true
|
? true
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ import {
|
||||||
expandGroupNode,
|
expandGroupNode,
|
||||||
updateFlowPosition,
|
updateFlowPosition,
|
||||||
} from "../../../../utils/reactflowUtils";
|
} from "../../../../utils/reactflowUtils";
|
||||||
import { classNames, cn } from "../../../../utils/utils";
|
import { classNames } from "../../../../utils/utils";
|
||||||
import ToolbarSelectItem from "./toolbarSelectItem";
|
import ToolbarSelectItem from "./toolbarSelectItem";
|
||||||
|
|
||||||
export default function NodeToolbarComponent({
|
export default function NodeToolbarComponent({
|
||||||
|
|
@ -326,7 +326,8 @@ export default function NodeToolbarComponent({
|
||||||
if (
|
if (
|
||||||
selected &&
|
selected &&
|
||||||
!isGroup &&
|
!isGroup &&
|
||||||
(event.ctrlKey || event.metaKey) && event.shiftKey&&
|
(event.ctrlKey || event.metaKey) &&
|
||||||
|
event.shiftKey &&
|
||||||
event.key === "A"
|
event.key === "A"
|
||||||
) {
|
) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
@ -411,13 +412,12 @@ export default function NodeToolbarComponent({
|
||||||
<button
|
<button
|
||||||
data-testid="save-button-modal"
|
data-testid="save-button-modal"
|
||||||
className={classNames(
|
className={classNames(
|
||||||
"relative -ml-px inline-flex items-center bg-background px-2 py-2 text-foreground shadow-md ring-1 ring-inset ring-ring transition-all duration-500 ease-in-out hover:bg-muted focus:z-10",
|
"relative -ml-px inline-flex items-center bg-background px-2 py-2 text-foreground shadow-md ring-1 ring-inset ring-ring transition-all duration-500 ease-in-out hover:bg-muted focus:z-10"
|
||||||
)}
|
)}
|
||||||
onClick={(event) => {
|
onClick={(event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
handleSelectChange("duplicate");
|
handleSelectChange("duplicate");
|
||||||
}
|
}}
|
||||||
}
|
|
||||||
>
|
>
|
||||||
<IconComponent name="Copy" className="h-4 w-4" />
|
<IconComponent name="Copy" className="h-4 w-4" />
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue