#!/usr/bin/env bash
set -euo pipefail
source "${CLAUDE_PLUGIN_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}/hooks/relay-status.sh"
relay_install_hook_guard user-prompt-submit
payload="$(cat || true)"
relay_post_status busy
# Mirror a terminal/TUI-typed prompt into the dashboard chat and start reasoning
# tailing for this turn. No-op for prompts the runner injected (chat box / relay).
relay_post_user_prompt "$payload"
# Re-surface the request-review reminder each turn while there is unmerged
# committed work — so a long session can't "forget" to land it. Silent otherwise.
relay_emit_additional_context UserPromptSubmit "$(relay_review_reminder_text || true)"
