#!/usr/bin/env bash
# Run from a checkout: bash show-evidence.sh THREAD_ID
set -eu
printf 'Commit: '
git rev-parse HEAD
printf '\n$ t3 thread show <thread> --json | select last three messages\n\n'
node apps/server/src/bin.ts thread show "$1" --base-dir .t3 --json |
 python3 -c 'import json,sys; [print(json.dumps({"role":x["role"],"text":x["text"]})) for x in json.load(sys.stdin)["messages"][-3:]]'
