@anthropic-ai/claude-code 0.2.53 → 0.2.55
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/claude-restart.sh +7 -3
- package/cli.js +904 -545
- package/package.json +1 -1
package/claude-restart.sh
CHANGED
|
@@ -7,10 +7,14 @@
|
|
|
7
7
|
# 2. Monitors the CLI process for a special exit code (42)
|
|
8
8
|
# 3. If the special exit code is detected, it restarts the CLI with the same arguments
|
|
9
9
|
|
|
10
|
-
# Get the
|
|
11
|
-
|
|
10
|
+
# Get the real path of this script by using Node.js to follow all symlinks
|
|
11
|
+
SCRIPT_PATH="${BASH_SOURCE[0]}"
|
|
12
|
+
REAL_SCRIPT_PATH=$(/usr/bin/env node -e "console.log(require('fs').realpathSync('$SCRIPT_PATH'))")
|
|
12
13
|
|
|
13
|
-
#
|
|
14
|
+
# Get the directory of the real script
|
|
15
|
+
SCRIPT_DIR="$( dirname "$REAL_SCRIPT_PATH" )"
|
|
16
|
+
|
|
17
|
+
# Path to cli.js - look for it in the same directory as this script
|
|
14
18
|
CLI_PATH="$SCRIPT_DIR/cli.js"
|
|
15
19
|
|
|
16
20
|
# DO NOT change the current working directory
|