feat(coding-agent): default ssh extension remote cwd to ~

This commit is contained in:
Mario Zechner 2026-01-08 20:27:09 +01:00
parent aa89080ea0
commit b0e5954cf8

View file

@ -14,7 +14,6 @@
*/
import { spawn } from "node:child_process";
import { basename } from "node:path";
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
import {
type BashOperations,
@ -124,7 +123,7 @@ export default function (pi: ExtensionAPI) {
const getSsh = () => {
const arg = pi.getFlag("ssh") as string | undefined;
if (!arg) return null;
const [remote, path] = arg.includes(":") ? arg.split(":") : [arg, `~/${basename(localCwd)}`];
const [remote, path] = arg.includes(":") ? arg.split(":") : [arg, "~"];
return { remote, remoteCwd: path };
};