Slack: own message tool blocks schema
This commit is contained in:
parent
a14ad01d66
commit
11720510f5
@ -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({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user