Skip to content

v10.2.5 - Enhance console app with Spectre.Console menu, dynamic example discovery, and ChatClientLLMProvider docs#8

Merged
techbuzzz merged 3 commits into
mainfrom
develop
Jul 6, 2026
Merged

v10.2.5 - Enhance console app with Spectre.Console menu, dynamic example discovery, and ChatClientLLMProvider docs#8
techbuzzz merged 3 commits into
mainfrom
develop

Conversation

@techbuzzz

Copy link
Copy Markdown
Owner

This PR modernizes the Delibera.ConsoleApp with a Spectre.Console-powered
interactive experience and documents the Microsoft.Extensions.AI integration.

Changes

Console app (Spectre.Console)

  • Add Spectre.Console 0.57.2 NuGet reference
  • Replace the hardcoded ASCII banner with FigletText + centered Text + Rule
  • Replace the manual args.Contains("--xyz") if-chain with a dynamic
    ExampleRegistry that discovers every example by reflection
  • Add an interactive SelectionPrompt menu (grouped by category) shown when
    no CLI flag is given and stdin is a TTY
  • Add --list to print the example catalog as a Spectre table
  • Preserve all documented CLI flags as stable ids / aliases (--di, --msai,
    --chatclient, --pgvector, --multiprovider, --separate-files, --rag,
    --operator, --operator-mcp, --autochunking, --cancellation,
    --resilience, --compression, --quick)
  • Migrate the default debate path to Spectre markup (Markup.Escape for model
    output) and Rule separators; keep WriteLogEntry/WriteErrorEntry on
    Console for thread-safe streaming
  • Replace the ad-hoc fatal-error block with a Spectre Panel (rounded border)
  • Add a --chatclient example (ChatClientLLMProviderExample) demonstrating
    ChatClientLLMProvider + MicrosoftAIExtensions (chat, streaming,
    embeddings, reverse bridge) using local Ollama, with the OpenAI variant in
    comments

Documentation

  • Add docs/ChatClientLLMProvider.md — full provider list (OpenAI, Azure
    OpenAI, Microsoft Foundry, Anthropic, Ollama, GitHub Copilot, LM Studio /
    vLLM / LocalAI, ONNX, custom), interop bridge table, OpenAI / Azure /
    Ollama / OpenAI-compatible / streaming / embeddings / DI examples,
    capabilities & limitations
  • Update src/README.md:
    • New "🔌 Pluggable LLM Backends (Microsoft.Extensions.AI)" section with a
      providers table, interop table, and link to the new doc
    • Add --chatclient and --msai to the ConsoleApp examples block
    • Add Microsoft.Extensions.AI to the NuGet dependencies table
    • Add the new section to the Table of Contents

Related Issues

N/A

Type of Change

  • ✨ New feature (non-breaking change that adds functionality)
  • 📚 Documentation update
  • 🧹 Refactor / chore

Checklist

  • My code follows the project's coding standards
  • The solution builds with 0 errors and 0 warnings (dotnet build)
  • I have added/updated XML documentation for public APIs
    (ExampleRegistry, ExampleEntry)
  • I have updated relevant documentation (README.md,
    docs/ChatClientLLMProvider.md)
  • I have tested my changes (--list resolves all 14 examples; documented
    flags resolve via the alias system)

Additional Notes

  • Adding a new example file under Examples/ requires zero changes to
    Program.cs or ExampleRegistry — it is auto-discovered. Add curated
    metadata (title/category/aliases) to ExampleRegistry.Metadata only when
    you want a friendly id or aliases beyond the auto-derived kebab name.
  • The default config-driven debate path is fully preserved; only the output
    rendering changed (Spectre markup instead of Console.WriteLine).
  • WriteLogEntry/WriteErrorEntry intentionally stay on Console (not
    AnsiConsole.MarkupLine) because they fire from the executor's background
    threads and may contain arbitrary model output with Spectre markup chars.

techbuzzz added 3 commits July 6, 2026 11:43
Introduce universal ChatClientLLMProvider for Microsoft.Extensions.AI IChatClient interop, enabling plug-and-play support for OpenAI, Azure OpenAI, Anthropic, Ollama, Copilot, LM Studio, vLLM, LocalAI, ONNX, and more. Add runnable example and update Program.cs with --chatclient option. Document usage, DI, and limitations in README and new ChatClientLLMProvider.md. Enhance OllamaProvider and ProviderFactory to support maxOutputTokens (fixing truncated responses), update caching, and improve error handling. Bump version to 10.2.5.
- Dynamically discover and dispatch examples with explicit IDs and aliases
- Replace hardcoded CLI flag checks with ExampleRegistry.Find
- Add --list flag to show all examples in a Spectre.Console table
- Implement interactive menu for example selection
- Migrate output to Spectre.Console markup and tables
- Update banner and error reporting with Spectre.Console
- Centralize example execution and error handling
- Modernize and clean up main program flow
@techbuzzz techbuzzz self-assigned this Jul 6, 2026
@techbuzzz techbuzzz added the enhancement New feature or request label Jul 6, 2026
@techbuzzz techbuzzz merged commit b24923c into main Jul 6, 2026
2 checks passed
@techbuzzz techbuzzz deleted the develop branch July 6, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant