Fix full verbosity: show reasoning, tool calls expanded with results
- Full mode shows Thinking blocks with expand/collapse - Full mode shows all assistant messages including tool-only - Full mode expands tool calls by default with results (2000 char limit) - Session delete with confirm - Improved deploy script generates service files dynamically
This commit is contained in:
+51
-16
@@ -5,34 +5,69 @@ PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
SYSTEMD_DIR="$HOME/.config/systemd/user"
|
||||
PORT="${1:-3100}"
|
||||
|
||||
echo "Building..."
|
||||
cd "$PROJECT_DIR"
|
||||
export PATH="$HOME/.hermes/node/bin:$PATH"
|
||||
|
||||
echo "→ Building..."
|
||||
cd "$PROJECT_DIR"
|
||||
HERMES_BACKEND_URL=http://127.0.0.1:8643 npx next build
|
||||
|
||||
echo "Copying static assets to standalone..."
|
||||
echo "→ Copying static assets..."
|
||||
cp -r .next/static .next/standalone/.next/static
|
||||
cp -r public .next/standalone/public
|
||||
|
||||
echo "Installing service..."
|
||||
echo "→ Installing services..."
|
||||
mkdir -p "$SYSTEMD_DIR"
|
||||
sed "s|ExecStart=.*|ExecStart=/home/hermes/.hermes/node/bin/node $PROJECT_DIR/.next/standalone/server.js|" \
|
||||
"$PROJECT_DIR/deploy/hermes-os.service" > "$SYSTEMD_DIR/hermes-os.service"
|
||||
|
||||
# Add port
|
||||
if ! grep -q "PORT=" "$SYSTEMD_DIR/hermes-os.service"; then
|
||||
sed -i "/NODE_ENV/a Environment=PORT=$PORT" "$SYSTEMD_DIR/hermes-os.service"
|
||||
sed -i "/NODE_ENV/a Environment=HOSTNAME=0.0.0.0" "$SYSTEMD_DIR/hermes-os.service"
|
||||
fi
|
||||
cat > "$SYSTEMD_DIR/hermes-os.service" << EOF
|
||||
[Unit]
|
||||
Description=Hermes OS — Mobile dashboard
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=$PROJECT_DIR
|
||||
Environment=PATH=$HOME/.hermes/node/bin:/usr/local/bin:/usr/bin:/bin
|
||||
Environment=HERMES_BACKEND_URL=http://127.0.0.1:8643
|
||||
Environment=HERMES_GATEWAY_URL=http://127.0.0.1:8642
|
||||
Environment=HERMES_SOUL_PATH=$HOME/.hermes/SOUL.md
|
||||
Environment=NODE_ENV=production
|
||||
Environment=PORT=$PORT
|
||||
Environment=HOSTNAME=0.0.0.0
|
||||
ExecStart=$HOME/.hermes/node/bin/node $PROJECT_DIR/.next/standalone/server.js
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
EOF
|
||||
|
||||
cat > "$SYSTEMD_DIR/hermes-webapi.service" << EOF
|
||||
[Unit]
|
||||
Description=Hermes WebAPI (FastAPI)
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=$HOME/.hermes/hermes-agent
|
||||
Environment=HERMES_WEBAPI_HOST=0.0.0.0
|
||||
Environment=HERMES_CORS_ORIGINS=*
|
||||
ExecStart=$HOME/.hermes/hermes-agent/venv/bin/python -m webapi
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
EOF
|
||||
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user enable hermes-os hermes-webapi
|
||||
systemctl --user restart hermes-os
|
||||
systemctl --user enable hermes-os
|
||||
|
||||
sleep 3
|
||||
if curl -s -o /dev/null -w "%{http_code}" "http://localhost:$PORT" | grep -q 200; then
|
||||
echo "✅ Hermes OS running on port $PORT"
|
||||
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "http://localhost:$PORT" 2>/dev/null || echo "000")
|
||||
if [ "$STATUS" = "200" ]; then
|
||||
echo "✅ Hermes OS running on http://0.0.0.0:$PORT"
|
||||
else
|
||||
echo "⚠️ Service started but health check failed"
|
||||
systemctl --user status hermes-os --no-pager
|
||||
echo "⚠️ Health check returned $STATUS"
|
||||
systemctl --user status hermes-os --no-pager | head -10
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user