mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-17 22:05:50 +00:00
feat: 为 project 级 skill 添加黄色 [local] 标签区分显示
在斜杠命令列表和 SkillsMenu 中,对 projectSettings/localSettings 来源的 skill 显示黄色 [local] 标签,方便区分项目级和用户级技能。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -271,6 +271,15 @@ function createCommandSuggestionItem(
|
||||
const aliasText = matchedAlias ? ` (${matchedAlias})` : ''
|
||||
|
||||
const isWorkflow = cmd.type === 'prompt' && cmd.kind === 'workflow'
|
||||
|
||||
// Show "local" tag for project-scoped prompt commands
|
||||
const scopeTag =
|
||||
cmd.type === 'prompt' &&
|
||||
!isWorkflow &&
|
||||
(cmd.source === 'projectSettings' || cmd.source === 'localSettings')
|
||||
? 'local'
|
||||
: undefined
|
||||
|
||||
const fullDescription =
|
||||
(isWorkflow ? cmd.description : formatDescriptionWithSource(cmd)) +
|
||||
(cmd.type === 'prompt' && cmd.argNames?.length
|
||||
@@ -280,7 +289,7 @@ function createCommandSuggestionItem(
|
||||
return {
|
||||
id: getCommandId(cmd),
|
||||
displayText: `/${commandName}${aliasText}`,
|
||||
tag: isWorkflow ? 'workflow' : undefined,
|
||||
tag: isWorkflow ? 'workflow' : scopeTag,
|
||||
description: fullDescription,
|
||||
metadata: cmd,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user