-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·34 lines (27 loc) · 802 Bytes
/
Copy pathrun.sh
File metadata and controls
executable file
·34 lines (27 loc) · 802 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env sh
set -eu
ROOT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
cd "$ROOT_DIR"
LANGFUSE_ENV="$ROOT_DIR/.codeagent/langfuse.env"
if [ -f "$LANGFUSE_ENV" ]; then
set -a
. "$LANGFUSE_ENV"
set +a
fi
export LANGFUSE_BASE_URL="${LANGFUSE_BASE_URL:-http://localhost:3000}"
export LANGFUSE_SAMPLE_RATE="${LANGFUSE_SAMPLE_RATE:-1}"
if command -v uv >/dev/null 2>&1; then
exec uv run pcode "$@"
fi
if [ -x "$ROOT_DIR/.venv/bin/python" ]; then
PYTHON="$ROOT_DIR/.venv/bin/python"
else
PYTHON=python3
fi
export PYTHONPATH="$ROOT_DIR/src${PYTHONPATH:+:$PYTHONPATH}"
exec "$PYTHON" -m codeagent.pcode_cli "$@"
# pcode # TUI
# pcode chat # TUI
# pcode agent "..." # 旧 ReAct agent
# ./run.sh # TUI
# ./run.sh agent # 旧 ReAct agent