Skip to content

fix: Application of multi-file style issues and modification of copyw… #3110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ const uploadFile = async (file: any, fileList: any) => {
formData.append('file', file.raw, file.name)
//
const extension = file.name.split('.').pop().toUpperCase() // 获取文件后缀名并转为小写

console.log(documentExtensions)
if (imageExtensions.includes(extension)) {
uploadImageList.value.push(file)
} else if (documentExtensions.includes(extension)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,7 @@ onMounted(() => {})
}
.media-file-width {
:deep(.el-space__item) {
min-width: 40% !important;
flex-grow: 1;
width: 49% !important;
}
}
.media_2 {
Expand Down
4 changes: 2 additions & 2 deletions ui/src/locales/lang/en-US/views/application-workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,14 @@ export default {
},
mcpNode: {
label: 'MCP Server',
text: 'Call MCP Tools through SSE/STREAMABLE_HTTP',
text: 'Call MCP Tools through SSE',
getToolsSuccess: 'Get Tools Successfully',
getTool: 'Get Tools',
tool: 'Tool',
toolParam: 'Tool Params',
mcpServerTip: 'Please enter the JSON format of the MCP server config',
mcpToolTip: 'Please select a tool',
configLabel: 'MCP Server Config (Only supports SSE/STREAMABLE_HTTP call method)'
configLabel: 'MCP Server Config (Only supports SSE call method)'
},
imageGenerateNode: {
label: 'Image Generation',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the provided code snippet, there are minor changes that can be made for clarity and consistency:

  1. SSE vs. Streamable HTTP: The label for both mcpNode should match "MCP Server" for uniformity. Consider changing -text: 'Call MCP Tools through SSE/STREAMABLE_HTTP', +text: 'Call MCP Tools through SSE,', to consistently use only "SSE".

  2. Configuration Label: The configLabel is consistent but could benefit from a small improvement in wording for better readability. For example, changing -configLabel: 'MCP Server Config (Only supports SSE/STREAMABLE_HTTP call method)', to more clearly indicate it's about the server configuration.

Here’s the updated and improved version of the mcpNode object:

{
  label: 'MCP Server',
  text: 'Call MCP Tools using SSE',
  getToolsSuccess: 'Get Tools Successfully',
  getTool: 'Get Tools',
  tool: 'Tool',
  toolParam: 'Tool Params',
  mcpServerTip: 'Please enter the JSON format of the MCP server config',
  mcpToolTip: 'Please select a tool',
  configLabel: 'MCP Server Configuration (supports only SSE calls)',
}

These improvements enhance the readability and maintainability of the code snippet while making sure all elements align with standard conventions.

Expand Down
4 changes: 2 additions & 2 deletions ui/src/locales/lang/zh-CN/views/application-workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,14 @@ export default {
},
mcpNode: {
label: 'MCP 调用',
text: '通过SSE/STREAMABLE_HTTP方式执行MCP服务中的工具',
text: '通过SSE方式执行MCP服务中的工具',
getToolsSuccess: '获取工具成功',
getTool: '获取工具',
tool: '工具',
toolParam: '工具参数',
mcpServerTip: '请输入JSON格式的MCP服务器配置',
mcpToolTip: '请选择工具',
configLabel: 'MCP Server Config (仅支持SSE/STREAMABLE_HTTP调用方式)'
configLabel: 'MCP Server Config (仅支持SSE调用方式)'
},
imageGenerateNode: {
label: '图片生成',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code provided has several issues and potential improvements:

  1. Spellings: There are some spelling errors:

    • "STREAMABLE_HTTP" should be either "Streamable HTTP" or left as is but ensure it's consistent throughout the file.
    • The word "mcpNode's" in getToolsSuccess needs to be corrected.
  2. Grammar: Some text can be improved for clarity:

    • The phrase "获取工具成功" translates to "Get tools successfully," which is more natural-sounding.
  3. Configuration Text: Ensure that all configuration labels follow a similar format, e.g., using spaces after punctuation consistently.

Here’s an updated version of the relevant section with these adjustments:

@@ -224,14 +224,14 @@export default {
     },
     mcpNode: {
       label: 'MCP 调用',
-      text: '通过SSE方式执行MCP服务中的工具',
+      text: '通过SSE方式执行MCP服务中的工具',
       getToolsSuccess: '获取工具成功',
       getTool: '获取工具',
       tool: '工具',
       toolParam: '工具参数',
       mcpServerTip: '请输入JSON格式的MCP服务器配置。',
       mcpToolTip: '请选择工具。',
-      configLabel: 'MCP Server Config (仅支持SSE调用方式)'
+      configLabel: 'MCP Server Config(仅支持 SSE 调用方式)'
     },
     imageGenerateNode: {
       label: '图片生成',
     }

Additional Optimizations:

  • Consistent Spacing: Ensure there is consistent spacing before commas within objects to improve readability.

This will make the code easier to read and maintain while addressing the mentioned issues.

Expand Down
4 changes: 2 additions & 2 deletions ui/src/locales/lang/zh-Hant/views/application-workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,14 @@ export default {
},
mcpNode: {
label: 'MCP 調用',
text: '透過SSE/STREAMABLE_HTTP方式執行MCP服務中的工具',
text: '透過SSE方式執行MCP服務中的工具',
getToolsSuccess: '獲取工具成功',
getTool: '獲取工具',
tool: '工具',
toolParam: '工具變數',
mcpServerTip: '請輸入JSON格式的MCP服務器配置',
mcpToolTip: '請選擇工具',
configLabel: 'MCP Server Config (僅支持SSE/STREAMABLE_HTTP調用方式)'
configLabel: 'MCP Server Config (僅支持SSE調用方式)'
},
imageGenerateNode: {
label: '圖片生成',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code snippet has several minor issues:

  1. The mcpNode object's properties should be consistent with each other regarding their descriptions and labels. Some have "GET" in them while others use "获取". It's better to standardize this.

  2. The configLabel in the mcpNode object mentions both SSE and Streamable HTTP, which is contradictory since Streamable HTTP uses a different protocol than SSE. This should probably be adjusted to just mention either one.

  3. There doesn't appear to be any syntax errors or logic issues that would cause runtime problems now, but consistency in naming conventions and documentation can improve readability and maintainability.

Here's an updated version of your code based on these suggestions:

@@ -223,16 +223,16 @@
   },
   mcpNode: {
     label: 'MCP 调用',
     text: '透過SSE方式执行MCP服务中的工具',
     getToolsSuccess: '获得工具成功',
     getTool: '获取工具',
     tool: '工具',
     toolParam: '工具变量',
     mcpServerTip: '请输入JSON格式的MCP服务器配置',
     mcpToolTip: '请选择工具',
     configLabel: 'MCP Server Config (仅支持SSE调用方式)'
   },
   imageGenerateNode: {
     label: '图片生成',
   }
}

These changes ensure consistency in naming and provide clearer intent for users understanding what each part of the configuration does.

Expand Down