Files
vscode/scripts/code-agent-host.sh
Connor Peet e9299757f2 first working protocol version
align more closely with protocol

json rpc and some gaps
2026-03-11 14:25:45 -07:00

32 lines
601 B
Bash
Executable File

#!/usr/bin/env bash
if [[ "$OSTYPE" == "darwin"* ]]; then
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
ROOT=$(dirname $(dirname $(realpath "$0")))
else
ROOT=$(dirname $(dirname $(readlink -f $0)))
fi
function code() {
pushd $ROOT
# Get electron, compile, built-in extensions
if [[ -z "${VSCODE_SKIP_PRELAUNCH}" ]]; then
node build/lib/preLaunch.ts
fi
NODE=$(node build/lib/node.ts)
if [ ! -e $NODE ];then
# Load remote node
npm run gulp node
fi
popd
NODE_ENV=development \
VSCODE_DEV=1 \
exec "$NODE" "$ROOT/scripts/code-agent-host.js" "$@"
}
code "$@"