Exclude teach-impeccable from suggestions, allow other installed skills

- Filter teach-impeccable from {{available_commands}} (setup skill, not a fix)
- Soften wording: "prefer" our commands but also allow other installed skills
  the LLM is sure exist, preventing false negatives while still preventing
  hallucinated commands

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Paul Bakaus
2026-03-05 10:20:38 -08:00
co-authored by Claude Opus 4.6
parent 870d65b1e3
commit cb596b538e
3 changed files with 9 additions and 6 deletions
+6 -3
View File
@@ -326,11 +326,14 @@ function escapeRegex(str) {
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
}
const EXCLUDED_FROM_SUGGESTIONS = new Set(['teach-impeccable', 'i-teach-impeccable']);
export function replacePlaceholders(content, provider, commandNames = []) {
const placeholders = PROVIDER_PLACEHOLDERS[provider] || PROVIDER_PLACEHOLDERS['cursor'];
const commandList = commandNames.length > 0
? commandNames.map(n => `/${n}`).join(', ')
: '';
const commandList = commandNames
.filter(n => !EXCLUDED_FROM_SUGGESTIONS.has(n))
.map(n => `/${n}`)
.join(', ');
return content
.replace(/\{\{model\}\}/g, placeholders.model)