diff --git a/packages/host/app/components/ai-assistant/skill-menu/skill-toggle.gts b/packages/host/app/components/ai-assistant/skill-menu/skill-toggle.gts index 18c56b9c812..c07571cb103 100644 --- a/packages/host/app/components/ai-assistant/skill-menu/skill-toggle.gts +++ b/packages/host/app/components/ai-assistant/skill-menu/skill-toggle.gts @@ -60,8 +60,9 @@ export default class SkillToggle extends Component { return this.cardResource?.card; } - // Title for either skill source: `cardTitle` for a Skill card, the - // frontmatter name / title for a skill markdown file. + // Title for either skill source: `cardTitle` for a Skill card; for a skill + // markdown file, the title indexed from its first heading, falling back to + // the frontmatter name slug only when the file has no heading. private get displayTitle(): string | undefined { let card = this.card as | { @@ -74,7 +75,7 @@ export default class SkillToggle extends Component { if (!card) { return undefined; } - return card.cardTitle ?? card.frontmatter?.name ?? card.title ?? card.name; + return card.cardTitle ?? card.title ?? card.frontmatter?.name ?? card.name; } private get isCreating() {