File tree 1 file changed +12
-1
lines changed
src/features/AgentSetting/AgentMeta
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import { memo } from 'react';
9
9
import { useTranslation } from 'react-i18next' ;
10
10
11
11
import { FORM_STYLE } from '@/const/layoutTokens' ;
12
+ import { featureFlagsSelectors , useServerConfigStore } from '@/store/serverConfig' ;
12
13
import { INBOX_SESSION_ID } from '@/const/session' ;
13
14
14
15
import { useStore } from '../store' ;
@@ -21,6 +22,8 @@ import BackgroundSwatches from './BackgroundSwatches';
21
22
const AgentMeta = memo ( ( ) => {
22
23
const { t } = useTranslation ( 'setting' ) ;
23
24
25
+ const { isAgentEditable } = useServerConfigStore ( featureFlagsSelectors ) ;
26
+
24
27
const [ hasSystemRole , updateMeta , autocompleteMeta , autocompleteAllMeta ] = useStore ( ( s ) => [
25
28
! ! s . config . systemRole ,
26
29
s . setAgentMeta ,
@@ -139,7 +142,15 @@ const AgentMeta = memo(() => {
139
142
title : t ( 'settingAgent.title' ) ,
140
143
} ;
141
144
142
- return < Form items = { [ metaData ] } itemsType = { 'group' } variant = { 'pure' } { ...FORM_STYLE } /> ;
145
+ return (
146
+ < Form
147
+ disabled = { ! isAgentEditable }
148
+ items = { [ metaData ] }
149
+ itemsType = { 'group' }
150
+ variant = { 'pure' }
151
+ { ...FORM_STYLE }
152
+ />
153
+ ) ;
143
154
} ) ;
144
155
145
156
export default AgentMeta ;
You can’t perform that action at this time.
0 commit comments