fix: 3 bugs found in Docker clean-room test

1. Install command: git+... requires git (many envs don't have it)
   → Changed to zip URL: pip install .../archive/main.zip

2. yt-dlp not in dependencies (shows warning in doctor)
   → Added yt-dlp to required dependencies

3. search-twitter/reddit shows raw 401 error without Exa key
   → Now shows friendly 'Exa API key not configured' message
This commit is contained in:
Panniantong
2026-02-24 07:11:22 +01:00
parent deec966228
commit c40ffbd5ed
4 changed files with 18 additions and 2 deletions
+15
View File
@@ -523,6 +523,21 @@ async def _cmd_search(args):
else:
print(f"Unknown command: {args.command}", file=sys.stderr)
sys.exit(1)
except Exception as e:
error_str = str(e)
if "401" in error_str or "Unauthorized" in error_str:
print("⚠️ Exa API key not configured or invalid.")
print("Get a free key at https://exa.ai (1000 searches/month free)")
print("Then run: agent-eyes configure exa-key YOUR_KEY")
sys.exit(1)
elif "exa" in error_str.lower() or "api_key" in error_str.lower():
print("⚠️ Exa API key not configured.")
print("Get a free key at https://exa.ai")
print("Then run: agent-eyes configure exa-key YOUR_KEY")
sys.exit(1)
else:
print(f"❌ Error: {e}", file=sys.stderr)
sys.exit(1)
if not results:
print("No results found.")