Skip to content

πŸ™Œ OpenHands: AI-Driven Development

fix(skills): prefer frontmatter description over body content in slash command menu (#673)

Vasco Schiavob45c4e27ccde
diff --git a/src/components/features/chat/components/slash-command-menu.tsx b/src/components/features/chat/components/slash-command-menu.tsx
index 98a47814b4..58278f5fa9 100644
--- a/src/components/features/chat/components/slash-command-menu.tsx
+++ b/src/components/features/chat/components/slash-command-menu.tsx
@@ -85,12 +85,12 @@ function SlashCommandMenuItem({
ref,
}: SlashCommandMenuItemProps) {
const description = useMemo(() => {
- if ("content" in item.skill && item.skill.content) {
- return getSkillDescription(item.skill.content);
- }
if ("description" in item.skill && item.skill.description) {
return stripMarkdown(item.skill.description);
}
+ if ("content" in item.skill && item.skill.content) {
+ return getSkillDescription(item.skill.content);
+ }
return null;
}, [item.skill]);