feat(msteams): wire agent integration for Teams messages
- Integrate dispatchReplyFromConfig() for full agent routing - Add msteams to TextChunkProvider and OriginatingChannelType - Add msteams case to route-reply (proactive not yet supported) - Strip @mention HTML tags from Teams messages - Fix session key to exclude messageid suffix - Add typing indicator support - Add proper logging for debugging
This commit is contained in:
@@ -17,7 +17,8 @@ export type TextChunkProvider =
|
||||
| "slack"
|
||||
| "signal"
|
||||
| "imessage"
|
||||
| "webchat";
|
||||
| "webchat"
|
||||
| "msteams";
|
||||
|
||||
const DEFAULT_CHUNK_LIMIT_BY_PROVIDER: Record<TextChunkProvider, number> = {
|
||||
whatsapp: 4000,
|
||||
@@ -27,6 +28,7 @@ const DEFAULT_CHUNK_LIMIT_BY_PROVIDER: Record<TextChunkProvider, number> = {
|
||||
signal: 4000,
|
||||
imessage: 4000,
|
||||
webchat: 4000,
|
||||
msteams: 4000,
|
||||
};
|
||||
|
||||
export function resolveTextChunkLimit(
|
||||
|
||||
@@ -145,6 +145,14 @@ export async function routeReply(
|
||||
};
|
||||
}
|
||||
|
||||
case "msteams": {
|
||||
// TODO: Implement proactive messaging for MS Teams
|
||||
return {
|
||||
ok: false,
|
||||
error: `MS Teams routing not yet supported for queued replies`,
|
||||
};
|
||||
}
|
||||
|
||||
default: {
|
||||
const _exhaustive: never = channel;
|
||||
return { ok: false, error: `Unknown channel: ${String(_exhaustive)}` };
|
||||
|
||||
@@ -6,7 +6,8 @@ export type OriginatingChannelType =
|
||||
| "signal"
|
||||
| "imessage"
|
||||
| "whatsapp"
|
||||
| "webchat";
|
||||
| "webchat"
|
||||
| "msteams";
|
||||
|
||||
export type MsgContext = {
|
||||
Body?: string;
|
||||
|
||||
Reference in New Issue
Block a user