/** * Telegram Command Handler * * Handles Telegram-specific UI interactions (inline keyboards, callbacks). * Core commands (/new, /usage, /models, etc.) are handled by the unified command system. */ import type { Context } from 'grammy'; import type { TelegramAccountManager } from './account-manager.js'; import type { Config } from '@xopcai/xopc/config/index.js'; import { type ProviderInfo } from './inline-keyboards.js'; export interface TelegramCommandHandlerDeps { bus: any; config: Config; accountManager: TelegramAccountManager; getSessionModel: (sessionKey: string) => string | undefined; setSessionModel: (sessionKey: string, modelId: string) => void | Promise; showProviderModels?: (ctx: Context, providerId: string) => Promise; showProvidersAgain?: (ctx: Context) => Promise; handleCleanupConfirm?: (ctx: Context) => Promise; } export declare function createTelegramCommandHandler(deps: TelegramCommandHandlerDeps): { handleStart: (ctx: Context) => Promise; handleModels: (ctx: Context) => Promise; handleCleanup: (ctx: Context) => Promise; handleProviderSelect: (ctx: Context, providerId: string) => Promise; handleModelSelect: (ctx: Context, modelId: string) => Promise; handleShowProviders: (ctx: Context) => Promise; handleCleanupConfirm: (ctx: Context) => Promise; handleCancel: (ctx: Context) => Promise; getAvailableProviders: () => Promise; };