remove classname from edges on import
This commit is contained in:
parent
19d5445813
commit
2ba5678a1c
3 changed files with 24 additions and 22 deletions
|
|
@ -85,7 +85,9 @@ export function TabsProvider({ children }: { children: ReactNode }) {
|
||||||
if (cookie && Object.keys(templates).length > 0) {
|
if (cookie && Object.keys(templates).length > 0) {
|
||||||
let cookieObject: LangFlowState = JSON.parse(cookie);
|
let cookieObject: LangFlowState = JSON.parse(cookie);
|
||||||
cookieObject.flows.forEach((flow) => {
|
cookieObject.flows.forEach((flow) => {
|
||||||
flow.data.edges.forEach((edge) => {edge.className = "";})
|
flow.data.edges.forEach((edge) => {
|
||||||
|
edge.className = "";
|
||||||
|
});
|
||||||
flow.data.nodes.forEach((node) => {
|
flow.data.nodes.forEach((node) => {
|
||||||
if (Object.keys(templates[node.data.type]["template"]).length > 0) {
|
if (Object.keys(templates[node.data.type]["template"]).length > 0) {
|
||||||
node.data.node.base_classes =
|
node.data.node.base_classes =
|
||||||
|
|
@ -287,7 +289,9 @@ export function TabsProvider({ children }: { children: ReactNode }) {
|
||||||
const data = flow?.data ? flow.data : null;
|
const data = flow?.data ? flow.data : null;
|
||||||
const description = flow?.description ? flow.description : "";
|
const description = flow?.description ? flow.description : "";
|
||||||
if (data) {
|
if (data) {
|
||||||
data.edges.forEach((edge) => {edge.className = "";})
|
data.edges.forEach((edge) => {
|
||||||
|
edge.className = "";
|
||||||
|
});
|
||||||
data.nodes.forEach((node) => {
|
data.nodes.forEach((node) => {
|
||||||
if (Object.keys(templates[node.data.type]["template"]).length > 0) {
|
if (Object.keys(templates[node.data.type]["template"]).length > 0) {
|
||||||
node.data.node.base_classes =
|
node.data.node.base_classes =
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,7 @@ import { ReactComponent as ChromaSVG } from "./chroma.svg";
|
||||||
|
|
||||||
const ChromaIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
const ChromaIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
||||||
(props, ref) => {
|
(props, ref) => {
|
||||||
return (
|
return <ChromaSVG ref={ref} {...props} />;
|
||||||
<ChromaSVG ref={ref} {...props} />
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -124,23 +124,23 @@ export const nodeIcons: {
|
||||||
React.SVGProps<SVGSVGElement>
|
React.SVGProps<SVGSVGElement>
|
||||||
>;
|
>;
|
||||||
} = {
|
} = {
|
||||||
Chroma: ChromaIcon,
|
Chroma: ChromaIcon,
|
||||||
agents: RocketLaunchIcon,
|
agents: RocketLaunchIcon,
|
||||||
chains: LinkIcon,
|
chains: LinkIcon,
|
||||||
memories: CpuChipIcon,
|
memories: CpuChipIcon,
|
||||||
llms: LightBulbIcon,
|
llms: LightBulbIcon,
|
||||||
prompts: CommandLineIcon,
|
prompts: CommandLineIcon,
|
||||||
tools: WrenchIcon,
|
tools: WrenchIcon,
|
||||||
advanced: ComputerDesktopIcon,
|
advanced: ComputerDesktopIcon,
|
||||||
chat: Bars3CenterLeftIcon,
|
chat: Bars3CenterLeftIcon,
|
||||||
embeddings: FingerPrintIcon,
|
embeddings: FingerPrintIcon,
|
||||||
documentloaders: PaperClipIcon,
|
documentloaders: PaperClipIcon,
|
||||||
vectorstores: CircleStackIcon,
|
vectorstores: CircleStackIcon,
|
||||||
toolkits: WrenchScrewdriverIcon,
|
toolkits: WrenchScrewdriverIcon,
|
||||||
textsplitters: ScissorsIcon,
|
textsplitters: ScissorsIcon,
|
||||||
wrappers: GiftIcon,
|
wrappers: GiftIcon,
|
||||||
utilities: Squares2X2Icon,
|
utilities: Squares2X2Icon,
|
||||||
unknown: QuestionMarkCircleIcon,
|
unknown: QuestionMarkCircleIcon,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const bgColors = {
|
export const bgColors = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue