Skip to content

Commit 5ca82e1

Browse files
committed
chore: add MCP name field to tool form
--bug=1060678 --user=刘瑞斌 【工具】添加、编辑MCP界面,MCP名称输入框的提示应该改成“请输入MCP名称” https://www.tapd.cn/62980211/s/1759264
1 parent 878f8c0 commit 5ca82e1

File tree

4 files changed

+36
-6
lines changed

4 files changed

+36
-6
lines changed

ui/src/locales/lang/en-US/views/tool.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,20 @@ export default {
4646
placeholder: 'Please enter the tool name',
4747
requiredMessage: 'Please enter the tool name',
4848
},
49+
mcpName: {
50+
label: 'Name',
51+
name: 'MCP Name',
52+
placeholder: 'Please enter the MCP name',
53+
requiredMessage: 'Please enter the MCP name',
54+
},
4955
toolDescription: {
5056
label: 'Description',
5157
placeholder: 'Please enter a description of the tool',
5258
},
59+
mcpDescription: {
60+
label: 'Description',
61+
placeholder: 'Please enter a description of the MCP',
62+
},
5363
paramName: {
5464
label: 'Parameter Name',
5565
placeholder: 'Please enter the parameter name',

ui/src/locales/lang/zh-CN/views/tool.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,20 @@ export default {
4040
placeholder: '请输入工具名称',
4141
requiredMessage: '请输入工具名称',
4242
},
43+
mcpName: {
44+
label: '名称',
45+
name: 'MCP名称',
46+
placeholder: '请输入MCP名称',
47+
requiredMessage: '请输入MCP名称',
48+
},
4349
toolDescription: {
4450
label: '描述',
4551
placeholder: '请输入工具的描述',
4652
},
53+
mcpDescription: {
54+
label: '描述',
55+
placeholder: '请输入MCP的描述',
56+
},
4757
paramName: {
4858
label: '参数名',
4959
placeholder: '请输入参数名',

ui/src/locales/lang/zh-Hant/views/tool.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,20 @@ export default {
4343
placeholder: '請輸入工具名稱',
4444
requiredMessage: '請輸入工具名稱',
4545
},
46+
mcpName: {
47+
label: '名稱',
48+
name: 'MCP名稱',
49+
placeholder: '請輸入MCP名稱',
50+
requiredMessage: '請輸入MCP名稱',
51+
},
4652
toolDescription: {
4753
label: '描述',
4854
placeholder: '請輸入工具的描述',
4955
},
56+
mcpDescription: {
57+
label: '描述',
58+
placeholder: '請輸入MCP的描述',
59+
},
5060
paramName: {
5161
label: '參數名',
5262
placeholder: '請輸入參數名',

ui/src/views/tool/McpToolFormDrawer.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
v-loading="loading"
1818
@submit.prevent
1919
>
20-
<el-form-item :label="$t('views.tool.form.toolName.label')" prop="name">
20+
<el-form-item :label="$t('views.tool.form.mcpName.label')" prop="name">
2121
<div class="flex w-full">
2222
<div
2323
v-if="form.id"
@@ -55,19 +55,19 @@
5555
</el-avatar>
5656
<el-input
5757
v-model="form.name"
58-
:placeholder="$t('views.tool.form.toolName.placeholder')"
58+
:placeholder="$t('views.tool.form.mcpName.placeholder')"
5959
maxlength="64"
6060
show-word-limit
6161
@blur="form.name = form.name?.trim()"
6262
/>
6363
</div>
6464
</el-form-item>
6565

66-
<el-form-item :label="$t('views.tool.form.toolDescription.label')">
66+
<el-form-item :label="$t('views.tool.form.mcpDescription.label')">
6767
<el-input
6868
v-model="form.desc"
6969
type="textarea"
70-
:placeholder="$t('views.tool.form.toolDescription.placeholder')"
70+
:placeholder="$t('views.tool.form.mcpDescription.placeholder')"
7171
maxlength="128"
7272
show-word-limit
7373
:autosize="{ minRows: 3 }"
@@ -78,7 +78,7 @@
7878
{{ $t('views.tool.form.mcp.title') }}
7979
</h4>
8080

81-
<el-form-item :label="$t('views.tool.form.toolDescription.label')" prop="code">
81+
<el-form-item :label="$t('views.tool.form.mcpDescription.label')" prop="code">
8282
<template #label>
8383
{{ $t('views.tool.form.mcp.label') }}
8484
<span class="color-danger">*</span>
@@ -197,7 +197,7 @@ const rules = reactive({
197197
name: [
198198
{
199199
required: true,
200-
message: t('views.tool.form.toolName.requiredMessage'),
200+
message: t('views.tool.form.mcpName.requiredMessage'),
201201
trigger: 'blur',
202202
},
203203
],

0 commit comments

Comments
 (0)