qwen-code/test-scripts/heartbeat.sh
tanzhenxin b48e3caa75 feat(shell): enable PTY by default and various enhancements
### Shell & Interactive Terminal Improvements
- PTY shell is now enabled by default instead of disabled
- Improved shell output rendering, process termination, and added fallback warning
- Background commands now properly capture subprocess PIDs on non-Windows

### Coding Plan Improvements
- Simplified auth message, added /model tip, improved system info display
- Reordered model list to prioritize glm-5, kimi-k2.5, MiniMax-M2.5
- Model selection is now preserved when updating if the model still exists

### Other Changes
- Added shared symlink utility; debug logs now have latest alias
- Unknown settings warnings go to debug log instead of user-facing warnings
- Fixed subagent confirmation state detection
- Removed debug UI from AgentCreationWizard

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-05 11:28:13 +08:00

24 lines
560 B
Bash
Executable file

#!/bin/bash
# Heartbeat script for testing interactive shell PTY behavior
# - Emits a numbered line every second
# - Writes to both stdout and a log file for verification
# - Handles SIGTERM/SIGINT gracefully
LOG="/tmp/heartbeat_test.log"
echo "started at $(date)" > "$LOG"
cleanup() {
echo "received signal, shutting down" >> "$LOG"
echo "[heartbeat] shutting down"
exit 0
}
trap cleanup SIGTERM SIGINT
i=1
while true; do
echo "[heartbeat] tick $i ($(date +%H:%M:%S))"
echo "tick $i at $(date +%H:%M:%S)" >> "$LOG"
i=$((i + 1))
sleep 1
done