replit-tools 1.1.8 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -235,6 +235,19 @@ claude_prompt() {
|
|
|
235
235
|
return 0
|
|
236
236
|
fi
|
|
237
237
|
|
|
238
|
+
# LOOP PREVENTION: Track if we've already prompted this terminal session
|
|
239
|
+
local prompt_marker="${REPLIT_TOOLS}/.prompt-shown-${TERMINAL_ID}"
|
|
240
|
+
|
|
241
|
+
# If we've already shown the prompt for this terminal, skip
|
|
242
|
+
if [ -f "$prompt_marker" ]; then
|
|
243
|
+
# Clear old markers (older than 12 hours)
|
|
244
|
+
find "${REPLIT_TOOLS}" -name ".prompt-shown-*" -mmin +720 -delete 2>/dev/null
|
|
245
|
+
return 0
|
|
246
|
+
fi
|
|
247
|
+
|
|
248
|
+
# Mark that we're showing the prompt (create marker BEFORE showing)
|
|
249
|
+
touch "$prompt_marker" 2>/dev/null
|
|
250
|
+
|
|
238
251
|
local running=$(count_claude_instances)
|
|
239
252
|
local last_session=$(get_terminal_last_session)
|
|
240
253
|
|
|
@@ -287,7 +300,7 @@ claude_prompt() {
|
|
|
287
300
|
# Get session IDs for selection
|
|
288
301
|
local session_ids=$(get_recent_sessions | grep "^ID|" | cut -d'|' -f2)
|
|
289
302
|
|
|
290
|
-
read -p " Enter number (or 'q' to cancel): " session_num
|
|
303
|
+
read -t 30 -p " Enter number (or 'q' to cancel): " session_num
|
|
291
304
|
|
|
292
305
|
if [ "$session_num" = "q" ] || [ -z "$session_num" ]; then
|
|
293
306
|
echo " Cancelled."
|
|
@@ -338,7 +351,13 @@ export TERMINAL_ID
|
|
|
338
351
|
# Press 's' to skip and just get a shell.
|
|
339
352
|
# Set CLAUDE_NO_PROMPT=true to disable entirely.
|
|
340
353
|
|
|
341
|
-
|
|
354
|
+
# Reset prompt marker and show menu
|
|
355
|
+
claude_menu() {
|
|
356
|
+
local prompt_marker="${REPLIT_TOOLS}/.prompt-shown-${TERMINAL_ID}"
|
|
357
|
+
rm -f "$prompt_marker" 2>/dev/null
|
|
358
|
+
claude_prompt
|
|
359
|
+
}
|
|
360
|
+
alias claude-menu='claude_menu'
|
|
342
361
|
|
|
343
362
|
if [ "${CLAUDE_NO_PROMPT}" != "true" ]; then
|
|
344
363
|
claude_prompt
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
# Run this script on every container restart via .config/bashrc or .replit
|
|
14
14
|
# =============================================================================
|
|
15
15
|
|
|
16
|
-
set -e
|
|
16
|
+
# NOTE: Do NOT use 'set -e' here - this script is sourced into bashrc
|
|
17
|
+
# and any error would exit the user's shell, causing restart loops
|
|
17
18
|
|
|
18
19
|
# Configuration - use .replit-tools structure
|
|
19
20
|
WORKSPACE="/home/runner/workspace"
|