#!/usr/bin/env bash
# Run from each checkout, after vp i and a fresh dev server with T3CODE_DEV_SEED=0.
# Start the server with GOOGLE_GEMINI_BASE_URL pointing to your Gemini API endpoint.
# In Settings > Providers, add Antigravity, Gemini API key, and Connect.
set -euo pipefail
sample_dir="${1:?Pass a fresh synthetic project directory}"
base_dir="${2:-.t3}"
mkdir -p "$sample_dir"
printf 'alpha=17\nbeta=83\n' > "$sample_dir/config.txt"
printf 'def add(a, b):\n    return a + b\n' > "$sample_dir/math.py"
git init -q "$sample_dir"
git -C "$sample_dir" add .
git -C "$sample_dir" -c user.name=Demo -c user.email=demo@example.com commit -qm 'Initial sample'
node apps/server/src/bin.ts project add "$sample_dir" --title 'Fork history demo' --base-dir "$base_dir"
node apps/server/src/bin.ts thread start "$sample_dir" \
  'Read config.txt and math.py, then run ls in the project. Confirm you have read the files, but do not quote their contents.' \
  --provider antigravity --model gemini-4-neon --title 'Native fork history' \
  --base-dir "$base_dir" --wait --json
# Open that completed thread in the web app. Click "Fork from this response".
# Keep the same Antigravity instance and Gemini 4 Neon model. Send:
# What is the value of beta? Answer from what you already read, without tools.
# Capture the response and inspect logs/provider and context transfer/handoff projections.
