Skip to content

Commit 01ea423

Browse files
Add REPL state initialization to fix first input issue
- Add throwaway readline() to clear REPL state before token input - This prevents the first token paste from being interpreted as Julia code - User just needs to press Enter once to initialize the input system - Subsequent token input should work correctly without REPL interference Fixes the "first paste goes to REPL" issue reported by user. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent ad28074 commit 01ea423

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

lib/LinearSolveAutotune/src/telemetry.jl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,21 @@ function setup_github_authentication()
1515
# No environment variable - provide setup instructions and get token
1616
max_input_attempts = 3
1717

18+
# Handle REPL state issue by doing a throwaway first attempt
19+
if max_input_attempts > 1
20+
println()
21+
println("🔧 Initializing input system...")
22+
print("Press Enter to continue: ")
23+
flush(stdout)
24+
try
25+
sleep(0.1)
26+
readline() # Throwaway read to clear REPL state
27+
catch
28+
# Ignore any errors from this throwaway attempt
29+
end
30+
println("✅ Input system ready!")
31+
end
32+
1833
for input_attempt in 1:max_input_attempts
1934
println()
2035
println("🚀 Help Improve LinearSolve.jl for Everyone!")

0 commit comments

Comments
 (0)