Skip to content

SessionCommand

Category: Commands

Source: session_command.dart

Classes

SessionSummary

Constructor

dart
const SessionSummary({
    required this.meta,
    required this.sessionDir,
    required this.patchPath,
    required this.patchSizeBytes,
  })
dart
factory SessionSummary.from(SessionMeta meta, Environment env)

Properties

PropertyTypeDescription
metaSessionMeta
sessionDirString
patchPathString?
patchSizeBytesint?
okbool
messageString
branchString?
rejectedFilesList<String>
inPlacerequired SessionSummary session, required String targetDir, String? branch, bool
patchPathfinal
inRepofinal
amfinal
applyfinal
rejectedfinal
nameString get
descriptionString get
nameString get
descriptionString get
matchesfinal
nameString get
descriptionString get
nameString get
descriptionString get
nameString get
descriptionString get
nameString get
descriptionString get
nameString get
descriptionString get
nameString get
descriptionString get
nameString get
descriptionString get
nameString get
descriptionString get
nameString get
descriptionString get
nameString get
descriptionString get

Methods

`const SessionApplyResult({
required this.ok,
required this.message,
this.branch,
this.rejectedFiles = const [],

})`

`return SessionApplyResult(
ok: false,
message:
    'git am and git apply both failed. Inspect rejections or apply '
    'manually:\n  ${apply.stderr.toString().trim().split('\n').join('\n  ')}',
branch: branch,
rejectedFiles: rejected,

)`

Future<int> run()
Future<int> run()
Future<int> run()
Future<int> run()
Future<int> run()

SessionApplyResult

Constructor

dart
const SessionApplyResult({
    required this.ok,
    required this.message,
    this.branch,
    this.rejectedFiles = const [],
  })

Properties

PropertyTypeDescription
okbool
messageString
branchString?
rejectedFilesList<String>

SessionCommand

Constructor

dart
SessionCommand()

Properties

PropertyTypeDescription
nameString get
descriptionString get
nameString get
descriptionString get

SessionListCommand

Properties

PropertyTypeDescription
nameString get
descriptionString get
nameString get
descriptionString get

Methods

Future<int> run()

SessionShowCommand

Properties

PropertyTypeDescription
nameString get
descriptionString get
nameString get
descriptionString get

Methods

Future<int> run()

SessionDiffCommand

Properties

PropertyTypeDescription
nameString get
descriptionString get
nameString get
descriptionString get

Methods

Future<int> run()

SessionApplyCommand

Constructor

dart
SessionApplyCommand()

Properties

PropertyTypeDescription
nameString get
descriptionString get
nameString get
descriptionString get

Methods

Future<int> run()

SessionExportCommand

Constructor

dart
SessionExportCommand()

Properties

PropertyTypeDescription
nameString get
descriptionString get
nameString get
descriptionString get

Methods

Future<int> run()

Functions

List<SessionSummary> listSessions(Environment env)

Loads all sessions from the on-disk store sorted by start time descending. Sessions without a runtime patch on disk are still listed — call sites distinguish via [SessionSummary.patchPath].

`Future<SessionApplyResult> applySessionPatch({

required SessionSummary session, required String targetDir, String? branch, bool inPlace = false, })`

Applies a session's runtime.mbox to [targetDir] using git am --3way. When [branch] is provided (Q6 default behavior — glue session apply always creates a branch unless --in-place), a fresh branch is created from the current HEAD and switched to before applying.

Released under the MIT License.