Add Sessions web entry point and supporting scripts for session management

This commit is contained in:
Osvaldo Ortega
2026-03-02 18:48:46 -08:00
parent 891f6318a5
commit 71eca7dfec
4 changed files with 228 additions and 0 deletions

27
scripts/code-sessions-web.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/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() {
cd $ROOT
# Sync built-in extensions
npm run download-builtin-extensions
NODE=$(node build/lib/node.ts)
if [ ! -e $NODE ];then
# Load remote node
npm run gulp node
fi
NODE=$(node build/lib/node.ts)
$NODE ./scripts/code-sessions-web.js "$@"
}
code "$@"