Feat: Exclude operator_permission field from renaming chat fields #3221 (#9692)

### What problem does this PR solve?

Feat: Exclude operator_permission field from renaming chat fields #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-08-25 14:06:06 +08:00
committed by GitHub
parent 23d0b564d3
commit e40be8e541
3 changed files with 7 additions and 4 deletions

View File

@ -9,6 +9,7 @@ import {
setLLMSettingEnabledValues,
} from '@/utils/form';
import { zodResolver } from '@hookform/resolvers/zod';
import { omit } from 'lodash';
import { X } from 'lucide-react';
import { useEffect } from 'react';
import { useForm } from 'react-hook-form';
@ -69,7 +70,7 @@ export function ChatSettings({ switchSettingVisible }: ChatSettingsProps) {
? await transformFile2Base64(icon[0])
: '';
setDialog({
...data,
...omit(data, 'operator_permission'),
...nextValues,
icon: avatar,
dialog_id: id,

View File

@ -48,7 +48,10 @@ export const useRenameChat = () => {
const nextChat = {
...(isEmpty(chat)
? InitialData
: { ...omit(chat, 'nickname', 'tenant_avatar'), dialog_id: chat.id }),
: {
...omit(chat, 'nickname', 'tenant_avatar', 'operator_permission'),
dialog_id: chat.id,
}),
name,
};
const ret = await setDialog(nextChat);