Formated code
This commit is contained in:
parent
e40628a069
commit
d09e07e12d
7 changed files with 24 additions and 18 deletions
|
|
@ -89,8 +89,7 @@ export default function GenericNode({
|
|||
</ShadTooltip>
|
||||
</div>
|
||||
</div>
|
||||
<div className="round-button-div">
|
||||
</div>
|
||||
<div className="round-button-div"></div>
|
||||
<div className="round-button-div">
|
||||
<div>
|
||||
<Tooltip
|
||||
|
|
@ -111,7 +110,9 @@ export default function GenericNode({
|
|||
{validationStatus.params
|
||||
? validationStatus.params
|
||||
.split("\n")
|
||||
.map((line: string, index: number) => <div key={index}>{line}</div>)
|
||||
.map((line: string, index: number) => (
|
||||
<div key={index}>{line}</div>
|
||||
))
|
||||
: ""}
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@ import { postBuildInit } from "../../../controllers/API";
|
|||
import { FlowType } from "../../../types/flow";
|
||||
|
||||
import { TabsContext } from "../../../contexts/tabsContext";
|
||||
import { parsedDataType } from "../../../types/components";
|
||||
import { validateNodes } from "../../../utils/reactflowUtils";
|
||||
import RadialProgressComponent from "../../RadialProgress";
|
||||
import IconComponent from "../../genericIconComponent";
|
||||
import { parsedDataType } from "../../../types/components";
|
||||
|
||||
export default function BuildTrigger({
|
||||
open,
|
||||
|
|
@ -129,7 +129,7 @@ export default function BuildTrigger({
|
|||
// Process each chunk of data here
|
||||
// Parse the chunk and update the context
|
||||
try {
|
||||
console.log(parsedData)
|
||||
console.log(parsedData);
|
||||
updateSSEData({ [parsedData.id]: parsedData });
|
||||
} catch (err) {
|
||||
console.log("Error parsing stream data: ", err);
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@ import { limitScrollFieldsModal } from "../../constants/constants";
|
|||
import { PopUpContext } from "../../contexts/popUpContext";
|
||||
import { TabsContext } from "../../contexts/tabsContext";
|
||||
import { typesContext } from "../../contexts/typesContext";
|
||||
import { editNodeToggleType } from "../../types/components";
|
||||
import { NodeDataType } from "../../types/flow";
|
||||
import { classNames } from "../../utils/utils";
|
||||
import { editNodeToggleType } from "../../types/components";
|
||||
|
||||
export default function EditNodeModal({
|
||||
data,
|
||||
|
|
@ -88,7 +88,10 @@ export default function EditNodeModal({
|
|||
setNodeValue(!nodeValue);
|
||||
}
|
||||
|
||||
const handleOnNewValue = (newValue: string | string[] | boolean, name: string): void => {
|
||||
const handleOnNewValue = (
|
||||
newValue: string | string[] | boolean,
|
||||
name: string
|
||||
): void => {
|
||||
data.node.template[name].value = newValue;
|
||||
// Set state to pending
|
||||
setTabsState((prev) => {
|
||||
|
|
@ -182,7 +185,7 @@ export default function EditNodeModal({
|
|||
: data.node.template[n].value
|
||||
}
|
||||
onChange={(t: string[]) => {
|
||||
console.log(t)
|
||||
console.log(t);
|
||||
handleOnNewValue(t, n);
|
||||
}}
|
||||
/>
|
||||
|
|
@ -233,7 +236,7 @@ export default function EditNodeModal({
|
|||
}}
|
||||
/>
|
||||
</div>
|
||||
) : data.node.template[n].type === "str" &&
|
||||
) : data.node.template[n].type === "str" &&
|
||||
data.node.template[n].options ? (
|
||||
<div className="mx-auto">
|
||||
<Dropdown
|
||||
|
|
|
|||
|
|
@ -3,7 +3,11 @@ import { useState } from "react";
|
|||
import IconComponent from "../../../components/genericIconComponent";
|
||||
import { fileCardPropsType } from "../../../types/components";
|
||||
|
||||
export default function FileCard({ fileName, content, fileType }: fileCardPropsType): JSX.Element {
|
||||
export default function FileCard({
|
||||
fileName,
|
||||
content,
|
||||
fileType,
|
||||
}: fileCardPropsType): JSX.Element {
|
||||
const handleDownload = (): void => {
|
||||
const byteArray = new Uint8Array(base64js.toByteArray(content));
|
||||
const blob = new Blob([byteArray], { type: "application/octet-stream" });
|
||||
|
|
@ -56,8 +60,7 @@ export default function FileCard({ fileName, content, fileType }: fileCardPropsT
|
|||
return (
|
||||
<button onClick={handleDownload} className="file-card-modal-button">
|
||||
<div className="file-card-modal-div">
|
||||
ooooooooooooooo
|
||||
{" "}
|
||||
ooooooooooooooo{" "}
|
||||
{fileType === "image" ? (
|
||||
<img
|
||||
src={`data:image/png;base64,${content}`}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import ShadTooltip from "../../../../components/ShadTooltipComponent";
|
|||
import IconComponent from "../../../../components/genericIconComponent";
|
||||
import { TabsContext } from "../../../../contexts/tabsContext";
|
||||
import EditNodeModal from "../../../../modals/EditNodeModal";
|
||||
import { classNames } from "../../../../utils/utils";
|
||||
import { nodeToolbarPropsType } from "../../../../types/components";
|
||||
import { classNames } from "../../../../utils/utils";
|
||||
|
||||
const NodeToolbarComponent = (props: nodeToolbarPropsType): JSX.Element => {
|
||||
const [nodeLength, setNodeLength] = useState(
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ export type sendAllProps = {
|
|||
name: string;
|
||||
description: string;
|
||||
viewport: Viewport;
|
||||
inputs: { text: string; };
|
||||
inputs: { text: string };
|
||||
|
||||
chatHistory: { message: string | object; isSend: boolean }[];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
import { ReactElement, ReactNode, RefObject } from "react";
|
||||
import { ReactElement, ReactNode } from "react";
|
||||
import { APIClassType } from "../api";
|
||||
import { FlowStyleType, NodeDataType } from "../flow/index";
|
||||
import { typesContextType } from "../typesContext";
|
||||
import { BlobOptions } from "buffer";
|
||||
|
||||
export type InputComponentType = {
|
||||
value: string;
|
||||
|
|
@ -481,7 +480,7 @@ export type editNodeToggleType = {
|
|||
export interface Props {
|
||||
language: string;
|
||||
value: string;
|
||||
};
|
||||
}
|
||||
|
||||
export type fileCardPropsType = {
|
||||
fileName: string;
|
||||
|
|
@ -493,7 +492,7 @@ export type nodeToolbarPropsType = {
|
|||
data: NodeDataType;
|
||||
deleteNode: (idx: string) => void;
|
||||
openPopUp: (element: JSX.Element) => void;
|
||||
}
|
||||
};
|
||||
|
||||
export type parsedDataType = {
|
||||
id: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue