#!/bin/sh
# AICommit pre-commit hook

# Run AICommit commit
aicommit generate commit

# If AICommit commit was successful, exit with 0
if [ $? -eq 0 ]; then
    exit 0
else
    echo "AICommit commit failed. Please review your changes and try again."
    exit 1
fi
