mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 17:50:27 +00:00
Plugins: remove first-party legacy message discovery shims
This commit is contained in:
@@ -7,7 +7,6 @@ import {
|
||||
import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
|
||||
import { resolveReactionMessageId } from "openclaw/plugin-sdk/channel-runtime";
|
||||
import {
|
||||
createLegacyMessageToolDiscoveryMethods,
|
||||
createMessageToolButtonsSchema,
|
||||
createTelegramPollExtraToolSchemas,
|
||||
createUnionActionGate,
|
||||
@@ -178,7 +177,6 @@ function readTelegramMessageIdParam(params: Record<string, unknown>): number {
|
||||
|
||||
export const telegramMessageActions: ChannelMessageActionAdapter = {
|
||||
describeMessageTool: describeTelegramMessageTool,
|
||||
...createLegacyMessageToolDiscoveryMethods(describeTelegramMessageTool),
|
||||
extractToolSend: ({ args }) => {
|
||||
return extractToolSend(args, "sendMessage");
|
||||
},
|
||||
|
||||
@@ -250,12 +250,6 @@ function hasTelegramExecApprovalDmRoute(cfg: OpenClawConfig): boolean {
|
||||
const telegramMessageActions: ChannelMessageActionAdapter = {
|
||||
describeMessageTool: (ctx) =>
|
||||
getTelegramRuntime().channel.telegram.messageActions?.describeMessageTool?.(ctx) ?? null,
|
||||
listActions: (ctx) =>
|
||||
getTelegramRuntime().channel.telegram.messageActions?.listActions?.(ctx) ?? [],
|
||||
getCapabilities: (ctx) =>
|
||||
getTelegramRuntime().channel.telegram.messageActions?.getCapabilities?.(ctx) ?? [],
|
||||
getToolSchema: (ctx) =>
|
||||
getTelegramRuntime().channel.telegram.messageActions?.getToolSchema?.(ctx) ?? null,
|
||||
extractToolSend: (ctx) =>
|
||||
getTelegramRuntime().channel.telegram.messageActions?.extractToolSend?.(ctx) ?? null,
|
||||
handleAction: async (ctx) => {
|
||||
|
||||
Reference in New Issue
Block a user