From 6baa8d04d0537822d19bfc53933d498f8a953406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=A8=9C?= Date: Tue, 6 May 2025 14:20:37 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E9=87=8CwitchainD=E5=AF=B9=E5=BA=94component=E4=BD=A0=E9=9D=A2?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E6=97=B6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/router/index.ts b/src/router/index.ts index 167a16f..08e1023 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -55,8 +55,7 @@ const router = createRouter({ { path: '/witchainD', name: 'witchainD', - component: (): Promise => - import('src/views/tools/index.vue'), + component:'', }, { path: '/404', -- Gitee From 2515aabd795d18f69aa5ec6e1982ff5c1ae85d18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E8=82=89=E6=A1=82?= <2014434568@qq.com> Date: Tue, 27 May 2025 01:26:47 +0000 Subject: [PATCH 2/7] =?UTF-8?q?!283=20=E9=99=A4=E5=BA=94=E7=94=A8=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E7=95=8C=E9=9D=A2&MCP=E5=A4=96=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: @cc500 Reviewed-by: @hu-gang, @hongyu-shi Signed-off-by: @hongyu-shi --- src/i18n/lang/en.ts | 60 ++++++ src/i18n/lang/zh-cn.ts | 57 +++++- src/utils/tools.ts | 2 +- .../components/PermissionControl.vue | 191 ++++++++++++++++++ src/views/createapp/components/appConfig.vue | 18 +- .../components/codeMirror/nodeMirrorText.vue | 4 +- src/views/createapp/components/workFlow.vue | 23 ++- .../components/workFlowConfig/BranchNode.vue | 4 +- .../components/workFlowConfig/CustomNode.vue | 6 +- .../workFlowConfig/CustomSaENode.vue | 4 +- .../workFlowConfig/editFlowName.vue | 17 +- .../workFlowConfig/workFlowDialog.vue | 19 +- .../workFlowConfig/yamlEditDrawer.vue | 25 +-- .../createapp/components/workFlowDebug.vue | 2 +- src/views/createapp/index.vue | 28 +-- .../dialogue/components/InterPreview.vue | 4 +- src/views/dialogue/dialogueView.vue | 4 +- src/views/tools/index.vue | 6 +- 18 files changed, 392 insertions(+), 82 deletions(-) create mode 100644 src/views/createapp/components/PermissionControl.vue diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index 011d83f..ff313e5 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -31,10 +31,24 @@ export default { upload_semantic_interface: 'Upload Interface', edit_semantic_interface: 'Edit Interface', view_semantic_interface: 'View Interface', + choose_file: 'Choose File', + tip1: 'Drag file here or', + tip2: 'Format: YAML, Size < 2M', cancel: 'Cancel', submit: 'Submit', edit: 'Edit', analyze: 'Analyze', + interface_path: 'Interface path', + interface_description: 'Interface description', + pleaseEnter: 'Please enter', + save: 'Save', + preview: 'Preview', + publish: 'Publish', + publish_condition: 'Need to debug all workflows in the application successfully before publishing the application', + icon:'Icon', + baseMessage: 'Base Message', + copyFailed: 'Copy failed', + checkFormat: 'Please check the format', }, app: { app_center: 'App Center', @@ -58,6 +72,40 @@ export default { edit: 'Edit', analyze: 'Analyze', unpublished: 'Unpublished', + publishSuccess: 'Publish successfully', + publishFailed: 'Publish failed', + create_app: 'Create App', + app_published: 'Published', + app_config: 'App Config', + agent_app: 'Agent App', + mcp_app:'MCP App', + create_or_edit_workflow_first: 'Please create/edit a workflow first', + ui_preview: 'UI Preview', + appName:'Agent Name', + appName_input:'Please enter the agent name', + appDescription:'Agent Description', + appDescription_input:'Please enter the agent description', + modelSelected:'Model Selection', + modelSelected_input:'Please select a model', + multi_Dialogue: 'Multi-turn Dialogue', + multi_Dialogue_select: 'select the number of turns', + ability_Configuration:'Ability Configuration', + MCPService:'MCP Service', + MCPService_add:'Add the MCP service', + permissionConfiguration:'Permission Configuration', + permission:'Permission', + permission_public:'Public (visible to everyone)', + permission_private:'Private (visible only to you)', + somePeople:'Visible to some people', + updateSuccessfully:'Update successfully', + pleasemodifyTheName: 'The workflow name already exists under the current application, please modify the name and try again', + deleteWorkflowSuccessfully: 'Delete workflow successfully', + createSuccessfully: 'Create successfully', + successfully: 'Successfully', + failed: 'Failed', + inputContent:"Input content", + outputContent:"Output content", + }, main: { describe1: "Hi! I'm", @@ -125,6 +173,7 @@ export default { myApp: 'My Apps', }, feedback: { + noCopyMessage: 'No information to copy', feedbackSuccesful: 'Feedback succeeded.', regenerate: 'Regenerate', // 这里我保留了原样,因为通常键名不加双引号 try_ask_me: 'Try ask me:', @@ -259,6 +308,17 @@ export default { flow_end: 'Workflow completed', flow_params_error: 'Missing parameters', flow_pause: 'Workflow paused', + edit_flow: 'Edit workflow', + edit_workflow: 'Edit workflow', + flow_name: 'Workflow name', + flow_description: 'Workflow description', + create_flow: 'Create workflow', + step_configuration: 'Step configuration', + debug_after_connection: 'Debugging can only be performed after node connection is complete', + no_flow: 'No workflow', + choose_flow:"Please choose a workflow", + debug: 'Debug', + enterWorkflowName: 'Please enter workflow name', }, pagination: { prev: 'Previous', diff --git a/src/i18n/lang/zh-cn.ts b/src/i18n/lang/zh-cn.ts index 4738b2c..585997c 100644 --- a/src/i18n/lang/zh-cn.ts +++ b/src/i18n/lang/zh-cn.ts @@ -40,6 +40,16 @@ export default { submit: '确定', edit: '编辑', analyze: '解析', + pleaseEnter: '请输入', + save: '保存', + publish_condition: '需要当前应用中所有工作流调试成功才能发布应用', + icon:'图标', + baseMessage: '基本信息', + preview: '预览', + publish: '发布', + copyFailed: '复制失败', + checkFormat: '请检查格式', + }, app: { app_center: '应用中心', @@ -63,6 +73,39 @@ export default { edit: '编辑', analyze: '解析', unpublished: '未发布', + publishSuccess: '发布成功', + publishFailed: '发布失败', + create_app: '创建应用', + app_published: '已发布', + app_config: '界面配置', + agent_app: '创建智能体应用', + mcp_app:'创建工作流应用', + create_or_edit_workflow_first: '请先创建/编辑工作流', + ui_preview: '界面预览', + appName:'智能体名称', + appName_input:'请输入智能体名称', + appDescription:'智能体描述', + appDescription_input:'请输入智能体描述', + modelSelected:'模型选择', + modelSelected_input:'请选择模型', + multi_Dialogue: '多轮对话', + multi_Dialogue_select: '请选择多轮对话', + ability_Configuration:'能力配置', + MCPService:'MCP服务', + MCPService_add:'添加MCP服务', + permissionConfiguration:'权限配置', + permission:'权限', + permission_public:'公开(所有人可见)', + permission_private:'私密(仅自己可见)', + somePeople:'部分人可见', + updateSuccessfully: '更新成功', + pleasemodifyTheName:'当前应用下已有该工作流名称,请修改名称', + deleteWorkflowSuccessfully: '删除工作流成功', + createSuccessfully: '创建成功', + successfully: '成功', + failed: '失败', + inputContent:"输入内容", + outputContent:"输出内容", }, main: { describe1: '你好,我是', @@ -83,7 +126,7 @@ export default { refresh: '换一换', query_interpretation: '请选择识别方式', Automatic: '自动识别', - ask_me_anything: '在此输入您想了解的内容,输入Shift+Enter换行', + ask_me_anything: '在此输入您想了解的内容,输入Shift+Enter换行', you_might_want_to_know: '你可能想问', close: '关闭', email1: '联系邮箱', @@ -127,6 +170,7 @@ export default { myApp: '我的应用', }, feedback: { + noCopyMessage:'无可复制的信息', feedbackSuccesful: '反馈成功', regenerate: '重新生成', try_ask_me: '你可以继续问我:', @@ -254,6 +298,17 @@ export default { flow_end: '工作流结束', flow_params_error: '缺少参数', flow_pause: '工作流暂停', + edit_flow: '编辑工作流', + edit_workflow: '工作流编排', + flow_name: '工作流名称', + flow_description: '工作流描述', + create_flow: '创建工作流', + step_configuration: '步骤配置', + debug_after_connection: '节点连接完成才能进行调试', + no_flow: '暂无工作流', + choose_flow:"请选择工作流", + debug: '调试', + enterWorkflowName: '请输入工作流名称', }, pagination: { prev: 'Previous', diff --git a/src/utils/tools.ts b/src/utils/tools.ts index af58040..7fa62c8 100644 --- a/src/utils/tools.ts +++ b/src/utils/tools.ts @@ -69,7 +69,7 @@ export const writeText = (text: string): void => { textArea.focus(); textArea.select(); new Promise((res, rej) => { - document.execCommand('copy') ? res() : rej(new Error('复制失败')); + document.execCommand('copy') ? res() : rej(new Error(i18n.global.t('semantic.copyFailed'))); textArea.remove(); }); } diff --git a/src/views/createapp/components/PermissionControl.vue b/src/views/createapp/components/PermissionControl.vue new file mode 100644 index 0000000..5fa7985 --- /dev/null +++ b/src/views/createapp/components/PermissionControl.vue @@ -0,0 +1,191 @@ + + + diff --git a/src/views/createapp/components/appConfig.vue b/src/views/createapp/components/appConfig.vue index fced295..405fe92 100644 --- a/src/views/createapp/components/appConfig.vue +++ b/src/views/createapp/components/appConfig.vue @@ -296,7 +296,7 @@ defineExpose({
- 基本信息 + {{ $t('semantic.baseMessage') }} @@ -316,7 +316,7 @@ defineExpose({ > - +
- 上传图标 + {{ $t('semantic.interface_upload')}}
@@ -352,7 +352,7 @@ defineExpose({ maxlength="20" v-model="createAppForm.name" clearable - placeholder="请输入" + :placeholder="$t('semantic.pleaseEnter')" > @@ -363,7 +363,7 @@ defineExpose({ place clearable type="textarea" - placeholder="请输入" + :placeholder="$t('semantic.pleaseEnter')" @keydown.enter="handleTextareaEnter" > @@ -385,7 +385,7 @@ defineExpose({ maxlength="200" :class="{ validUrl: checkUrl(createAppForm.links[index]) }" v-model="createAppForm.links[index]" - placeholder="请输入" + :placeholder="$t('semantic.pleaseEnter')" clearable > @@ -417,7 +417,7 @@ defineExpose({ class="w320" maxlength="30" v-model="createAppForm.recommendedQuestions[index]" - placeholder="请输入" + :placeholder="$t('semantic.pleaseEnter')" clearable > @@ -534,7 +534,7 @@ defineExpose({
-
界面预览
+
{{ $t("app.ui_preview") }}
diff --git a/src/views/createapp/components/codeMirror/nodeMirrorText.vue b/src/views/createapp/components/codeMirror/nodeMirrorText.vue index c5b5adc..5177f0e 100644 --- a/src/views/createapp/components/codeMirror/nodeMirrorText.vue +++ b/src/views/createapp/components/codeMirror/nodeMirrorText.vue @@ -120,11 +120,11 @@ watch( const handleCopy = (code) => { // 判断是否有值 if (!code) { - errorMsg('无可复制的信息'); + errorMsg($t('feedback.noCopyMessage')); return; } writeText(yaml.dump(code)); - successMsg('复制成功'); + successMsg($t('feedback.copied_successfully')); };