feat(app): update default runtime mode and adjust runtime selection component styling

This commit is contained in:
Harry
2026-01-09 18:07:52 +08:00
parent 95d62039b1
commit 5c8b80b01a
4 changed files with 23 additions and 23 deletions

View File

@ -41,7 +41,7 @@ type CreateAppProps = {
defaultAppMode?: AppModeEnum
}
type RuntimeMode = 'classical' | 'new'
type RuntimeMode = 'sandboxed' | 'classic'
type RuntimeOption = {
label: string
@ -63,7 +63,7 @@ function CreateApp({ onClose, onSuccess, onCreateFromTemplate, defaultAppMode }:
const [name, setName] = useState('')
const [description, setDescription] = useState('')
const [isAppTypeExpanded, setIsAppTypeExpanded] = useState(false)
const [runtimeMode, setRuntimeMode] = useState<RuntimeMode>('classical')
const [runtimeMode, setRuntimeMode] = useState<RuntimeMode>('sandboxed')
const { plan, enableBilling } = useProviderContext()
const isAppsFull = (enableBilling && plan.usage.buildApps >= plan.total.buildApps)
@ -76,7 +76,7 @@ function CreateApp({ onClose, onSuccess, onCreateFromTemplate, defaultAppMode }:
setIsAppTypeExpanded(true)
if (appMode !== AppModeEnum.WORKFLOW && appMode !== AppModeEnum.ADVANCED_CHAT)
setRuntimeMode('classical')
setRuntimeMode('classic')
}, [appMode])
const onCreate = useCallback(async () => {
@ -101,7 +101,7 @@ function CreateApp({ onClose, onSuccess, onCreateFromTemplate, defaultAppMode }:
mode: appMode,
})
if (runtimeMode === 'new' && (appMode === AppModeEnum.WORKFLOW || appMode === AppModeEnum.ADVANCED_CHAT))
if (runtimeMode === 'sandboxed' && (appMode === AppModeEnum.WORKFLOW || appMode === AppModeEnum.ADVANCED_CHAT))
localStorage.setItem(`${WORKFLOW_RUNTIME_STORAGE_KEY_PREFIX}${app.id}`, '1')
// Track app creation success
@ -287,21 +287,21 @@ function CreateApp({ onClose, onSuccess, onCreateFromTemplate, defaultAppMode }:
<CustomSelect<RuntimeOption>
options={[
{
label: t('newApp.runtimeOptionNew', { ns: 'app' }),
value: 'new',
description: t('newApp.runtimeOptionNewDescription', { ns: 'app' }),
label: t('newApp.runtimeOptionSandboxed', { ns: 'app' }),
value: 'sandboxed',
description: t('newApp.runtimeOptionSandboxedDescription', { ns: 'app' }),
recommended: true,
},
{
label: t('newApp.runtimeOptionClassical', { ns: 'app' }),
value: 'classical',
description: t('newApp.runtimeOptionClassicalDescription', { ns: 'app' }),
label: t('newApp.runtimeOptionClassic', { ns: 'app' }),
value: 'classic',
description: t('newApp.runtimeOptionClassicDescription', { ns: 'app' }),
},
]}
value={runtimeMode}
onChange={value => setRuntimeMode(value as RuntimeMode)}
triggerProps={{
className: '!h-8 !rounded-lg !bg-components-input-bg-normal !px-2 !py-1',
className: 'px-3',
}}
popupProps={{
wrapperClassName: 'z-[60]',

View File

@ -176,10 +176,10 @@
"newApp.previewDemo": "Preview demo",
"newApp.recommended": "RECOMMENDED",
"newApp.runtimeLabel": "Runtime",
"newApp.runtimeOptionClassical": "Classic",
"newApp.runtimeOptionClassicalDescription": "Classic runtime for compatibility, without Skill support",
"newApp.runtimeOptionNew": "Sandboxed",
"newApp.runtimeOptionNewDescription": "Secure runtime with Skill support",
"newApp.runtimeOptionClassic": "Classic",
"newApp.runtimeOptionClassicDescription": "Classic runtime for compatibility, without Skill support",
"newApp.runtimeOptionSandboxed": "Sandboxed",
"newApp.runtimeOptionSandboxedDescription": "Secure runtime with Skill support",
"newApp.showTemplates": "I want to choose from a template",
"newApp.startFromBlank": "Create from Blank",
"newApp.startFromTemplate": "Create from Template",

View File

@ -175,10 +175,10 @@
"newApp.previewDemo": "デモをプレビュー",
"newApp.recommended": "推奨",
"newApp.runtimeLabel": "ランタイム",
"newApp.runtimeOptionClassical": "クラシック",
"newApp.runtimeOptionClassicalDescription": "互換性のあるクラシックランタイム、Skill非対応",
"newApp.runtimeOptionNew": "サンドボックス",
"newApp.runtimeOptionNewDescription": "Skill対応のセキュアランタイム",
"newApp.runtimeOptionClassic": "クラシック",
"newApp.runtimeOptionClassicDescription": "互換性のあるクラシックランタイム、Skill非対応",
"newApp.runtimeOptionSandboxed": "サンドボックス",
"newApp.runtimeOptionSandboxedDescription": "Skill対応のセキュアランタイム",
"newApp.showTemplates": "テンプレートから選択したい",
"newApp.startFromBlank": "最初から作成",
"newApp.startFromTemplate": "テンプレートから作成",

View File

@ -175,10 +175,10 @@
"newApp.previewDemo": "预览 Demo",
"newApp.recommended": "推荐",
"newApp.runtimeLabel": "运行时",
"newApp.runtimeOptionClassical": "经典版",
"newApp.runtimeOptionClassicalDescription": "经典运行时,兼容性好,不支持 Skill",
"newApp.runtimeOptionNew": "沙箱版",
"newApp.runtimeOptionNewDescription": "安全运行时,支持 Skill",
"newApp.runtimeOptionClassic": "经典版",
"newApp.runtimeOptionClassicDescription": "经典运行时,兼容性好,不支持 Skill",
"newApp.runtimeOptionSandboxed": "沙箱版",
"newApp.runtimeOptionSandboxedDescription": "安全运行时,支持 Skill",
"newApp.showTemplates": "我想从范例模板中选择",
"newApp.startFromBlank": "创建空白应用",
"newApp.startFromTemplate": "从应用模板创建",