diff --git a/examples/dotnet/dotnet-01-echo-bot/dotnet-01-echo-bot.csproj b/examples/dotnet/dotnet-01-echo-bot/dotnet-01-echo-bot.csproj index e6271195..a43734c6 100644 --- a/examples/dotnet/dotnet-01-echo-bot/dotnet-01-echo-bot.csproj +++ b/examples/dotnet/dotnet-01-echo-bot/dotnet-01-echo-bot.csproj @@ -11,6 +11,7 @@ + diff --git a/examples/dotnet/dotnet-02-message-types-demo/dotnet-02-message-types-demo.csproj b/examples/dotnet/dotnet-02-message-types-demo/dotnet-02-message-types-demo.csproj index ac2abaae..7d9a2058 100644 --- a/examples/dotnet/dotnet-02-message-types-demo/dotnet-02-message-types-demo.csproj +++ b/examples/dotnet/dotnet-02-message-types-demo/dotnet-02-message-types-demo.csproj @@ -12,8 +12,12 @@ - + + + + + diff --git a/examples/dotnet/dotnet-03-simple-chatbot/Properties/launchSettings.json b/examples/dotnet/dotnet-03-simple-chatbot/Properties/launchSettings.json deleted file mode 100644 index b8f34920..00000000 --- a/examples/dotnet/dotnet-03-simple-chatbot/Properties/launchSettings.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "profiles": { - "http": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": false, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "https": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": false, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} \ No newline at end of file diff --git a/examples/dotnet/dotnet-03-simple-chatbot/dotnet-03-simple-chatbot.csproj b/examples/dotnet/dotnet-03-simple-chatbot/dotnet-03-simple-chatbot.csproj index 83dd6ccc..6d176abe 100644 --- a/examples/dotnet/dotnet-03-simple-chatbot/dotnet-03-simple-chatbot.csproj +++ b/examples/dotnet/dotnet-03-simple-chatbot/dotnet-03-simple-chatbot.csproj @@ -12,8 +12,12 @@ - + + + + + diff --git a/libraries/dotnet/WorkbenchConnector/Webservice.cs b/libraries/dotnet/WorkbenchConnector/Webservice.cs index 26f64eb8..1b841b62 100644 --- a/libraries/dotnet/WorkbenchConnector/Webservice.cs +++ b/libraries/dotnet/WorkbenchConnector/Webservice.cs @@ -461,7 +461,6 @@ private static IEndpointRouteBuilder UseCreateConversationEventEndpoint(); if (feat == null || feat.Addresses.Count == 0) { @@ -434,13 +446,13 @@ public virtual void Init() ? $"{uri.Scheme}://127.0.0.1:{uri.Port}/{this.WorkbenchConfig.ConnectorApiPrefix.TrimStart('/')}" : $"{uri.Scheme}://127.0.0.1:/{this.WorkbenchConfig.ConnectorApiPrefix.TrimStart('/')}"; - this.Log.LogTrace("Init complete, connector endpoint: {Endpoint}", this.ConnectorEndpoint); + this.Log.LogTrace("Initialization complete, connector endpoint: {Endpoint}", this.ConnectorEndpoint); this.EnablePingTimer(); } #pragma warning disable CA1031 catch (Exception e) { - this.Log.LogError(e, "Init error"); + this.Log.LogError(e, "Initialization error: {Message}", e.Message); this.EnableInitTimer(); } #pragma warning restore CA1031 @@ -461,7 +473,7 @@ public virtual async Task PingSemanticWorkbenchBackendAsync(CancellationToken ca name = $"{this.WorkbenchConfig.ConnectorName} [{this.WorkbenchConfig.ConnectorId}]", description = this.WorkbenchConfig.ConnectorDescription, url = this.ConnectorEndpoint, - online_expires_in_seconds = 2 + (int)(PingFrequencyMS / 1000) + online_expires_in_seconds = 2 + (int)(PingFrequencyMsecs / 1000) }; await this.SendAsync(HttpMethod.Put, path, data, null, "PingSWBackend", cancellationToken).ConfigureAwait(false); @@ -474,7 +486,7 @@ public virtual async Task PingSemanticWorkbenchBackendAsync(CancellationToken ca #region internals =========================================================================== - private const int PingFrequencyMS = 20000; + private const int PingFrequencyMsecs = 20000; public void Dispose() { diff --git a/tools/run-app.sh b/tools/run-app.sh index 4674b860..29461169 100755 --- a/tools/run-app.sh +++ b/tools/run-app.sh @@ -9,8 +9,8 @@ cd workbench-app # Check node version, it must be major version 20 (any minor), otherwise show an error and exit NODE_VERSION=$(node -v) -if [[ $NODE_VERSION != v20.* ]]; then - echo "Node version is $NODE_VERSION, expected 20.x.x." +if [[ ! $NODE_VERSION =~ ^v(1[8-9]|[2-9][0-9]).* ]]; then + echo "Node version is $NODE_VERSION, expected 18.x.x or higher." # Attempt to source nvm if [ -s "$NVM_DIR/nvm.sh" ]; then @@ -19,18 +19,18 @@ if [[ $NODE_VERSION != v20.* ]]; then export NVM_DIR="$HOME/.nvm" . "$NVM_DIR/nvm.sh" else - echo "nvm not found. Please install Node 20 manually." + echo "nvm not found. Please install Node 18 or higher manually." echo "See also README.md for instructions." exit 1 fi - echo "Installing Node 20 via nvm..." - nvm install 20 - nvm use 20 + echo "Installing latest LTS Node version via nvm..." + nvm install --lts + nvm use --lts NODE_VERSION=$(node -v) - if [[ $NODE_VERSION != v20.* ]]; then - echo "Failed to switch to Node 20 via nvm. You have $NODE_VERSION." + if [[ ! $NODE_VERSION =~ ^v(1[8-9]|[2-9][0-9]).* ]]; then + echo "Failed to switch to Node 18 or higher via nvm. You have $NODE_VERSION." exit 1 fi fi