mirror of https://github.com/langgenius/dify.git
chore: instruction and vars to readonly
This commit is contained in:
parent
67bb14d3ee
commit
1539d86f7d
|
|
@ -19,6 +19,7 @@ import { ModelModeType } from '@/types/app'
|
|||
|
||||
const Config: FC = () => {
|
||||
const {
|
||||
readonly,
|
||||
mode,
|
||||
isAdvancedMode,
|
||||
modelModeType,
|
||||
|
|
@ -66,16 +67,20 @@ const Config: FC = () => {
|
|||
promptTemplate={promptTemplate}
|
||||
promptVariables={promptVariables}
|
||||
onChange={handlePromptChange}
|
||||
readonly={readonly}
|
||||
/>
|
||||
|
||||
{/* Variables */}
|
||||
<ConfigVar
|
||||
promptVariables={promptVariables}
|
||||
onPromptVariablesChange={handlePromptVariablesNameChange}
|
||||
readonly={readonly}
|
||||
/>
|
||||
|
||||
{/* Dataset */}
|
||||
<DatasetConfig />
|
||||
<DatasetConfig
|
||||
// readonly={readonly}
|
||||
/>
|
||||
|
||||
{/* Tools */}
|
||||
{isAgent && (
|
||||
|
|
|
|||
|
|
@ -209,6 +209,7 @@ const Configuration: FC<Props> = ({
|
|||
</div>
|
||||
}
|
||||
const value = {
|
||||
readonly: true,
|
||||
appId,
|
||||
isAPIKeySet: true,
|
||||
isTrailFinished: false,
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import type { Collection } from '@/app/components/tools/types'
|
|||
import { noop } from 'lodash-es'
|
||||
|
||||
type IDebugConfiguration = {
|
||||
readonly?: boolean
|
||||
appId: string
|
||||
isAPIKeySet: boolean
|
||||
isTrailFinished: boolean
|
||||
|
|
@ -108,6 +109,7 @@ type IDebugConfiguration = {
|
|||
}
|
||||
|
||||
const DebugConfigurationContext = createContext<IDebugConfiguration>({
|
||||
readonly: false,
|
||||
appId: '',
|
||||
isAPIKeySet: false,
|
||||
isTrailFinished: false,
|
||||
|
|
|
|||
Loading…
Reference in New Issue