Skip to content

Commit 96fed9f

Browse files
committed
mcp(docs[lifecycle]): mark respawn argv shape as stopgap
Hand-rolled ``pane.cmd("respawn-pane", *argv)`` exists because ``libtmux>=0.55.1`` ships no ``Pane.respawn()`` yet — the wrapper lives on libtmux's ``tmux-parity`` branch and uses the same flag ordering this code mirrors (``-k``, ``-c``, optional trailing shell). The inline note tells future-you that the swap, when ``Pane.respawn`` lands on the release line, is a few lines: drop the argv builder, call ``pane.respawn(kill=, start_directory=, shell=)``, drop the stderr branch (``Pane.respawn`` raises ``LibTmuxException``). Without the comment a reader would assume oversight.
1 parent efb7bcb commit 96fed9f

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/libtmux_mcp/tools/pane_tools/lifecycle.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,13 @@ def respawn_pane(
153153
"Use a manual tmux command if intended."
154154
)
155155
raise ToolError(msg)
156+
# Stopgap: ``libtmux>=0.55.1`` has no ``Pane.respawn()`` yet — the
157+
# wrapper exists on the upstream ``tmux-parity`` branch (see
158+
# ``libtmux/pane.py:respawn``) and mirrors this argv shape (``-k``,
159+
# ``-c <dir>``, optional trailing shell). When the release line picks
160+
# it up, swap ``pane.cmd("respawn-pane", *argv)`` for ``pane.respawn(
161+
# kill=kill, start_directory=start_directory, shell=shell)`` and drop
162+
# the stderr branch — ``Pane.respawn`` raises ``LibTmuxException``.
156163
argv: list[str] = []
157164
if kill:
158165
argv.append("-k")

0 commit comments

Comments
 (0)