feat: add OpenClaw Telegram bridge helper / 新增 OpenClaw Telegram bridge helper
This commit is contained in:
23
src/runtime/openclaw-telegram-bridge.ts
Normal file
23
src/runtime/openclaw-telegram-bridge.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import type { ReplyEndChoice, ReplyEndState } from "../types.js"
|
||||
import {
|
||||
applyStopStateToInboundText,
|
||||
buildDefaultReplyEndButtons,
|
||||
buildReplyEndAcknowledgement,
|
||||
buildResolvedReplyEndButtons,
|
||||
} from "./openclaw-telegram-poc.js"
|
||||
|
||||
export function buildTelegramReplyEndButtonsForReply() {
|
||||
return buildDefaultReplyEndButtons()
|
||||
}
|
||||
|
||||
export function buildTelegramReplyEndButtonsForResolvedChoice(choice: ReplyEndChoice) {
|
||||
return buildResolvedReplyEndButtons(choice)
|
||||
}
|
||||
|
||||
export function buildTelegramReplyEndAck(choice: ReplyEndChoice) {
|
||||
return buildReplyEndAcknowledgement(choice)
|
||||
}
|
||||
|
||||
export function applyTelegramReplyEndStopPolicy(text: string, state: ReplyEndState | null) {
|
||||
return applyStopStateToInboundText(text, state)
|
||||
}
|
||||
Reference in New Issue
Block a user