fix: Chat SDK bridge delivery and typing for non-Discord adapters
- Use platformId directly as thread ID in deliver() and setTyping() instead of calling encodeThreadId with Discord-shaped args — platformId is already in the adapter's encoded format (e.g. "telegram:6037840640") - Add triggerTyping() in delivery.ts, call from router on message route - Enable Telegram channel in barrel - Verified E2E: Telegram message in → agent → typing indicator → response Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -42,6 +42,15 @@ export function setDeliveryAdapter(adapter: ChannelDeliveryAdapter): void {
|
||||
deliveryAdapter = adapter;
|
||||
}
|
||||
|
||||
/** Show typing indicator on a channel. Called when a message is routed to the agent. */
|
||||
export async function triggerTyping(channelType: string, platformId: string, threadId: string | null): Promise<void> {
|
||||
try {
|
||||
await deliveryAdapter?.setTyping?.(channelType, platformId, threadId);
|
||||
} catch {
|
||||
// Typing is best-effort — don't fail routing if it errors
|
||||
}
|
||||
}
|
||||
|
||||
/** Start the active container poll loop (~1s). */
|
||||
export function startActiveDeliveryPoll(): void {
|
||||
if (activePolling) return;
|
||||
|
||||
Reference in New Issue
Block a user