refactor: extract callback resolution helper / 抽出 callback resolution helper

This commit is contained in:
Alice (OpenClaw)
2026-05-13 15:07:14 +08:00
parent e8b47ae809
commit cd2df025a7
2 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
import type { ReplyEndChoice, TelegramInlineButton } from "../types.js"
import { buildReplyEndAcknowledgement } from "./openclaw-telegram-poc.js"
import { buildTelegramReplyEndButtonsForResolvedChoice } from "./openclaw-telegram-bridge.js"
export type TelegramCallbackResolution = {
choice: ReplyEndChoice
buttons: TelegramInlineButton[][]
acknowledgement: string
}
export function buildTelegramCallbackResolution(choice: ReplyEndChoice): TelegramCallbackResolution {
return {
choice,
buttons: buildTelegramReplyEndButtonsForResolvedChoice(choice),
acknowledgement: buildReplyEndAcknowledgement(choice),
}
}