feat(#2024): add /effort terminal slash command

This commit is contained in:
damocles 2026-06-27 13:18:18 +02:00 committed by mara
commit f060456860

View file

@ -548,6 +548,7 @@ window.marked = marked;
{ name: '/cancel', desc: 'SIGINT the in-flight claude turn' },
{ name: '/compact', desc: 'compact the persistent claude session' },
{ name: '/model', desc: '/model <name> — switch claude model for future turns' },
{ name: '/effort', desc: '/effort <level> — set claude effort (medium/high/xhigh) for future turns' },
{ name: '/new-session', desc: 'next turn runs without --continue (fresh claude session)' },
{ name: '/logout', desc: 'rotate OAuth credentials + park in needs-login (--continue session preserved)' },
];
@ -668,6 +669,16 @@ window.marked = marked;
}
return true;
}
case '/effort': {
const parts = trimmed.split(/\s+/);
if (parts.length < 2 || !parts[1]) {
termAPI.row('turn-end-fail',
'✗ /effort needs a level (e.g. /effort medium, /effort high, /effort xhigh)');
} else {
postEffort(parts[1]);
}
return true;
}
default:
termAPI.row('turn-end-fail', '✗ unknown slash command: ' + cmd + ' — try /help');
return true;