Avoid redundant skill_view calls during forced skill sends
This commit is contained in:
@@ -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.`});
|
||||
|
||||
Reference in New Issue
Block a user