WithSnapshotController plumbs in the [builtins.SnapshotController] the App uses to drive /undo, /snapshots, /reset. Pass the same controller to the runtime via runtime.WithAutoInjector so the instance that captures the checkpoints is the one the TUI commands drive. Pass nil (or omit the option) for
(c builtins.SnapshotController)
| 115 | // snapshots; the App then reports SnapshotsEnabled()==false and the |
| 116 | // related commands silently no-op. |
| 117 | func WithSnapshotController(c builtins.SnapshotController) Opt { |
| 118 | return func(a *App) { |
| 119 | a.snapshotController = c |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | func New(ctx context.Context, rt runtime.Runtime, sess *session.Session, opts ...Opt) *App { |
| 124 | app := &App{ |
no outgoing calls