diff --git a/src/auto-reply/reply/get-reply-directives-apply.ts b/src/auto-reply/reply/get-reply-directives-apply.ts index 0a75a339fc1..0068aed5415 100644 --- a/src/auto-reply/reply/get-reply-directives-apply.ts +++ b/src/auto-reply/reply/get-reply-directives-apply.ts @@ -13,6 +13,7 @@ import { isDirectiveOnly, persistInlineDirectives, } from "./directive-handling.js"; +import { clearInlineDirectives } from "./get-reply-directives-utils.js"; type AgentDefaults = NonNullable["defaults"]; @@ -104,31 +105,7 @@ export async function applyInlineDirectiveOverrides(params: { let directiveAck: ReplyPayload | undefined; if (!command.isAuthorizedSender) { - directives = { - ...directives, - hasThinkDirective: false, - hasVerboseDirective: false, - hasReasoningDirective: false, - hasElevatedDirective: false, - hasExecDirective: false, - execHost: undefined, - execSecurity: undefined, - execAsk: undefined, - execNode: undefined, - rawExecHost: undefined, - rawExecSecurity: undefined, - rawExecAsk: undefined, - rawExecNode: undefined, - hasExecOptions: false, - invalidExecHost: false, - invalidExecSecurity: false, - invalidExecAsk: false, - invalidExecNode: false, - hasStatusDirective: false, - hasModelDirective: false, - hasQueueDirective: false, - queueReset: false, - }; + directives = clearInlineDirectives(directives.cleaned); } if (