feat(editor): Improve manual description in nodes as tools (#15373)

This commit is contained in:
Ricardo Espinoza
2025-05-15 10:45:16 -04:00
committed by GitHub
parent fea5b1633a
commit 726438d95e
7 changed files with 584 additions and 33 deletions

View File

@@ -497,6 +497,7 @@ const valueChanged = (parameterData: IUpdateInformation) => {
_node,
nodeType,
);
const oldNodeParameters = Object.assign({}, nodeParameters);
// Copy the data because it is the data of vuex so make sure that
@@ -547,6 +548,18 @@ const valueChanged = (parameterData: IUpdateInformation) => {
nodeType,
);
if (isToolNode.value) {
const updatedDescription = NodeHelpers.getUpdatedToolDescription(
props.nodeType,
nodeParameters,
node.value?.parameters,
);
if (updatedDescription && nodeParameters) {
nodeParameters.toolDescription = updatedDescription;
}
}
for (const key of Object.keys(nodeParameters as object)) {
if (nodeParameters && nodeParameters[key] !== null && nodeParameters[key] !== undefined) {
setValue(`parameters.${key}`, nodeParameters[key] as string);