custom-copilot-basic/src/adapter.js
Reads secret-like credential env variableContains a hardcoded remote HTTP(S) URL
SHA-2566feebe2a27bdaa715486ff3cb2838f7dc6c5dc90e7569aa6295df2eacfbc7f35
MaleculeH₂(CmOs)
Evidence
1// Import required bot services.
2// See https://aka.ms/bot-services to learn more about the different parts of a bot.
3const {
4 CloudAdapter,
5 ConfigurationServiceClientCredentialFactory …
6:16… BotFrameworkAuthentication,
7} = require("botbuilder");
8
9const config = require("./config");
10
11const botFrameworkAuthentication = new Configurati …
13:49… y({
14 MicrosoftAppId: config.botId,
15 MicrosoftAppPassword: process.env.BOT_PASSWORD,
16 MicrosoftAppType: "MultiTenant",
17 })
⋯4 lines
22:29… pter(botFrameworkAuthentication);
23
24// Catch-all for errors.
25const onTurnErrorHandler = async (context, error) => {
26 // This check writes out errors to console log .vs. app insights.
27 // NOTE: In production environment, yo …
34:26… ceActivity(
35 "OnTurnError Trace",
36 `${error}`,
37 "https://www.botframework.com/schemas/error",
38 "TurnError"
39 );
40
41 // Send a message to the user
42 await context.sendActivity("The bot encountered …