mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-12 06:06:37 +03:00
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:
co-authored by
Claude Opus 4.6
parent
870d65b1e3
commit
cb596b538e
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user