diff --git a/bin/amc b/bin/amc index 8d7f36a..bac124b 100755 --- a/bin/amc +++ b/bin/amc @@ -34,7 +34,12 @@ case "$cmd" in echo "AMC started (pid $!)" fi fi - open "http://127.0.0.1:$PORT" + # Open browser (platform-specific) + if command -v open &>/dev/null; then + open "http://127.0.0.1:$PORT" + elif command -v xdg-open &>/dev/null; then + xdg-open "http://127.0.0.1:$PORT" + fi ;; stop) if is_running; then diff --git a/bin/amc-hook b/bin/amc-hook index df7545e..4405b24 100755 --- a/bin/amc-hook +++ b/bin/amc-hook @@ -73,7 +73,7 @@ def _extract_questions(hook): if not isinstance(tool_input, dict): return [] - questions = tool_input.get("questions", []) + questions = tool_input.get("questions") or [] result = [] for q in questions: entry = {