#!/bin/bash

echo "Stopping any running heroagent processes..."
pkill -f heroagent || true

echo "Building and starting heroagent with enhanced error reporting..."
cd "$(dirname "$0")/.."
go build -o heroagent cmd/heroagent/main.go
./heroagent -ui=true -redis=false -webdav=false -jobs=false

echo "Server started!"