From a7c291aca7a582118ff25cbb9c66a6333d6c619c Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Mar 2026 06:01:58 +0000 Subject: [PATCH] Show input_preview only for Bash permission prompts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bash commands are the security decision — the user needs to see the actual command. Other tools (Write, Edit, etc.) have bulky payloads that flood a phone screen; the description line is enough. --- external_plugins/imessage/server.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/external_plugins/imessage/server.ts b/external_plugins/imessage/server.ts index a0a8449..a0abb77 100644 --- a/external_plugins/imessage/server.ts +++ b/external_plugins/imessage/server.ts @@ -530,15 +530,18 @@ mcp.setNotificationHandler( request_id: z.string(), tool_name: z.string(), description: z.string(), + input_preview: z.string(), }), }), async ({ params }) => { - const { request_id, tool_name, description } = params + const { request_id, tool_name, description, input_preview } = params const access = loadAccess() + const preview = tool_name === 'Bash' ? `\n${input_preview}` : '' const text = `🔐 Permission request [${request_id}]\n` + - `${tool_name}: ${description}\n\n` + - `Reply "yes ${request_id}" to allow or "no ${request_id}" to deny.` + `${tool_name}: ${description}` + + preview + + `\n\nReply "yes ${request_id}" to allow or "no ${request_id}" to deny.` // allowFrom holds handle IDs, not chat GUIDs — resolve via qChatsForHandle. // Include SELF addresses so the owner's self-chat gets the prompt even // when allowFrom is empty (default config).