Skip to content

Commit

Permalink
fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
JhontSouth committed Jun 19, 2024
2 parents ddebf9a + 9b61736 commit b928b19
Show file tree
Hide file tree
Showing 569 changed files with 13,255 additions and 1,549 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/ci-javascript-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,5 @@ jobs:

- name: yarn lint
run: |
if ${{ endsWith(matrix.files[0], '.js') }}; then
yarn eslint ${{ join(matrix.files, ' ') }}
else
yarn tslint ${{ join(matrix.files, ' ') }}
fi
yarn eslint ${{ join(matrix.files, ' ') }}
working-directory: ${{ matrix.folder }}
7 changes: 0 additions & 7 deletions INSTALLING_CLI_TOOLS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,3 @@

To learn more about the Bot Framework Command Line Tools, please visit the [BF CLI github repository](https://aka.ms/bfcli) or the [BF CLI Overview documentation](https://docs.microsoft.com/en-us/azure/bot-service/bf-cli-overview).


## Legacy CLI Tools

__The following page is about the legacy tools.__

The older, legacy, CLI tools can be found here:
https://github.com/Microsoft/botbuilder-tools
128 changes: 0 additions & 128 deletions SPEC.md

This file was deleted.

21 changes: 1 addition & 20 deletions experimental/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,6 @@ Each sample contains a reference to the backing GitHub issue(s) that frames the

The samples found in this folder are experimental, do not necessarily relate to one another, are stand-alone, and are not meant to be viewed in any particular order. None of the samples in the **experimental** folder should be used with bots running in a production environment.

Experimental samples written in C# may have dependencies on assemblies pushed on the team's daily build feed. To understand how to use assemblies from the daily build feed refer to [Using MyGet to consume daily builds](https://github.com/microsoft/botbuilder-dotnet/blob/master/UsingMyGet.md) for further instructions.
Experimental samples written in C# may have dependencies on assemblies pushed on the team's daily build feed. To understand how to use assemblies from the daily build feed refer to [Consuming daily builds of the SDK](https://github.com/microsoft/botbuilder-dotnet/blob/master/dailyBuilds.md) for further instructions.



## Experimental samples list

Experimental samples are organized per platform.


| Sample Name | Description | .NET CORE | NodeJS | .NET Web API | Typescript |
|-----------------------|--------------------------------------------------------------------------------|-------------|-------------|--------------|-------------|
|multilingual-luis-bot| The sample shows how to use the library through Middleware to support multilingual interaction with bots in general and LUIS bots in particular. |[View][cs#1] | | | [View][ts#1] |

[cs#1]: ./multilingual-luis/csharp_dotnetcore

[cs#2]: ./qnamaker-activelearning/csharp_dotnetcore

[wa#2]: ./csharp_webapi/#

[ts#1]: ./multilingual-luis/javascript_typescript

[js#1]: ./qnamaker-activelearning/javascript_nodejs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ private async Task BackgroundProcessing(CancellationToken stoppingToken)
}
else
{
_logger.LogError("Work item not processed. Server is shutting down.", nameof(BackgroundProcessing));
_logger.LogError("Work item not processed. Server is shutting down.");
}
}
finally
Expand All @@ -148,7 +148,7 @@ private Task GetTaskFromWorkItem(ActivityWithClaims activityWithClaims, Cancella
catch (Exception ex)
{
// Bot Errors should be processed in the Adapter.OnTurnError.
_logger.LogError(ex, "Error occurred executing WorkItem.", nameof(HostedActivityService));
_logger.LogError(ex, "Error occurred executing WorkItem.");
}
}, stoppingToken);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ private async Task BackgroundProcessing(CancellationToken stoppingToken)
}
else
{
_logger.LogError("Work item not processed. Server is shutting down.", nameof(BackgroundProcessing));
_logger.LogError("Work item not processed. Server is shutting down.");
}
}
finally
Expand All @@ -127,7 +127,7 @@ private Task GetTaskFromWorkItem(Func<CancellationToken, Task> workItem, Cancell
catch (Exception ex)
{
// Bot Errors should be processed in the Adapter.OnTurnError.
_logger.LogError(ex, "Error occurred executing WorkItem.", nameof(HostedTaskService));
_logger.LogError(ex, "Error occurred executing WorkItem.");
}
}, stoppingToken);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//
// Generated with Bot Builder V4 SDK Template for Visual Studio EchoBot v4.9.2

using System;
using System.Collections.Generic;
Expand Down Expand Up @@ -74,7 +72,7 @@ private async Task HandlePauseOrBackground(ITurnContext turnContext, string text
// validate seconds were received in the text
if (seconds < 1 || seconds > _shutdownTimeoutSeconds)
{
await turnContext.SendActivityAsync($"Please enter seconds < {_shutdownTimeoutSeconds} > 0, and processing type. Example: 4 seconds or 4 background", cancellationToken: cancellationToken).ConfigureAwait(false);
await turnContext.SendActivityAsync($"Please enter seconds < {_shutdownTimeoutSeconds} > 0, and processing type. Example: 4 pause or 4 background", cancellationToken: cancellationToken).ConfigureAwait(false);
}
else
{
Expand All @@ -93,7 +91,7 @@ private async Task HandlePauseOrBackground(ITurnContext turnContext, string text
if (text.Contains("pause"))
{
await turnContext.SendActivityAsync($"okay, pausing {seconds} seconds", cancellationToken: cancellationToken);
Thread.Sleep(TimeSpan.FromSeconds(seconds));
await Task.Delay(TimeSpan.FromSeconds(seconds), cancellationToken);
await turnContext.SendActivityAsync($"finished pausing {seconds} seconds {message}", cancellationToken: cancellationToken);
}
else
Expand All @@ -120,7 +118,7 @@ await adapter.ContinueConversationAsync(_botId, conversationReference, async (in

private async Task SendHelp(ITurnContext turnContext, CancellationToken cancellationToken)
{
await turnContext.SendActivityAsync(MessageFactory.Text("send: 4 seconds ... and i will pause for 4 seconds while processing your message."), cancellationToken);
await turnContext.SendActivityAsync(MessageFactory.Text("send: 4 pause ... and i will pause for 4 seconds while processing your message."), cancellationToken);
await turnContext.SendActivityAsync(MessageFactory.Text("send: 4 background ... and i will push your message to an additional background thread to process for 4 seconds."), cancellationToken);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//
// Generated with Bot Builder V4 SDK Template for Visual Studio CoreBot v4.9.2

using System;
using System.Net;
Expand All @@ -14,7 +12,6 @@
using Microsoft.Bot.Builder.TraceExtensions;
using Microsoft.Bot.Connector.Authentication;
using Microsoft.Bot.Schema;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;

namespace ImmediateAcceptBot
Expand All @@ -25,10 +22,10 @@ namespace ImmediateAcceptBot
/// </summary>
/// <remarks>
/// If the activity is Not an Invoke, and DeliveryMode is Not ExpectReplies, and this
/// is NOT a Get request to upgrade to WebSockets, then the activity will be enqueuedto be processed
/// is NOT a Get request to upgrade to WebSockets, then the activity will be enqueued to be processed
/// on a background thread.
/// </remarks>
public class ImmediateAcceptAdapter : BotFrameworkHttpAdapter, IBotFrameworkHttpAdapter
public class ImmediateAcceptAdapter : CloudAdapter
{
private readonly IActivityTaskQueue _activityTaskQueue;

Expand All @@ -38,8 +35,8 @@ public class ImmediateAcceptAdapter : BotFrameworkHttpAdapter, IBotFrameworkHttp
/// <param name="configuration"></param>
/// <param name="logger"></param>
/// <param name="activityTaskQueue"></param>
public ImmediateAcceptAdapter(IConfiguration configuration, ILogger<BotFrameworkHttpAdapter> logger, IActivityTaskQueue activityTaskQueue)
: base(configuration, logger)
public ImmediateAcceptAdapter(BotFrameworkAuthentication auth, ILogger<IBotFrameworkHttpAdapter> logger, IActivityTaskQueue activityTaskQueue)
: base(auth, logger)
{
_activityTaskQueue = activityTaskQueue;

Expand Down Expand Up @@ -72,7 +69,7 @@ public ImmediateAcceptAdapter(IConfiguration configuration, ILogger<BotFramework
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive
/// notice of cancellation.</param>
/// <returns>A task that represents the work queued to execute.</returns>
async Task IBotFrameworkHttpAdapter.ProcessAsync(HttpRequest httpRequest, HttpResponse httpResponse, IBot bot, CancellationToken cancellationToken = default)
public new async Task ProcessAsync(HttpRequest httpRequest, HttpResponse httpResponse, IBot bot, CancellationToken cancellationToken = default)
{
if (httpRequest == null)
{
Expand Down Expand Up @@ -116,10 +113,10 @@ async Task IBotFrameworkHttpAdapter.ProcessAsync(HttpRequest httpRequest, HttpRe
try
{
// If authentication passes, queue a work item to process the inbound activity with the bot
var claimsIdentity = await JwtTokenValidation.AuthenticateRequest(activity, authHeader, CredentialProvider, ChannelProvider, HttpClient).ConfigureAwait(false);
var authResult = await BotFrameworkAuthentication.AuthenticateRequestAsync(activity, authHeader, cancellationToken).ConfigureAwait(false);

// Queue the activity to be processed by the ActivityBackgroundService
_activityTaskQueue.QueueBackgroundActivity(claimsIdentity, activity);
_activityTaskQueue.QueueBackgroundActivity(authResult.ClaimsIdentity, activity);

// Activity has been queued to process, so return Ok immediately
httpResponse.StatusCode = (int)HttpStatusCode.OK;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net8</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.1" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.10.2" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.4" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//
// Generated with Bot Builder V4 SDK Template for Visual Studio EchoBot v4.9.2

using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;

namespace ImmediateAcceptBot
{
Expand All @@ -19,6 +18,11 @@ public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.ConfigureLogging((logging) =>
{
logging.AddDebug();
logging.AddConsole();
});
webBuilder.UseStartup<Startup>();
});
}
Expand Down
Loading

0 comments on commit b928b19

Please sign in to comment.