Avoid redundant skill_view calls during forced skill sends

This commit is contained in:
Rod Boev
2026-06-12 08:49:56 -04:00
parent 80dab6f3eb
commit 5f8ab6c452
2 changed files with 3 additions and 2 deletions

View File

@@ -952,7 +952,7 @@ async function cmdUse(args){
const detail = await api(`/api/skills/content?name=${encodeURIComponent(match.name)}`);
const skillContent = detail&&typeof detail.content==='string' ? detail.content.trim() : '';
if(!skillContent) throw new Error(`Skill \`${match.name}\` has no readable content.`);
const directive = `[USER OVERRIDE] You MUST consult skill '${match.name}' via skill_view before responding to the next message.`;
const directive = `[USER OVERRIDE] You MUST follow the skill '${match.name}' content provided below before responding to the next message.`;
resolve({name:match.name,directive,content:skillContent});
if(isCurrentSession()){
S.messages.push({role:'assistant', content:`Next turn: skill \`${match.name}\` will be forced.`});