Documentation
¶
Overview ¶
Package models owns model-list selection and interactive presentation.
Index ¶
- func Configure(root *cli.Command, policy Options)
- func Interrupt(err error) error
- func IsListSource[T any](source jsonview.Iterator[T]) bool
- func NeedsViewport(content string, width, height int) bool
- func PrintHint(count, width int) string
- func RenderTable(ctx context.Context, items []gjson.Result, width int, diagnostics bool) (string, bool, error)
- func Select[T any](ctx context.Context, source jsonview.Iterator[T], maximum int64) (context.Context, jsonview.Iterator[clioutput.JSON], bool, error)
- func StopLoading(ctx context.Context)
- func WriteList[T any](iter *clioutput.Iterator[T], opts listview.Options, width, height int) error
- type ListError
- type LoadingInterrupt
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsListSource ¶
IsListSource admits only the SDK single-response pager or selected records. Cursor pagers must remain lazy even if operation metadata says models.
func NeedsViewport ¶
NeedsViewport preserves display-cell widths and space for the shell prompt.
func PrintHint ¶
PrintHint describes printing every selected record from the single response. Keep counts whole when the terminal cannot fit the complete hint.
func RenderTable ¶
func RenderTable(ctx context.Context, items []gjson.Result, width int, diagnostics bool) (string, bool, error)
RenderTable lists IDs and owners. Explicit formats and printing retain the complete records through their existing presentation paths.
func Select ¶
func Select[T any](ctx context.Context, source jsonview.Iterator[T], maximum int64) (context.Context, jsonview.Iterator[clioutput.JSON], bool, error)
Select uses only the SDK's already-loaded models response. Cursor pagers must never enter a path that collects all their pages before displaying data.
func StopLoading ¶
StopLoading joins loading feedback before results write to the terminal.
Types ¶
type ListError ¶
type ListError struct {
// contains filtered or unexported fields
}
ListError contains only fixed guidance, never filter values or response data.
type LoadingInterrupt ¶
type LoadingInterrupt struct {
// contains filtered or unexported fields
}
LoadingInterrupt retains cancellation and the command interrupt exit status.
func (*LoadingInterrupt) ExitCode ¶
func (e *LoadingInterrupt) ExitCode() int
func (*LoadingInterrupt) Unwrap ¶
func (e *LoadingInterrupt) Unwrap() error