mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-18 18:03:44 +00:00
feat(coding-agent): default ssh extension remote cwd to ~
This commit is contained in:
parent
aa89080ea0
commit
b0e5954cf8
1 changed files with 1 additions and 2 deletions
|
|
@ -14,7 +14,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { spawn } from "node:child_process";
|
import { spawn } from "node:child_process";
|
||||||
import { basename } from "node:path";
|
|
||||||
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
||||||
import {
|
import {
|
||||||
type BashOperations,
|
type BashOperations,
|
||||||
|
|
@ -124,7 +123,7 @@ export default function (pi: ExtensionAPI) {
|
||||||
const getSsh = () => {
|
const getSsh = () => {
|
||||||
const arg = pi.getFlag("ssh") as string | undefined;
|
const arg = pi.getFlag("ssh") as string | undefined;
|
||||||
if (!arg) return null;
|
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 };
|
return { remote, remoteCwd: path };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue