Repository navigation
fix: correct MCP shared badges and workflow labels - #8209
Merged
Merged
Conversation
shaohuzhang1
commented
Nov 27, 2026
| <el-tag v-if="option.scope === TOOL_SCOPE.SHARED" size="small" type="info">{{ t('resource.shared') }}</el-tag> | ||
| </div> | ||
| </el-option> | ||
| </el-select> |
Contributor
Author
There was a problem hiding this comment.
The diff is small and generally reasonable, but there are a few things to verify:
-
Confirm the field rename
source→scopeis correct- The template now checks
option.scope === TOOL_SCOPE.SHARED. - Make sure every object in
mcpOptionsactually has ascopeproperty. - If the API/type still exposes
source, this will silently never show the shared tag, or cause a TypeScript error. - Search the codebase for other
.source === 'shared'usages and update them consistently if this was a data-model change.
- The template now checks
-
Verify
TOOL_SCOPE.SHAREDmatches the backend value- For example, if the enum is defined as
SHARED = 'SHARED'but the backend returns'shared', the condition will fail. - Ensure the enum value is exactly the same string as the runtime data.
- For example, if the enum is defined as
-
Check semantic correctness of using
TOOL_SCOPEhere- The option appears to represent an MCP source/setting. If “shared” here is an MCP-source concept, using
TOOL_SCOPEmay be semantically wrong. Prefer the matching enum such asMCP_SOURCE.SHAREDif one exists. - If
scopeis intentionally the shared scope of the tool, then this is fine.
- The option appears to represent an MCP source/setting. If “shared” here is an MCP-source concept, using
-
Truncation styling is okay, but layout can be improved
min-w-0 truncateon the<span>is correct for allowing truncation inside a flex container.- To make truncation more reliable and prevent the tag from shrinking, consider:
<span class="min-w-0 flex-1 truncate" :title="option.name">{{ option.name }}</span> <el-tag class="flex-shrink-0" ...>
flex-1is optional; it makes the text consume available space and pushes the tag to the right. Without it, truncation still works as long as the parent width is constrained.
-
Minor lint/type checks
- Ensure
TOOL_TYPEis still used in the file; otherwise it becomes an unused import. :title="option.name"is fine, but ifoption.namecan beundefined, the tooltip will simply be empty.
- Ensure
Overall: no obvious syntax problem, but the main risk is the source → scope change and whether TOOL_SCOPE.SHARED matches the actual data/enum.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: correct MCP shared badges and workflow labels