feat: expose per-surface TTY in tree output (#2040)
Add tty field to surface items in system.tree JSON response, reading from existing surfaceTTYNames dictionary. Also show tty= in the CLI text tree output for terminals that have a registered TTY. This enables external tools (e.g. CodeV) to cross-reference claude process TTYs with cmux surfaces for accurate session detection when multiple sessions share the same working directory.
This commit is contained in:
parent
b24a53dc06
commit
2a2374afcf
2 changed files with 5 additions and 1 deletions
|
|
@ -8565,6 +8565,9 @@ struct CMUXCLI {
|
|||
if (surface["here"] as? Bool) == true {
|
||||
parts.append("◀ here")
|
||||
}
|
||||
if let tty = surface["tty"] as? String, !tty.isEmpty {
|
||||
parts.append("tty=\(tty)")
|
||||
}
|
||||
if surfaceType.lowercased() == "browser",
|
||||
let url = surface["url"] as? String,
|
||||
!url.isEmpty {
|
||||
|
|
|
|||
|
|
@ -2849,7 +2849,8 @@ class TerminalController {
|
|||
"selected_in_pane": v2OrNull(selectedInPaneByPanelId[panel.id]),
|
||||
"pane_id": v2OrNull(paneUUID?.uuidString),
|
||||
"pane_ref": v2Ref(kind: .pane, uuid: paneUUID),
|
||||
"index_in_pane": v2OrNull(indexInPaneByPanelId[panel.id])
|
||||
"index_in_pane": v2OrNull(indexInPaneByPanelId[panel.id]),
|
||||
"tty": v2OrNull(workspace.surfaceTTYNames[panel.id])
|
||||
]
|
||||
|
||||
if panel.panelType == .browser, let browserPanel = panel as? BrowserPanel {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue