launch-assistant.sh: run the assistant on sonnet (ASSISTANT_MODEL, default sonnet)
This commit is contained in:
@@ -25,6 +25,7 @@ CLAUDE_BIN="${CLAUDE_BIN:-/home/loops/.local/bin/claude}"
|
|||||||
# flag works. Mirror launch.sh's detection.
|
# flag works. Mirror launch.sh's detection.
|
||||||
if [ "$(id -u)" = "0" ]; then export CLAUDE_DANGEROUSLY_SKIP_PERMISSIONS=1; CLAUDE_FLAGS="${CLAUDE_FLAGS:-}";
|
if [ "$(id -u)" = "0" ]; then export CLAUDE_DANGEROUSLY_SKIP_PERMISSIONS=1; CLAUDE_FLAGS="${CLAUDE_FLAGS:-}";
|
||||||
else CLAUDE_FLAGS="${CLAUDE_FLAGS:---dangerously-skip-permissions}"; fi
|
else CLAUDE_FLAGS="${CLAUDE_FLAGS:---dangerously-skip-permissions}"; fi
|
||||||
|
ASSISTANT_MODEL="${ASSISTANT_MODEL:-sonnet}" # the assistant runs on sonnet (cheaper for task work)
|
||||||
REMOTE_CONTROL="${REMOTE_CONTROL:-1}" # 1 => --remote-control (viewable at claude.ai/code)
|
REMOTE_CONTROL="${REMOTE_CONTROL:-1}" # 1 => --remote-control (viewable at claude.ai/code)
|
||||||
LOG_DIR="${LOG_DIR:-/srv/cc-ci/.cc-ci-logs}"
|
LOG_DIR="${LOG_DIR:-/srv/cc-ci/.cc-ci-logs}"
|
||||||
ID_FILE="${ASSISTANT_ID_FILE:-$LOG_DIR/.assistant-session-id}"
|
ID_FILE="${ASSISTANT_ID_FILE:-$LOG_DIR/.assistant-session-id}"
|
||||||
@@ -70,8 +71,9 @@ start() {
|
|||||||
fi
|
fi
|
||||||
local prompt_arg=""
|
local prompt_arg=""
|
||||||
[[ -n "$STARTUP_PROMPT" ]] && prompt_arg="'$STARTUP_PROMPT'"
|
[[ -n "$STARTUP_PROMPT" ]] && prompt_arg="'$STARTUP_PROMPT'"
|
||||||
|
local model=""; [[ -n "$ASSISTANT_MODEL" ]] && model="--model '$ASSISTANT_MODEL'"
|
||||||
tmux new-session -d -s "$SESSION" -c "$WORKDIR" \
|
tmux new-session -d -s "$SESSION" -c "$WORKDIR" \
|
||||||
"$CLAUDE_BIN $sess $rc $CLAUDE_FLAGS $prompt_arg"
|
"$CLAUDE_BIN $sess $model $rc $CLAUDE_FLAGS $prompt_arg"
|
||||||
tmux pipe-pane -o -t "$SESSION" "cat >> '$LOG_DIR/$SESSION.log'"
|
tmux pipe-pane -o -t "$SESSION" "cat >> '$LOG_DIR/$SESSION.log'"
|
||||||
log "started. status: $0 status | attach: tmux attach -t $SESSION | id: $id"
|
log "started. status: $0 status | attach: tmux attach -t $SESSION | id: $id"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user