feat: gate slash commands and add compact

This commit is contained in:
Peter Steinberger committed 2026-01-06 02:23:55 +01:00
1 parent 085c70a87b
commit b56338171b
16 files changed
+566 -59

No files matched your search

+3 -1
View File
@@ -1,5 +1,5 @@
const CONTROL_COMMAND_RE =
/(?:^|\s)\/(?:status|help|thinking|think|t|verbose|v|elevated|elev|model|queue|activation|send|restart|reset|new)(?=$|\s|:)\b/i;
/(?:^|\s)\/(?:status|help|thinking|think|t|verbose|v|elevated|elev|model|queue|activation|send|restart|reset|new|compact)(?=$|\s|:)\b/i;
const CONTROL_COMMAND_EXACT = new Set([
"help",
@@ -16,6 +16,8 @@ const CONTROL_COMMAND_EXACT = new Set([
"/reset",
"new",
"/new",
"compact",
"/compact",
]);
export function hasControlCommand(text?: string): boolean {