Conversation
Replace clet's internal Abstractions/, Registry/, Json/, and Hosting infrastructure (CommandLineRoot, AliasDispatcher, OutputFormatter, ExitCodes, etc.) with the Terminal.Gui.Cli NuGet package (0.1.0-develop.2). Key changes: - Add Terminal.Gui.Cli 0.1.0-develop.2 PackageReference - Delete src/Clet/Abstractions/, Registry/, Json/ directories - Delete hosting files replaced by CliHost (CommandLineRoot, AliasDispatcher, OutputFormatter, ExitCodes, CletTypeNames, TerminalEscapeSanitizer, MarkdownHelpRenderer, HelpClet) - Rewrite Program.cs to use CliHost from the package - Create BuiltInCommands.cs, CletHelpProvider.cs, CletOptionsExtensions.cs - Update all 14 input clets and 3 viewer clets to use package types (ICliCommand<T>, CommandResult<T>, CommandStatus, CommandRunOptions) - Clet-specific options (--allow-file, --allow-binary, --no-browse) registered as GlobalOptionDescriptor, accessed via Extensions dictionary - Delete 7 unit test files for package-owned infrastructure - Update all remaining test files for new type names - Update CLAUDE.md architecture section and README.md Resolves #180 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- RenderCatAsync now passes options.Initial to content resolution, restoring --initial support in --cat mode - RenderCatAsync uses resolved.Content directly instead of re-reading only the first file, fixing multi-file concatenation - CletHelpProvider normalizes legacy clet:help: scheme to help: - Remove unused using System.Reflection from Program.cs - Add tests for RenderCatAsync initial content and multi-file rendering - Add test for help provider link scheme normalization - Document input-too-large exit code package limitation in ExitCodesTests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adopt Terminal.Gui.Cli package, replacing internal CLI infrastructure
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e7b907cbe2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // NOTE: spec requires input-too-large → 65, but the package maps all unknown error codes to 2. | ||
| // Tracked upstream: Terminal.Gui.Cli needs a custom exit code mapper or treating | ||
| // "input-too-large" as a validation error. See PR #185 review discussion. | ||
| [InlineData ((int)CommandStatus.Error, "input-too-large", 2)] |
There was a problem hiding this comment.
Restore validation exit for input-too-large errors
This changed expectation codifies the package default of returning usage error 2 for input-too-large, but clet still emits that code for oversized stdin in MarkdownContentResolver and for oversized --initial, and specs/clet-spec.md requires those cases to exit 65. In practice clet md --json with >8 MiB on stdin, or a known command with an oversized --initial, now takes the wrong exit-code path for scripts/agents that distinguish validation failures from bad CLI usage; keep a clet-specific exit-code mapper instead of accepting the package fallback.
Useful? React with 👍 / 👎.
Summary
Merge develop into main to release the Terminal.Gui.Cli package adoption.
Included changes
Validation
Release workflow will compute the next rc version automatically from existing tags.