Nabs.Launchpad.Core.Ai.Menu 10.0.229

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Nabs.Launchpad.Core.Ai.Menu --version 10.0.229
                    
NuGet\Install-Package Nabs.Launchpad.Core.Ai.Menu -Version 10.0.229
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Nabs.Launchpad.Core.Ai.Menu" Version="10.0.229" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nabs.Launchpad.Core.Ai.Menu" Version="10.0.229" />
                    
Directory.Packages.props
<PackageReference Include="Nabs.Launchpad.Core.Ai.Menu" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Nabs.Launchpad.Core.Ai.Menu --version 10.0.229
                    
#r "nuget: Nabs.Launchpad.Core.Ai.Menu, 10.0.229"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Nabs.Launchpad.Core.Ai.Menu@10.0.229
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Nabs.Launchpad.Core.Ai.Menu&version=10.0.229
                    
Install as a Cake Addin
#tool nuget:?package=Nabs.Launchpad.Core.Ai.Menu&version=10.0.229
                    
Install as a Cake Tool

NuGet

Nabs.Launchpad.Core.Ai.Menu

Nabs.Launchpad.Core.Ai.Menu provides a strongly typed command registry for building reliable, discoverable AI-driven console menus without fragile reflection or duplicated plumbing.

Installation

dotnet add package Nabs.Launchpad.Core.Ai.Menu

The Problem

// 1) Duplicate command names silently overwrite intent in ad-hoc dictionaries
var commands = new Dictionary<string, Func<Task>>();
commands["run"] = () => Task.CompletedTask;
commands["run"] = () => Task.Delay(1); // accidental replacement

// 2) Exit behavior gets scattered and can appear in inconsistent positions
menuItems.Add("Exit", ExitAsync);
menuItems.Insert(0, "Exit", ExitAsync); // multiple paths, unclear behavior

// 3) Input conversion is hand-rolled and fails late at runtime
var retries = int.Parse(userInput); // throws on invalid input

// 4) Generic command results are hard to normalize
var result = await command.Run(); // each command returns different shapes
if (result == null) { /* unclear failure handling */ }

Features

  • Strongly typed menu command registration with IMenuCommand<TResult> and IMenuCommand<TInput, TResult> support.
  • Duplicate name protection to prevent conflicting command registrations.
  • Consistent exit command ordering, keeping exit actions at the end of the menu.
  • Built-in string-to-input conversion for typed commands (including enum support).
  • Unified execution result model via MenuCommandExecutionResult.

Usage

using Ardalis.Result;
using Nabs.Launchpad.Core.Ai;
using Nabs.Launchpad.Core.Ai.Menu;

public sealed class GreetCommand : IMenuCommand<string, string>
{
	public string ChoiceLabel => "Say hello";
	public string Name => "greet";
	public string Description => "Greets a user by name.";

	public Task<Result<string>> RunMenuAsync(string input)
	{
		return Task.FromResult(Result.Success($"Hello, {input}!"));
	}
}

var registry = new MenuCommandRegistry();
registry.AddHeading("AI Utility Menu");
registry.ConfigureMenuCommands(
[
	new GreetCommand(),
	new ExitMenuCommand()
]);

var greet = registry.MenuCommands.Single(c => c.Name == "greet");
var execution = await greet.RunMenuAsync("Launchpad");

if (execution.IsSuccess)
{
	Console.WriteLine(execution.Value);
}

Configuration

No package-level configuration is required. Register commands at runtime through MenuCommandRegistry.

Project Structure

  • MenuCommandRegistry - registers commands, validates uniqueness, orders exit commands, and executes commands.
  • MenuCommandRegistration - immutable registration record containing metadata and executable delegate.
  • MenuCommandExecutionResult - normalized execution response (IsSuccess, Value, ValidationErrors).
  • ExitMenuCommand - default exit command implementation.
  • IMenuPrompt - minimal prompt contract exposing a command registry.

License

Copyright (c) Net Advantage Business Solutions.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.239 8 6/3/2026
10.0.234 54 5/31/2026
10.0.233 51 5/31/2026
10.0.232 56 5/30/2026
10.0.230 53 5/30/2026
10.0.229 47 5/30/2026