mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 02:46:56 +00:00
[improvement][headless-fe] Unified the assistant's permission settings interaction to match the system style.
This commit is contained in:
@@ -226,15 +226,15 @@ const AgentForm: React.FC<Props> = ({ editAgent, onSaveAgent, onCreateToolBtnCli
|
||||
<Switch />
|
||||
</FormItem>
|
||||
<FormItem
|
||||
name="viewers"
|
||||
label="可见用户"
|
||||
tooltip="选择用户后,该助理只对所选用户可见"
|
||||
// label={
|
||||
// <FormItemTitle title={'可见用户'} subTitle={'选择用户后,该助理只对所选用户可见'} />
|
||||
// }
|
||||
name="admins"
|
||||
label="管理员"
|
||||
// rules={[{ required: true, message: '请设定数据库连接管理者' }]}
|
||||
>
|
||||
<SelectTMEPerson placeholder="请邀请团队成员" />
|
||||
</FormItem>
|
||||
<FormItem tooltip="选择用户后,该助理只对所选用户可见" name="viewers" label="使用者">
|
||||
<SelectTMEPerson placeholder="请邀请团队成员" />
|
||||
</FormItem>
|
||||
<FormItem name="examples" label="示例问题">
|
||||
<div className={styles.paramsSection}>
|
||||
{examples.map((example) => {
|
||||
|
||||
@@ -208,26 +208,26 @@ const ModelFieldForm: React.FC<Props> = ({
|
||||
// width: 200,
|
||||
render: (_: any, record: FieldItem) => {
|
||||
const { type } = record;
|
||||
if (type === EnumDataSourceType.PRIMARY) {
|
||||
return (
|
||||
<Space>
|
||||
<Select
|
||||
style={{ minWidth: 150 }}
|
||||
value={tagObjectId ? tagObjectId : undefined}
|
||||
placeholder="请选择所属对象"
|
||||
onChange={(value) => {
|
||||
onTagObjectChange?.(value);
|
||||
}}
|
||||
options={tagObjectList.map((item: ISemantic.ITagObjectItem) => {
|
||||
return {
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
};
|
||||
})}
|
||||
/>
|
||||
</Space>
|
||||
);
|
||||
}
|
||||
// if (type === EnumDataSourceType.PRIMARY) {
|
||||
// return (
|
||||
// <Space>
|
||||
// <Select
|
||||
// style={{ minWidth: 150 }}
|
||||
// value={tagObjectId ? tagObjectId : undefined}
|
||||
// placeholder="请选择所属对象"
|
||||
// onChange={(value) => {
|
||||
// onTagObjectChange?.(value);
|
||||
// }}
|
||||
// options={tagObjectList.map((item: ISemantic.ITagObjectItem) => {
|
||||
// return {
|
||||
// label: item.name,
|
||||
// value: item.id,
|
||||
// };
|
||||
// })}
|
||||
// />
|
||||
// </Space>
|
||||
// );
|
||||
// }
|
||||
if (type === EnumDataSourceType.MEASURES) {
|
||||
const agg = record.expr
|
||||
? fields.find((field) => field.expr === record.expr)?.agg
|
||||
|
||||
Reference in New Issue
Block a user