mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-09 16:59:43 +02:00
fix(omp): wire ompConfig into respawnPane and default to --continue there
respawnPane() -- the path used when a session's pane died (crash, idle respawn, or the user's own /exit) but the Codeman session object is still tracked -- never had ompConfig wired through at all, in either its options destructure or its inner buildSpawnCommand() call. This is a gap in the original OMP patch, distinct from the resumeHistorySession fix (which only covers a session that has been fully closed and shows up as a history row): reselecting a tab whose CLI process just exited goes through this path instead, and always launched a bare, contextless `omp` no matter what. Beyond the wiring, respawning a dead pane is semantically different from creating a brand-new session: the conversation is still "this session" to the user, so _buildRespawnPaneOptions() now defaults ompConfig to continueSession:true unless the session already carries an explicit resumeSessionId (which still wins in buildOmpCommand). Verified live: told a session a secret, exited OMP so the pane died (session and tmux both left alone), forced the exact dead-pane-respawn path, and the new process replied with the secret -- confirming `omp --continue` fired instead of a blank omp.
This commit is contained in:
+7
-1
@@ -1630,7 +1630,13 @@ export class Session extends EventEmitter {
|
|||||||
piConfig: this._piConfig,
|
piConfig: this._piConfig,
|
||||||
grokConfig: this._grokConfig,
|
grokConfig: this._grokConfig,
|
||||||
deepSeekConfig: this._deepSeekConfig,
|
deepSeekConfig: this._deepSeekConfig,
|
||||||
ompConfig: this._ompConfig,
|
// Respawning a dead pane means the CLI process exited (crash, idle
|
||||||
|
// respawn, or the user's own /exit) but this is still the same
|
||||||
|
// conversation from the user's perspective — unlike a brand-new
|
||||||
|
// `createSession` call, defaulting to --continue here is the honest
|
||||||
|
// behavior. Only when the session has no resume id of its own already
|
||||||
|
// (an explicit resumeSessionId always wins in buildOmpCommand).
|
||||||
|
ompConfig: this._ompConfig?.resumeSessionId ? this._ompConfig : { ...this._ompConfig, continueSession: true },
|
||||||
resumeSessionId: this._resumeSessionId,
|
resumeSessionId: this._resumeSessionId,
|
||||||
envOverrides: this._envOverrides,
|
envOverrides: this._envOverrides,
|
||||||
effort: this._effort,
|
effort: this._effort,
|
||||||
|
|||||||
@@ -2391,6 +2391,7 @@ export class TmuxManager extends EventEmitter implements TerminalMultiplexer {
|
|||||||
piConfig,
|
piConfig,
|
||||||
grokConfig,
|
grokConfig,
|
||||||
deepSeekConfig,
|
deepSeekConfig,
|
||||||
|
ompConfig,
|
||||||
resumeSessionId,
|
resumeSessionId,
|
||||||
envOverrides,
|
envOverrides,
|
||||||
effort,
|
effort,
|
||||||
@@ -2422,6 +2423,7 @@ export class TmuxManager extends EventEmitter implements TerminalMultiplexer {
|
|||||||
piConfig,
|
piConfig,
|
||||||
grokConfig,
|
grokConfig,
|
||||||
deepSeekConfig,
|
deepSeekConfig,
|
||||||
|
ompConfig,
|
||||||
resumeSessionId,
|
resumeSessionId,
|
||||||
effort,
|
effort,
|
||||||
sessionName: name,
|
sessionName: name,
|
||||||
|
|||||||
Reference in New Issue
Block a user