mirror of
https://github.com/stablyai/orca.git
synced 2026-10-23 08:03:39 +00:00
perf(runtime): reuse terminal title during summary build
This commit is contained in:
@@ -33049,6 +33049,7 @@ export class OrcaRuntimeService {
|
||||
const tab = this.tabs.get(leaf.tabId) ?? null
|
||||
|
||||
const pty = leaf.ptyId ? this.ptysById.get(leaf.ptyId) : undefined
|
||||
const title = getLatestLeafTitle(leaf, tab?.title ?? null)
|
||||
// Why: leaf.connected mirrors the renderer graph (`ptyId !== null`), so a
|
||||
// restored surface whose PTY died with a prior run still reads connected.
|
||||
// Demote only on a controller-proven absence, and only for locally-scoped
|
||||
@@ -33074,7 +33075,7 @@ export class OrcaRuntimeService {
|
||||
branch: worktree?.branch ?? '',
|
||||
tabId: leaf.tabId,
|
||||
leafId: leaf.leafId,
|
||||
title: getLatestLeafTitle(leaf, tab?.title ?? null),
|
||||
title,
|
||||
connected: provenAbsent ? false : leaf.connected,
|
||||
writable: provenAbsent ? false : leaf.writable,
|
||||
lastOutputAt: leaf.lastOutputAt,
|
||||
@@ -33084,7 +33085,7 @@ export class OrcaRuntimeService {
|
||||
...this.resolvePaneAgentIdentityField(
|
||||
pty?.launchAgent,
|
||||
pty?.foregroundAgent,
|
||||
getLatestLeafTitle(leaf, tab?.title ?? null)
|
||||
title
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -35045,6 +35046,7 @@ export class OrcaRuntimeService {
|
||||
worktreesById: Map<string, ResolvedWorktree>
|
||||
): RuntimeTerminalSummary {
|
||||
const worktree = worktreesById.get(pty.worktreeId)
|
||||
const title = getLatestPtyTitle(pty)
|
||||
|
||||
const pane = parsePaneKey(pty.paneKey ?? '')
|
||||
const orphaned = !pty.tabId || !pane || pane.tabId !== pty.tabId
|
||||
@@ -35058,7 +35060,7 @@ export class OrcaRuntimeService {
|
||||
branch: worktree?.branch ?? '',
|
||||
tabId: orphaned ? `pty:${pty.ptyId}` : pty.tabId!,
|
||||
leafId: orphaned ? `pty:${pty.ptyId}` : pane.leafId,
|
||||
title: getLatestPtyTitle(pty),
|
||||
title,
|
||||
connected: pty.connected,
|
||||
writable: pty.connected,
|
||||
lastOutputAt: pty.lastOutputAt,
|
||||
@@ -35068,7 +35070,7 @@ export class OrcaRuntimeService {
|
||||
...this.resolvePaneAgentIdentityField(
|
||||
pty.launchAgent,
|
||||
pty.foregroundAgent,
|
||||
getLatestPtyTitle(pty)
|
||||
title
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user