fix: address review findings - git-master identity check, test fixtures, regression strength
This commit is contained in:
@@ -14,7 +14,7 @@ export function resolveSkillContent(skillName: string, options?: SkillResolution
|
||||
const skill = skills.find((builtinSkill) => builtinSkill.name === skillName)
|
||||
if (!skill) return null
|
||||
|
||||
if (skillName === "git-master") {
|
||||
if (skill.name === "git-master") {
|
||||
return injectGitMasterConfig(skill.template, options?.gitMasterConfig)
|
||||
}
|
||||
|
||||
@@ -30,18 +30,18 @@ export function resolveMultipleSkills(
|
||||
disabledSkills: options?.disabledSkills,
|
||||
teamModeEnabled: options?.teamModeEnabled,
|
||||
})
|
||||
const skillMap = new Map(skills.map((skill) => [skill.name, skill.template]))
|
||||
const skillMap = new Map(skills.map((skill) => [skill.name, skill]))
|
||||
|
||||
const resolved = new Map<string, string>()
|
||||
const notFound: string[] = []
|
||||
|
||||
for (const name of skillNames) {
|
||||
const template = skillMap.get(name)
|
||||
if (template) {
|
||||
if (name === "git-master") {
|
||||
resolved.set(name, injectGitMasterConfig(template, options?.gitMasterConfig))
|
||||
const match = skillMap.get(name)
|
||||
if (match) {
|
||||
if (match.name === "git-master") {
|
||||
resolved.set(name, injectGitMasterConfig(match.template, options?.gitMasterConfig))
|
||||
} else {
|
||||
resolved.set(name, template)
|
||||
resolved.set(name, match.template)
|
||||
}
|
||||
} else {
|
||||
notFound.push(name)
|
||||
@@ -61,7 +61,7 @@ export async function resolveSkillContentAsync(
|
||||
|
||||
const template = await extractSkillTemplate(skill)
|
||||
|
||||
if (skillName === "git-master") {
|
||||
if (skill.name === "git-master") {
|
||||
return injectGitMasterConfig(template, options?.gitMasterConfig)
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ export async function resolveMultipleSkillsAsync(
|
||||
const skill = matchSkillByName(allSkills, name)
|
||||
if (skill) {
|
||||
const template = await extractSkillTemplate(skill)
|
||||
if (name === "git-master") {
|
||||
if (skill.name === "git-master") {
|
||||
resolved.set(name, injectGitMasterConfig(template, options?.gitMasterConfig))
|
||||
} else {
|
||||
resolved.set(name, template)
|
||||
|
||||
Reference in New Issue
Block a user