Merge pull request #740: feat(terminal): resolve relative path links against the pane's current directory

This commit is contained in:
Codeman maintainer committed 2026-11-04 16:57:30 +01:00
commit 4f50af6a9f
14 files changed
+896 -8

No files matched your search

+12
View File
@@ -969,6 +969,18 @@ also pure decoration: it confers no permission, and a child is unaffected by its
parent exiting. It appears on session state as `parentSessionId` (absent when
unresolved) and survives a server restart.
## Pane directory (`cwd`)
Session state (`GET /api/v1/sessions`, the `session:updated` event) may carry `cwd`,
the directory the session's local tmux pane is in now (`#{pane_current_path}`), which
the web UI uses as the base for a relative path printed in the terminal. It is
never restored after a restart (it is written to `state.json` with the rest of the
session state but not read back), absent for remote,
Docker, direct-PTY and rediscovered sessions and for a session split into several panes,
and never a confinement root: file routes stay confined to `workingDir`.
tmux reports the resolved directory, so for a workspace reached through a symlink a
directory at or under the resolved workspace is reported in `workingDir`'s spelling.
## Session model (`displayModel`)
Session state (`GET /api/v1/sessions`, the `session:updated` event) carries the model a