Skip to content

Conversation

@MattB-msft
Copy link
Member

Introduce the DispatcherAgent with essential models, configuration files, and telemetry capabilities to facilitate bot interactions and performance tracking.


app.Run();

static void BotSetup(IHostApplicationBuilder builder)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this instead of ServiceCollectionExtensions.AddBot and adding additional DI separately?

@rido-min
Copy link
Member

I'm seeing some warnings

/workspaces/Agents/samples/complex/dispatcher/dotnet/Dispatcher/DispatcherAgent.csproj : warning NU1507: There are 2 package sources defined in your configuration. When using central package management, please map your package sources with package source mapping (https://aka.ms/nuget-package-source-mapping) or specify a single package source. The following sources are defined: NightlyFeed, nuget.org

/workspaces/Agents/samples/complex/dispatcher/dotnet/Dispatcher/DispatcherBot.cs(27,29): warning CS9124: Parameter 'IStorage storage' is captured into the state of the enclosing type and its value is also used to initialize a field, property, or event. [/workspaces/Agents/samples/complex/dispatcher/dotnet/Dispatcher/DispatcherAgent.csproj]

/workspaces/Agents/samples/complex/dispatcher/dotnet/Dispatcher/Model/MCSAgents.cs(180,58): warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread. [/workspaces/Agents/samples/complex/dispatcher/dotnet/Dispatcher/DispatcherAgent.csproj]

"Microsoft.AspNetCore": "Warning"
}
}
/*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments are not permitted in JSON, and shows errors in VSCode


namespace DispatcherAgent.Utils
{
public static class Utilities
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we split the methods in this class to other classes with better names? Seems to me the methods to get the conversation links should be in a different class that then ones related to oauth flows

builder.Services.AddHttpClient();

// Add AspNet Authentication suitable for token validation for a Bot Service bot (ABS- or SMBA)
builder.Services.AddBotAspNetAuthentication(builder.Configuration);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line throws NRE if config is not set

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants