#!/bin/bash

# anolis:summary=Launch the default coding agent with a prompt
# anolis:args=[--inline] <prompt...>
# anolis:examples=anolis agent prompt "Review this project"

# Prompts live here rather than on `anolis agent`, where a bare prompt would
# shadow the subcommands under that group.

set -euo pipefail

inline=()
if [[ ${1:-} == "--inline" ]]; then
  inline=(--inline)
  shift
fi

if (($# == 0)); then
  echo "Usage: anolis agent prompt [--inline] <prompt...>" >&2
  exit 1
fi

exec anolis-agent "${inline[@]}" --prompt "$*"
