mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 08:37:41 +00:00
feat: unify provider reaction tools
This commit is contained in:
18
src/agents/tools/telegram-tool.ts
Normal file
18
src/agents/tools/telegram-tool.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { loadConfig } from "../../config/config.js";
|
||||
import type { AnyAgentTool } from "./common.js";
|
||||
import { handleTelegramAction } from "./telegram-actions.js";
|
||||
import { TelegramToolSchema } from "./telegram-schema.js";
|
||||
|
||||
export function createTelegramTool(): AnyAgentTool {
|
||||
return {
|
||||
label: "Telegram",
|
||||
name: "telegram",
|
||||
description: "Manage Telegram reactions.",
|
||||
parameters: TelegramToolSchema,
|
||||
execute: async (_toolCallId, args) => {
|
||||
const params = args as Record<string, unknown>;
|
||||
const cfg = loadConfig();
|
||||
return await handleTelegramAction(params, cfg);
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user