fix: /bug report command, thinking indicator (#381)

- Fix `/bug` report command
- Fix thinking indicator
This commit is contained in:
Fouad Matin
2025-04-18 18:13:34 -07:00
committed by GitHub
parent c40f4891d4
commit aa32e22d4b
12 changed files with 154 additions and 183 deletions

View File

@@ -1,20 +0,0 @@
#!/usr/bin/env sh
# resolve script path in case of symlink
SOURCE="$0"
while [ -h "$SOURCE" ]; do
DIR=$(dirname "$SOURCE")
SOURCE=$(readlink "$SOURCE")
case "$SOURCE" in
/*) ;; # absolute path
*) SOURCE="$DIR/$SOURCE" ;; # relative path
esac
done
DIR=$(cd "$(dirname "$SOURCE")" && pwd)
if command -v node >/dev/null 2>&1; then
exec node "$DIR/../dist/cli.js" "$@"
elif command -v bun >/dev/null 2>&1; then
exec bun "$DIR/../dist/cli.js" "$@"
else
echo "Error: node or bun is required to run codex" >&2
exit 1
fi

3
codex-cli/bin/codex.js Normal file → Executable file
View File

@@ -1,4 +1,5 @@
#!/usr/bin/env node
// Unified entry point for Codex CLI on all platforms
// Dynamically loads the compiled ESM bundle in dist/cli.js
@@ -18,7 +19,9 @@ const cliUrl = pathToFileURL(cliPath).href;
try {
await import(cliUrl);
} catch (err) {
// eslint-disable-next-line no-console
console.error(err);
// eslint-disable-next-line no-undef
process.exit(1);
}
})();