#!/usr/bin/env bash
set -eu
# Run once per checkout after starting it with T3CODE_DEV_SEED=0 vp run dev.
# Add a Grok provider in Settings > Providers, id grok. Set Binary path to
# grok-auth-wrapper.py (alongside this script), then Refresh provider status.
checkout=$1
workspace=$2
cd "$checkout"
node apps/server/src/bin.ts project add "$workspace" --title 'Context usage proof' --base-dir .t3
node apps/server/src/bin.ts thread start "$workspace" 'Reply with just the word hi.' --title 'Grok context usage' --provider grok --model grok-4.7 --wait --json --base-dir .t3
# Open the returned thread in the web client. Show Thread details, right-click
# it and enable Context window. Hide Environment and worktree and collapse the
# sidebar for captures. Both captures use light theme, 1280x800 CSS pixels.
# Record typing and submitting: Now reply with just the word hello.
# Wait for hello. Base has no Context row; head has 20k / 500k.
# Hover the head Context row for the exact token count.
