Repository navigation
String pipeline rich return - #15
Merged
Merged
Conversation
- expose per-template outputs alongside rendered strings - share rendering logic across single and structured input formats - add coverage for rich result behavior and error propagation
- Store rendered ranges instead of owned strings - Add `RichFormatResult::template_output` for borrowed access - Update docs and rich-format tests to use the new API
- Add getters for template output positions and rendered ranges - Add accessors for rendered output and template outputs - Mark rich result types non-exhaustive for API stability
- Add README and docs coverage for rich rendering - Update examples for `rendered()` and per-section outputs - Clarify `RichFormatResult` and `TemplateOutput` behavior
- Update docs and examples to use `Template` - Mark `MultiTemplate` as a compatibility alias - Refresh debug/template docs for literal-text templates
- Promote `Template` as the primary API - Keep `MultiTemplate` as a deprecated compatibility alias - Update parser, CLI, and tests to use the new name
lalvarezt
added a commit
that referenced
this pull request
Apr 5, 2026
* feat: add rich formatting results for template pipelines - expose per-template outputs alongside rendered strings - share rendering logic across single and structured input formats - add coverage for rich result behavior and error propagation * refactor: expose rich template outputs as borrowed slices - Store rendered ranges instead of owned strings - Add `RichFormatResult::template_output` for borrowed access - Update docs and rich-format tests to use the new API * refactor: expose rich format result accessors - Add getters for template output positions and rendered ranges - Add accessors for rendered output and template outputs - Mark rich result types non-exhaustive for API stability * docs: document rich template rendering APIs - Add README and docs coverage for rich rendering - Update examples for `rendered()` and per-section outputs - Clarify `RichFormatResult` and `TemplateOutput` behavior * refactor: rename public template API to `Template` - Update docs and examples to use `Template` - Mark `MultiTemplate` as a compatibility alias - Refresh debug/template docs for literal-text templates * refactor: rename MultiTemplate to Template - Promote `Template` as the primary API - Keep `MultiTemplate` as a deprecated compatibility alias - Update parser, CLI, and tests to use the new name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a rich rendering path for templates and makes
Templatethe canonical public API.The main driver is enabling downstream callers such as to distinguish literal template text from rendered template substitutions, so they can safely escape only the dynamic parts when building shell commands.
Changes
TemplateMultiTemplateas a compatibility alias, with removal planned for the next major releaseparse_template_sectionsas the canonical parser helper and deprecateparse_multi_template