diff --git a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx index 71c3e3ab0..936afe8df 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx @@ -33,7 +33,7 @@ import { nodeIconsLucide, nodeNames, } from "../../../../utils/styleUtils"; -import { classNames, groupByFamily } from "../../../../utils/utils"; +import { classNames, extractIdFromLongId, groupByFamily } from "../../../../utils/utils"; export default function ParameterComponent({ left, @@ -48,6 +48,7 @@ export default function ParameterComponent({ required = false, optionalHandle = null, info = "", + proxy }: ParameterComponentType): JSX.Element { const ref = useRef(null); const refHtml = useRef(null); @@ -98,7 +99,6 @@ export default function ParameterComponent({ }; useEffect(() => { - if (name === "openai_api_base") console.log(info); // @ts-ignore infoHtml.current = (
@@ -185,7 +185,9 @@ export default function ParameterComponent({ (info !== "" ? " flex items-center" : "") } > - {title} + {proxy ? ({proxy.id}}> + {title} + ):title} {required ? " *" : ""}
{info !== "" && ( diff --git a/src/frontend/src/CustomNodes/GenericNode/index.tsx b/src/frontend/src/CustomNodes/GenericNode/index.tsx index 27c5d3db4..b9ab48432 100644 --- a/src/frontend/src/CustomNodes/GenericNode/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/index.tsx @@ -274,6 +274,7 @@ export default function GenericNode({ optionalHandle={ data.node?.template[templateField].input_types } + proxy={data.node?.template[templateField].proxy} /> ) : ( <> diff --git a/src/frontend/src/types/components/index.ts b/src/frontend/src/types/components/index.ts index 730305de2..a55ab13cc 100644 --- a/src/frontend/src/types/components/index.ts +++ b/src/frontend/src/types/components/index.ts @@ -49,6 +49,7 @@ export type ParameterComponentType = { dataContext?: typesContextType; optionalHandle?: Array | null; info?: string; + proxy?: {field: string, id: string}; }; export type InputListComponentType = { value: string[]; diff --git a/src/frontend/src/utils/reactflowUtils.ts b/src/frontend/src/utils/reactflowUtils.ts index 357fa2113..ca95983bb 100644 --- a/src/frontend/src/utils/reactflowUtils.ts +++ b/src/frontend/src/utils/reactflowUtils.ts @@ -584,8 +584,8 @@ export function mergeNodeTemplates({ ? nodeTemplate[key].display_name : nodeTemplate[key].name ? toTitleCase(nodeTemplate[key].name) - : toTitleCase(key)) + " - "+ truncateDisplayName(node.data.node?.display_name!) +"-" + - extractIdFromLongId(node.data.id) + : toTitleCase(key)) + " - "+ truncateDisplayName(node.data.node?.display_name!) + } } });