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