From f9afdf0a072f2f697b0dc2f96a470ff56920c9f9 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 11 Apr 2026 06:22:21 +0100 Subject: [PATCH] perf: avoid signal approval plugin lookup --- src/agents/system-prompt.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/agents/system-prompt.ts b/src/agents/system-prompt.ts index 6acaeb55275..3bdbce25226 100644 --- a/src/agents/system-prompt.ts +++ b/src/agents/system-prompt.ts @@ -49,6 +49,7 @@ const CONTEXT_FILE_ORDER = new Map([ const DYNAMIC_CONTEXT_FILE_BASENAMES = new Set(["heartbeat.md"]); const DEFAULT_HEARTBEAT_PROMPT_CONTEXT_BLOCK = "Default heartbeat prompt:\n`Read HEARTBEAT.md if it exists (workspace context). Follow it strictly. Do not infer or repeat old tasks from prior chats. If nothing needs attention, reply HEARTBEAT_OK.`"; +const STATIC_NON_NATIVE_APPROVAL_CHANNELS = new Set(["signal"]); function normalizeContextFilePath(pathValue: string): string { return pathValue.trim().replace(/\\/g, "/"); @@ -330,7 +331,7 @@ function buildExecApprovalPromptGuidance(params: { const usesNativeApprovalUi = runtimeChannel === "webchat" || params.inlineButtonsEnabled === true || - (runtimeChannel + (runtimeChannel && !STATIC_NON_NATIVE_APPROVAL_CHANNELS.has(runtimeChannel) ? Boolean(resolveChannelApprovalCapability(getChannelPlugin(runtimeChannel))?.native) : false); if (usesNativeApprovalUi) {