From 4d5409280527cd1c1eab515d314d5c694e92a145 Mon Sep 17 00:00:00 2001 From: somethingwentwell Date: Fri, 13 Mar 2026 02:15:28 +0800 Subject: [PATCH] feat: improve teams integration and registration UX --- .../versions/add_microsoft_teams_support.py | 3 +- frontend/src/pages/AgentCreate.tsx | 30 ++++++++++++++++++ frontend/src/pages/Login.tsx | 31 +++++++++++-------- 3 files changed, 50 insertions(+), 14 deletions(-) diff --git a/backend/alembic/versions/add_microsoft_teams_support.py b/backend/alembic/versions/add_microsoft_teams_support.py index f02ebed..d09aa6c 100644 --- a/backend/alembic/versions/add_microsoft_teams_support.py +++ b/backend/alembic/versions/add_microsoft_teams_support.py @@ -12,7 +12,8 @@ def upgrade() -> None: # Add 'microsoft_teams' to im_provider_enum op.execute("ALTER TYPE im_provider_enum ADD VALUE IF NOT EXISTS 'microsoft_teams'") - op.add_column('chat_messages', sa.Column('thinking', sa.Text(), nullable=True)) + # Add 'thinking' column to chat_messages if it does not already exist + op.execute("ALTER TABLE chat_messages ADD COLUMN IF NOT EXISTS thinking TEXT") # Add 'microsoft_teams' to channel_type_enum op.execute("ALTER TYPE channel_type_enum ADD VALUE IF NOT EXISTS 'microsoft_teams'") diff --git a/frontend/src/pages/AgentCreate.tsx b/frontend/src/pages/AgentCreate.tsx index 4a53fc6..077f6bb 100644 --- a/frontend/src/pages/AgentCreate.tsx +++ b/frontend/src/pages/AgentCreate.tsx @@ -560,6 +560,36 @@ export default function AgentCreate() { )} + {/* Microsoft Teams (configure after creation in Agent settings) */} +
+
+ {/* Simple Teams icon */} + +
+
Microsoft Teams
+
+ Teams Bot (configure details in Agent Settings after creation) +
+
+ + Available + +
+
+ {/* Other channels — coming soon */} {[ { icon: '💬', name: t('wizard.step5.dingtalk', 'DingTalk'), desc: t('wizard.step5.dingtalkDesc', 'DingTalk custom robot integration') }, diff --git a/frontend/src/pages/Login.tsx b/frontend/src/pages/Login.tsx index 3a1bfcf..f7a085e 100644 --- a/frontend/src/pages/Login.tsx +++ b/frontend/src/pages/Login.tsx @@ -174,19 +174,24 @@ export default function Login() { placeholder={t('auth.emailPlaceholder')} /> -
- - -
+ + {/* Only show company selector if there are tenants to choose from */} + {tenants.length > 0 && ( +
+ + +
+ )} + {invitationRequired && (