From bdc91130fef8e0e91ec29c814b96002a396cd2a4 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Sun, 15 Mar 2026 18:49:57 -0700 Subject: [PATCH] Discord: map shared interactive sends in actions --- extensions/discord/src/actions/handle-action.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extensions/discord/src/actions/handle-action.ts b/extensions/discord/src/actions/handle-action.ts index b0842ce25b2..4beb7d76de4 100644 --- a/extensions/discord/src/actions/handle-action.ts +++ b/extensions/discord/src/actions/handle-action.ts @@ -8,7 +8,9 @@ import { readDiscordParentIdParam } from "../../../../src/agents/tools/discord-a import { handleDiscordAction } from "../../../../src/agents/tools/discord-actions.js"; import { resolveReactionMessageId } from "../../../../src/channels/plugins/actions/reaction-message-id.js"; import type { ChannelMessageActionContext } from "../../../../src/channels/plugins/types.js"; +import { normalizeInteractiveReply } from "../../../../src/interactive/payload.js"; import { readBooleanParam } from "../../../../src/plugin-sdk/boolean-param.js"; +import { buildDiscordInteractiveComponents } from "../shared-interactive.js"; import { resolveDiscordChannelId } from "../targets.js"; import { tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin.js"; @@ -40,7 +42,9 @@ export async function handleDiscordMessageAction( if (action === "send") { const to = readStringParam(params, "to", { required: true }); const asVoice = readBooleanParam(params, "asVoice") === true; - const rawComponents = params.components; + const rawComponents = + params.components ?? + buildDiscordInteractiveComponents(normalizeInteractiveReply(params.interactive)); const hasComponents = Boolean(rawComponents) && (typeof rawComponents === "function" || typeof rawComponents === "object");