mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 18:20:42 +00:00
22 lines
743 B
TypeScript
22 lines
743 B
TypeScript
import type { ChannelMessageActionAdapter } from "openclaw/plugin-sdk/channel-contract";
|
|
import { isSlackInteractiveRepliesEnabled } from "./interactive-replies.js";
|
|
import { listSlackMessageActions } from "./message-actions.js";
|
|
|
|
export function describeSlackMessageTool({
|
|
cfg,
|
|
accountId,
|
|
}: Parameters<NonNullable<ChannelMessageActionAdapter["describeMessageTool"]>>[0]) {
|
|
const actions = listSlackMessageActions(cfg, accountId);
|
|
const capabilities = new Set<"presentation">();
|
|
if (actions.includes("send")) {
|
|
capabilities.add("presentation");
|
|
}
|
|
if (isSlackInteractiveRepliesEnabled({ cfg, accountId })) {
|
|
capabilities.add("presentation");
|
|
}
|
|
return {
|
|
actions,
|
|
capabilities: Array.from(capabilities),
|
|
};
|
|
}
|