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
| Property | Type | Description |
|---|---|---|
meta | SessionMeta | |
sessionDir | String | |
patchPath | String? | |
patchSizeBytes | int? | |
ok | bool | |
message | String | |
branch | String? | |
rejectedFiles | List<String> | |
inPlace | required SessionSummary session, required String targetDir, String? branch, bool | |
patchPath | final | |
inRepo | final | |
am | final | |
apply | final | |
rejected | final |
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
| Property | Type | Description |
|---|---|---|
ok | bool | |
message | String | |
branch | String? | |
rejectedFiles | List<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.