diff --git a/.env.example b/.env.example index 1dea953..a33b43a 100644 --- a/.env.example +++ b/.env.example @@ -1,5 +1,6 @@ # Direct Line (basic, no streaming) VITE_TOKEN_ENDPOINT=https://your-environment.api.powerplatform.com/powervirtualagents/botsbyschema/your-agent/directline/token?api-version=2022-03-01-preview +VITE_DIRECTLINE_DOMAIN=https://europe.directline.botframework.com/v3/directline # M365 Agents SDK (streaming support) - use with ?m365 URL param VITE_ENVIRONMENT_ID=your-environment-id diff --git a/src/App.jsx b/src/App.jsx index ff7d6fd..4877c3b 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -13,7 +13,10 @@ function App() { useEffect(() => { getDirectLineToken() .then(token => { - setDirectLine(createDirectLine({ token })); + setDirectLine(createDirectLine({ + token, + domain: import.meta.env.VITE_DIRECTLINE_DOMAIN || undefined + })); }) .catch(err => { console.error('Failed to initialize DirectLine:', err);