fix: automatically update the page when scrolling

This commit is contained in:
jialin
2025-01-02 12:22:09 +08:00
parent e4b1dfc77a
commit d7de302393
17 changed files with 151 additions and 133 deletions
@@ -175,10 +175,7 @@ const GroundImages: React.FC<MessageProps> = forwardRef((props, ref) => {
};
const updateCacheFormData = (values: Record<string, any>) => {
cacheFormData.current = {
...cacheFormData.current,
...values
};
_.merge(cacheFormData.current, values);
};
const handleRandomPrompt = useCallback(() => {
@@ -555,10 +552,7 @@ const GroundImages: React.FC<MessageProps> = forwardRef((props, ref) => {
if (!isOpenaiCompatible) {
setParams((pre: object) => {
return {
...pre,
..._.pick(model?.meta, METAKEYS, {})
};
return _.merge({}, pre, _.pick(model?.meta, METAKEYS, {}));
});
form.current?.form?.setFieldsValue({
..._.pick(model?.meta, METAKEYS, {})