feat: «Здесь» from a machine's file pane opens the terminal in that pane's folder (the agent starts the shell there; an older agent, or a folder gone, at home)

This commit is contained in:
redtea committed 2026-10-16 18:17:11 +03:00
1 parent 4fb26a9652
commit 57c2f1338f
10 files changed
+143 -12

No files matched your search

+2 -2
View File
@@ -16,8 +16,8 @@ import (
// runTerminal spawns a PTY and bridges it to the session.
// user is the OS user to run the shell as ("" = the agent's own user).
func (a *Agent) runTerminal(parent context.Context, sid, user string) {
term, err := StartPTY(user)
func (a *Agent) runTerminal(parent context.Context, sid, user, dir string) {
term, err := StartPTY(user, dir)
if err != nil {
log.Printf("term %s: start pty: %v", sid, err)
// Show the reason in the browser terminal before closing it.