You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 15, 2025. It is now read-only.
# Handle terminal multiplexer selection (tmux or screen)
197
+
if [ "${var.experiment_use_tmux}" = "true" ] && [ "${var.experiment_use_screen}" = "true" ]; then
198
+
echo "Error: Both experiment_use_tmux and experiment_use_screen cannot be true simultaneously."
199
+
echo "Please set only one of them to true."
200
+
exit 1
201
+
fi
202
+
203
+
# Determine goose command
204
+
if command_exists goose; then
205
+
GOOSE_CMD=goose
206
+
elif [ -f "$HOME/.local/bin/goose" ]; then
207
+
GOOSE_CMD="$HOME/.local/bin/goose"
208
+
else
209
+
echo "Error: Goose is not installed. Please enable install_goose or install it manually."
210
+
exit 1
211
+
fi
212
+
213
+
# Run with tmux if enabled
214
+
if [ "${var.experiment_use_tmux}" = "true" ]; then
215
+
echo "Running Goose in the background with tmux..."
216
+
217
+
# Check if tmux is installed
218
+
if ! command_exists tmux; then
219
+
echo "Error: tmux is not installed. Please install tmux manually."
220
+
exit 1
221
+
fi
222
+
223
+
touch "$HOME/.goose.log"
224
+
225
+
export LANG=en_US.UTF-8
226
+
export LC_ALL=en_US.UTF-8
227
+
228
+
# Create a new tmux session in detached mode
229
+
tmux new-session -d -s goose -c ${var.folder} "$GOOSE_CMD run --text \"Review your goosehints. Every step of the way, report tasks to Coder with proper descriptions and statuses. Your task at hand: $GOOSE_TASK_PROMPT\" --interactive | tee -a \"$HOME/.goose.log\""
190
230
# Run with screen if enabled
191
-
if [ "${var.experiment_use_screen}" = "true" ]; then
231
+
elif [ "${var.experiment_use_screen}" = "true" ]; then
192
232
echo "Running Goose in the background..."
193
233
194
234
# Check if screen is installed
@@ -217,16 +257,6 @@ EOL
217
257
export LANG=en_US.UTF-8
218
258
export LC_ALL=en_US.UTF-8
219
259
220
-
# Determine goose command
221
-
if command_exists goose; then
222
-
GOOSE_CMD=goose
223
-
elif [ -f "$HOME/.local/bin/goose" ]; then
224
-
GOOSE_CMD="$HOME/.local/bin/goose"
225
-
else
226
-
echo "Error: Goose is not installed. Please enable install_goose or install it manually."
227
-
exit 1
228
-
fi
229
-
230
260
screen -U -dmS goose bash -c "
231
261
cd ${var.folder}
232
262
\"$GOOSE_CMD\" run --text \"Review your goosehints. Every step of the way, report tasks to Coder with proper descriptions and statuses. Your task at hand: $GOOSE_TASK_PROMPT\" --interactive | tee -a \"$HOME/.goose.log\"
0 commit comments