Skip to content

Commit 43b5711

Browse files
mux-botmux-bot[bot]
authored andcommitted
refactor: drop unused appendSpace literals on skill/model alias suggestions
The skill and model alias build callbacks in getSlashCommandSuggestions hardcode the trailing space, so the appendSpace: true property on those SuggestionDefinition literals is dead. Remove it and add a brief comment explaining why we don't propagate appendSpace through these paths so a future reader doesn't assume the field is consulted there.
1 parent fc01cec commit 43b5711

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/browser/utils/slashCommands/suggestions.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,14 @@ function buildTopLevelSuggestions(
8282
return scope;
8383
};
8484

85+
// The skill build callback below hardcodes the trailing space, so we omit
86+
// `appendSpace` here — leaving it set would be a no-op and falsely suggest
87+
// the build path consults it.
8588
const skillDefinitions: SuggestionDefinition[] = (context.agentSkills ?? [])
8689
.filter((skill) => !SLASH_COMMAND_DEFINITION_MAP.has(skill.name))
8790
.map((skill) => ({
8891
key: skill.name,
8992
description: `${skill.description} (${formatScopeLabel(skill.scope)})`,
90-
appendSpace: true,
9193
}));
9294

9395
const skillSuggestions = filterAndMapSuggestions(skillDefinitions, partial, (definition) => {
@@ -100,12 +102,13 @@ function buildTopLevelSuggestions(
100102
};
101103
});
102104

103-
// Model alias one-shot suggestions (e.g., /haiku, /sonnet, /opus+high)
105+
// Model alias one-shot suggestions (e.g., /haiku, /sonnet, /opus+high).
106+
// The build callback below hardcodes the trailing space, so `appendSpace`
107+
// is intentionally omitted here.
104108
const modelAliasDefinitions: SuggestionDefinition[] = Object.entries(MODEL_ABBREVIATIONS).map(
105109
([alias, modelId]) => ({
106110
key: alias,
107111
description: `Send with ${formatModelDisplayName(modelId.split(":")[1] ?? modelId)} (one message, +level for thinking)`,
108-
appendSpace: true,
109112
})
110113
);
111114

0 commit comments

Comments
 (0)