Slack: add new slack connection
This commit is contained in:
committed by
Peter Steinberger
parent
4b3ca29404
commit
bf3d120f8c
18
src/agents/tools/slack-tool.ts
Normal file
18
src/agents/tools/slack-tool.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { loadConfig } from "../../config/config.js";
|
||||
import type { AnyAgentTool } from "./common.js";
|
||||
import { handleSlackAction } from "./slack-actions.js";
|
||||
import { SlackToolSchema } from "./slack-schema.js";
|
||||
|
||||
export function createSlackTool(): AnyAgentTool {
|
||||
return {
|
||||
label: "Slack",
|
||||
name: "slack",
|
||||
description: "Manage Slack messages, reactions, and pins.",
|
||||
parameters: SlackToolSchema,
|
||||
execute: async (_toolCallId, args) => {
|
||||
const params = args as Record<string, unknown>;
|
||||
const cfg = loadConfig();
|
||||
return await handleSlackAction(params, cfg);
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user