From 7b39aa3444b31a529ed91a3bb92add4feeb3abd1 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 15 Feb 2026 14:05:47 +0000 Subject: [PATCH] refactor(auto-reply): reuse inline directive clearer --- .../reply/get-reply-directives-apply.ts | 27 ++----------------- 1 file changed, 2 insertions(+), 25 deletions(-) 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 (