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

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,

)`

SessionApplyResult

Constructor

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

Properties

PropertyTypeDescription
okbool
messageString
branchString?
rejectedFilesList<String>

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.