| 63 | } |
| 64 | |
| 65 | function printHelp() { |
| 66 | console.log(`Fetch recent chat completion traces from BigQuery. |
| 67 | |
| 68 | Usage: |
| 69 | bun scripts/fetch-recent-chat-completion-traces.ts [options] |
| 70 | |
| 71 | Options: |
| 72 | --prod Use codebuff_data instead of codebuff_data_dev. |
| 73 | --dataset name Explicit BigQuery dataset name. |
| 74 | --limit n Number of recent trace sessions to fetch. Default: 3. |
| 75 | --lookback-hours n Recent window to scan and reconstruct. Default: 24. |
| 76 | --trace-session-id id Fetch one known trace session id. |
| 77 | --out-dir path Output directory. Default: .context/recent-chat-completion-traces. |
| 78 | --help Show this message. |
| 79 | `) |
| 80 | } |
| 81 | |
| 82 | function readNumberFlag( |
| 83 | argv: string[], |