mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 17:38:04 +08:00
refactor: rename new runtime as sandbox feature
This commit is contained in:
@ -54,7 +54,7 @@ export const createFeaturesStore = (initProps?: Partial<FeaturesState>) => {
|
||||
annotationReply: {
|
||||
enabled: false,
|
||||
},
|
||||
runtime: {
|
||||
sandbox: {
|
||||
enabled: false,
|
||||
},
|
||||
},
|
||||
|
||||
@ -91,7 +91,7 @@ export enum FeatureEnum {
|
||||
moderation = 'moderation',
|
||||
file = 'file',
|
||||
annotationReply = 'annotationReply',
|
||||
runtime = 'runtime',
|
||||
sandbox = 'sandbox',
|
||||
}
|
||||
|
||||
export type Features = {
|
||||
@ -104,7 +104,7 @@ export type Features = {
|
||||
[FeatureEnum.moderation]?: SensitiveWordAvoidance
|
||||
[FeatureEnum.file]?: FileUpload
|
||||
[FeatureEnum.annotationReply]?: AnnotationReplyConfig
|
||||
[FeatureEnum.runtime]?: Runtime
|
||||
[FeatureEnum.sandbox]?: Runtime
|
||||
}
|
||||
|
||||
export type OnFeaturesChange = (features?: Features) => void
|
||||
|
||||
@ -71,7 +71,7 @@ export const useNodesSyncDraft = () => {
|
||||
retriever_resource: features.citation,
|
||||
sensitive_word_avoidance: features.moderation,
|
||||
file_upload: features.file,
|
||||
runtime: features.runtime,
|
||||
sandbox: features.sandbox,
|
||||
},
|
||||
environment_variables: environmentVariables,
|
||||
conversation_variables: conversationVariables,
|
||||
|
||||
@ -99,7 +99,7 @@ export const useWorkflowInit = () => {
|
||||
},
|
||||
features: {
|
||||
retriever_resource: { enabled: true },
|
||||
runtime: { enabled: enableSandboxRuntime },
|
||||
sandbox: { enabled: enableSandboxRuntime },
|
||||
},
|
||||
environment_variables: [],
|
||||
conversation_variables: [],
|
||||
|
||||
@ -748,7 +748,7 @@ export const useWorkflowRun = () => {
|
||||
citation: publishedWorkflow.features.retriever_resource,
|
||||
moderation: publishedWorkflow.features.sensitive_word_avoidance,
|
||||
file: publishedWorkflow.features.file_upload,
|
||||
runtime: publishedWorkflow.features.runtime || { enabled: false },
|
||||
sandbox: publishedWorkflow.features.sandbox || { enabled: false },
|
||||
}
|
||||
|
||||
featuresStore?.setState({ features: mappedFeatures })
|
||||
|
||||
@ -192,7 +192,7 @@ const WorkflowAppWithAdditionalContext = () => {
|
||||
text2speech: features.text_to_speech || { enabled: false },
|
||||
citation: features.retriever_resource || { enabled: false },
|
||||
moderation: features.sensitive_word_avoidance || { enabled: false },
|
||||
runtime: features.runtime || { enabled: false },
|
||||
sandbox: features.sandbox || { enabled: false },
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@ -121,7 +121,7 @@ const UpdateDSLModal = ({
|
||||
text2speech: features.text_to_speech || { enabled: false },
|
||||
citation: features.retriever_resource || { enabled: false },
|
||||
moderation: features.sensitive_word_avoidance || { enabled: false },
|
||||
runtime: features.runtime || { enabled: false },
|
||||
sandbox: features.sandbox || { enabled: false },
|
||||
}
|
||||
|
||||
eventEmitter?.emit({
|
||||
|
||||
Reference in New Issue
Block a user