Slack: own message tool blocks schema

This commit is contained in:
Gustavo Madeira Santana 2026-03-17 23:47:54 +00:00
parent a14ad01d66
commit 11720510f5
No known key found for this signature in database

View File

@ -7,6 +7,7 @@ import {
resolveSlackChannelId,
handleSlackMessageAction,
} from "../../plugin-sdk/slack.js";
import { createSlackMessageToolBlocksSchema } from "./message-tool-schema.js";
import type { ChannelMessageActionAdapter } from "./types.js";
type SlackActionInvoke = (
@ -31,6 +32,14 @@ export function createSlackActions(
}
return Array.from(capabilities);
},
getToolSchema: ({ cfg }) =>
listSlackMessageActions(cfg).includes("send")
? {
properties: {
blocks: createSlackMessageToolBlocksSchema(),
},
}
: null,
extractToolSend: ({ args }) => extractSlackToolSend(args),
handleAction: async (ctx) => {
return await handleSlackMessageAction({