Skip to content

Commit

Permalink
perf: select tool config tip
Browse files Browse the repository at this point in the history
  • Loading branch information
c121914yu committed Jul 25, 2024
1 parent 53bae0c commit 16a9a5a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/plugins/src/feishu/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"name": "飞书机器人 webhook",
"avatar": "/imgs/app/templates/feishu.svg",
"intro": "向飞书机器人发起 webhook 请求。",
"inputExplanationUrl": "https://open.feishu.cn/document/client-docs/bot-v3/add-custom-bot#f62e72d5",
"showStatus": false,
"weight": 10,

Expand Down
1 change: 1 addition & 0 deletions packages/web/i18n/en/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"template": {
"simple_robot": "Simple Robot"
},
"tool_input_param_tip": "Configure related information before the plugin runs properly",
"transition_to_workflow": "Transition to workflow",
"transition_to_workflow_create_new_placeholder": "Create a new application instead of modifying the current one",
"transition_to_workflow_create_new_tip": "After converting to workflow, it will not be able to convert back to simple mode, please confirm!",
Expand Down
1 change: 1 addition & 0 deletions packages/web/i18n/zh/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"template": {
"simple_robot": "简易机器人"
},
"tool_input_param_tip": "该插件正常运行需要配置相关信息",
"transition_to_workflow": "转成工作流",
"transition_to_workflow_create_new_placeholder": "创建一个新的应用,而不是修改当前应用",
"transition_to_workflow_create_new_tip": "转化成工作流后,将无法转化回简易模式,请确认!",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
Box,
Button,
Flex,
HStack,
Input,
InputGroup,
InputLeftElement,
Expand Down Expand Up @@ -287,6 +288,8 @@ const RenderList = React.memo(function RenderList({
</MyTooltip>
);
})}

{/* Plugin input config */}
{!!configTool && (
<MyModal
isOpen
Expand All @@ -295,6 +298,19 @@ const RenderList = React.memo(function RenderList({
overflow={'auto'}
>
<ModalBody>
<HStack mb={4} spacing={1} fontSize={'sm'}>
<MyIcon name={'common/info'} w={'1.25rem'} />
<Box flex={1}>{t('app:tool_input_param_tip')}</Box>
{configTool.inputExplanationUrl && (
<Box
cursor={'pointer'}
color={'primary.500'}
onClick={() => window.open(configTool.inputExplanationUrl, '_blank')}
>
{t('app:workflow.Input guide')}
</Box>
)}
</HStack>
{configTool.inputs
.filter((item) => !item.toolDescription)
.map((input) => {
Expand Down

0 comments on commit 16a9a5a

Please sign in to comment.