feat(web): multi_agent type app support collaboration type

This commit is contained in:
zhaoying
2026-01-07 17:50:07 +08:00
parent 030a141c64
commit 75d5121234
3 changed files with 15 additions and 16 deletions

View File

@@ -1131,10 +1131,10 @@ export const en = {
promptEmpty: 'Describe your use case on the left, and the orchestration preview will be displayed here.', promptEmpty: 'Describe your use case on the left, and the orchestration preview will be displayed here.',
master: 'Supervisor Mode', master: 'Supervisor Mode',
master_agent: 'Supervisor Mode', supervisor: 'Supervisor Mode',
master_agentDesc: 'Unified scheduling and management by the main Agent, with sub-Agents executing tasks assigned by the supervisor, suitable for scenarios requiring centralized control.', supervisorDesc: 'Unified scheduling and management by the main Agent, with sub-Agents executing tasks assigned by the supervisor, suitable for scenarios requiring centralized control.',
handoffs: 'Collaboration Mode', collaboration: 'Collaboration Mode',
handoffsDesc: 'Multiple Agents collaborate equally, autonomously coordinating according to task requirements, suitable for complex scenarios requiring flexible interaction.', collaborationDesc: 'Multiple Agents collaborate equally, autonomously coordinating according to task requirements, suitable for complex scenarios requiring flexible interaction.',
masterConfig: 'Supervisor Configuration', masterConfig: 'Supervisor Configuration',
orchestrationMode: 'Task Assignment Strategy', orchestrationMode: 'Task Assignment Strategy',
conditional: 'Intelligent Assignment', conditional: 'Intelligent Assignment',

View File

@@ -620,10 +620,10 @@ export const zh = {
promptEmpty: '在左侧描述您的用例,编排预览将在此处显示。', promptEmpty: '在左侧描述您的用例,编排预览将在此处显示。',
master: '主管模式', master: '主管模式',
master_agent: '主管模式', supervisor: '主管模式',
master_agentDesc: '由主 Agent 统一调度和管理,子 Agent 按照主管分配的任务执行,适合需要集中控制的场景。', supervisorDesc: '由主 Agent 统一调度和管理,子 Agent 按照主管分配的任务执行,适合需要集中控制的场景。',
handoffs: '协作模式', collaboration: '协作模式',
handoffsDesc: '多个 Agent 平等协作,根据任务需求自主协调配合,适合需要灵活互动的复杂场景。', collaborationDesc: '多个 Agent 平等协作,根据任务需求自主协调配合,适合需要灵活互动的复杂场景。',
masterConfig: '主管配置', masterConfig: '主管配置',
orchestrationMode: '任务分配策略', orchestrationMode: '任务分配策略',
conditional: '智能分配', conditional: '智能分配',

View File

@@ -42,7 +42,7 @@ const Cluster = forwardRef<ClusterRef>((_props, ref) => {
const handleSave = (flag = true) => { const handleSave = (flag = true) => {
if (!data) return Promise.resolve() if (!data) return Promise.resolve()
if (!values.default_model_config_id) { if (!values.default_model_config_id && values.orchestration_mode === 'supervisor') {
message.warning(t('common.selectPlaceholder', { title: t('application.model') })) message.warning(t('common.selectPlaceholder', { title: t('application.model') }))
return Promise.resolve() return Promise.resolve()
} }
@@ -140,15 +140,14 @@ const Cluster = forwardRef<ClusterRef>((_props, ref) => {
<Space size={20} direction="vertical" style={{width: '100%'}}> <Space size={20} direction="vertical" style={{width: '100%'}}>
<Card title={t('application.handoffs')}> <Card title={t('application.handoffs')}>
<Form.Item <Form.Item
name={['execution_config', 'routing_mode']} name="orchestration_mode"
noStyle noStyle
> >
<RadioGroupCard <RadioGroupCard
options={['master_agent', 'handoffs'].map((type) => ({ options={['supervisor', 'collaboration'].map((type) => ({
value: type, value: type,
label: t(`application.${type}`), label: t(`application.${type}`),
labelDesc: t(`application.${type}Desc`), labelDesc: t(`application.${type}Desc`),
disabled: type === 'handoffs'
}))} }))}
allowClear={false} allowClear={false}
/> />
@@ -192,7 +191,7 @@ const Cluster = forwardRef<ClusterRef>((_props, ref) => {
))} ))}
</Card> </Card>
<Card title={t('application.masterConfig')}> {values?.orchestration_mode !== 'collaboration' && <Card title={t('application.masterConfig')}>
<Form.Item <Form.Item
label={t('application.model')} label={t('application.model')}
required={true} required={true}
@@ -218,11 +217,11 @@ const Cluster = forwardRef<ClusterRef>((_props, ref) => {
</Row> </Row>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
name="orchestration_mode" name={['execution_config',"sub_agent_execution_mode"]}
label={t('application.orchestrationMode')} label={t('application.orchestrationMode')}
> >
<Select <Select
options={['conditional', 'sequential', 'parallel'].map((type) => ({ options={['sequential', 'parallel'].map((type) => ({
value: type, value: type,
label: t(`application.${type}`), label: t(`application.${type}`),
}))} }))}
@@ -239,7 +238,7 @@ const Cluster = forwardRef<ClusterRef>((_props, ref) => {
}))} }))}
/> />
</Form.Item> </Form.Item>
</Card> </Card>}
</Space> </Space>
</Form> </Form>
</Col> </Col>