Documentation
¶
Overview ¶
Package reviewcmd wires the `cr review` command surface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterWithFactory ¶
func RegisterWithFactory(rootCmd *cobra.Command, opts *root.Options, factory RuntimeFactory)
RegisterWithFactory attaches the review command with an injected runtime factory.
Types ¶
type Runner ¶
type Runner interface {
DryRun(context.Context, pipeline.Request) (pipeline.Result, error)
Live(context.Context, pipeline.Request, reviewrun.Flags) (reviewrun.Result, error)
}
Runner executes the configured review pipeline.
type Runtime ¶
type Runtime struct {
Runner Runner
PostingIdentity gitprovider.Identity
Cleanup func()
}
Runtime contains per-command dependencies that need cleanup after a run.
type RuntimeFactory ¶
type RuntimeFactory func(cmd *cobra.Command, opts *root.Options, cfg config.File, profile config.Profile, runtimeOpts RuntimeOptions) (Runtime, error)
RuntimeFactory builds the concrete runtime used by `cr review`.
type RuntimeOptions ¶
type RuntimeOptions struct {
MaxAgents int
MaxConcurrency int
PRRef gitprovider.PRRef
Retention datalifecycle.RetentionPolicy
RetentionManualOnly bool
AutoUnlockWorkbenchOnExit bool
ResolveRepoRoot func(context.Context) (string, error)
GitCommand func(context.Context, string, ...string) ([]byte, error)
}
RuntimeOptions carries command flags that affect runtime construction.
type SelectionRuntime ¶ added in v0.3.68
type SelectionRuntime struct {
Provider gitprovider.GitProvider
Adapter llm.Adapter
Cleanup func()
}
SelectionRuntime contains the dependencies needed for selection-only execution paths that must match review-command runtime semantics.
func OpenSelectionRuntime ¶ added in v0.3.68
func OpenSelectionRuntime(_ context.Context, backend string, backendFlagChanged bool, cfg config.File, profile config.Profile) (SelectionRuntime, error)
OpenSelectionRuntime resolves provider and adapter setup using the same semantics as the real review command.
Click to show internal directories.
Click to hide internal directories.