import { helloWorldAgent } from './helloAgent'; import { Conversation } from './types'; import dotenv from 'dotenv'; dotenv.config(); export type Handler = string | ((conv: Conversation) => Promise); export const chatHandlers: Record = { '50498554225@c.us': process.env.CONVERSATION_AGENT_URL || 'http://conversation-layer-agent:8001', // Add other mappings like: // '50496210031@c.us': 'http://llm-agent:8000' }; export function getHandler(chatId: string | undefined, defaultUrl?: string): Handler | undefined { if (!chatId) return defaultUrl; return chatHandlers[chatId] || defaultUrl; }