Clarify inspection input ownership and documentation

This commit is contained in:
2026-10-11 13:07:00 +00:00
parent cec4da69d3
commit 7ce2fc0bf2
8 changed files with 67 additions and 27 deletions

View File

@@ -26,8 +26,8 @@ type definitionInput[I any] struct {
// Command captures the optional named PromptKit inspection tree and adds only
// the inspection capabilities present in suite. It adds no configuration
// family; callers compose ConfigScope independently. Construction and
// installation do not run suite callbacks. A selected definition command gets
// its own input and one shared state value for that invocation.
// installation do not run suite callbacks. Suite documents invocation input
// and state initialization, zero values, and caller ownership of returned objects.
func Command[I, S any](suite Suite[I, S]) commandkit.Command {
if suite.InspectPrompt == nil && suite.InspectProfile == nil {
command := commandkit.NoCommand()