Feat: Convert the data of the messge operator to a string array #3221 (#7853)

### What problem does this PR solve?

Feat: Convert the data of the messge operator to a string array #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-05-26 16:56:50 +08:00
committed by GitHub
parent c7db0eaca6
commit c09bd9fe4a
4 changed files with 33 additions and 5 deletions

View File

@ -5,7 +5,7 @@ import { useCallback, useEffect } from 'react';
import { UseFormReturn } from 'react-hook-form';
import { Operator } from '../constant';
import useGraphStore from '../store';
import { buildCategorizeObjectFromList } from '../utils';
import { buildCategorizeObjectFromList, convertToStringArray } from '../utils';
export const useHandleFormValuesChange = (
operatorName: Operator,
@ -87,6 +87,10 @@ export const useHandleFormValuesChange = (
}
if (operatorName === Operator.Message) {
nextValues = {
...value,
content: convertToStringArray(value.content),
};
}
// Manually triggered form updates are synchronized to the canvas