Skip to content

Commit

Permalink
feat: Add tip to loop of ExeSQL #1739 (#1983)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?

feat:  Add tip to loop of ExeSQL #1739

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
  • Loading branch information
cike8899 authored Aug 16, 2024
1 parent 3738dd7 commit 4121636
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 11 deletions.
6 changes: 3 additions & 3 deletions web/src/assets/svg/exesql.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions web/src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,8 @@ The above is the content you need to summarize.`,
messageMsg: 'Please input message or delete this field.',
addField: 'Add field',
loop: 'Loop',
loopTip:
'Loop is the upper limit of the number of loops of the current component, when the number of loops exceeds the value of loop, it means that the component can not complete the current task, please re-optimize agent',
yes: 'Yes',
no: 'No',
key: 'key',
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/zh-traditional.ts
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,8 @@ export default {
messageMsg: '請輸入訊息或刪除此欄位。',
addField: '新增字段',
loop: '循環上限',
loopTip:
'loop為目前元件循環次數上限,當循環次數超過loop的值時,表示元件無法完成目前任務,請重新最佳化agent',
yes: '是',
no: '否',
key: 'key',
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,8 @@ export default {
messageMsg: '请输入消息或删除此字段。',
addField: '新增字段',
loop: '循环上限',
loopTip:
'loop为当前组件循环次数上限,当循环次数超过loop的值时,说明组件不能完成当前任务,请重新优化agent',
yes: '是',
no: '否',
key: 'key',
Expand Down
22 changes: 15 additions & 7 deletions web/src/pages/flow/constant.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,21 @@ export const operatorMap = {
[Operator.Google]: {
backgroundColor: 'pink',
},
[Operator.Bing]: {},
[Operator.GoogleScholar]: {},
[Operator.DeepL]: {},
[Operator.GitHub]: {},
[Operator.BaiduFanyi]: {},
[Operator.QWeather]: {},
[Operator.ExeSQL]: {},
[Operator.Bing]: {
backgroundColor: '#c0dcc4',
},
[Operator.GoogleScholar]: {
backgroundColor: '#b4e4f6',
},
[Operator.DeepL]: {
backgroundColor: '#f5e8e6',
},
[Operator.GitHub]: {
backgroundColor: '#c7c7f8',
},
[Operator.BaiduFanyi]: { backgroundColor: '#e5f2d3' },
[Operator.QWeather]: { backgroundColor: '#a4bbf3' },
[Operator.ExeSQL]: { backgroundColor: '#b9efe8' },
};

export const componentMenuList = [
Expand Down
7 changes: 6 additions & 1 deletion web/src/pages/flow/exesql-form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ const ExeSQLForm = ({ onValuesChange, form }: IOperatorForm) => {
>
<Input.Password></Input.Password>
</Form.Item>
<Form.Item label={t('loop')} name={'loop'} rules={[{ required: true }]}>
<Form.Item
label={t('loop')}
name={'loop'}
tooltip={t('loopTip')}
rules={[{ required: true }]}
>
<InputNumber></InputNumber>
</Form.Item>
<TopNItem initialValue={30} max={100000}></TopNItem>
Expand Down

0 comments on commit 4121636

Please sign in to comment.