Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

probeEnvironment.ts

12 lines686 Bytes

1/**
2 * Grok checks for a newer CLI when it launches. T3's health probes
3 * (`grok --version`, `grok models`, `grok inspect --json`, ACP `initialize`)
4 * run periodically in the background, so an update they start is invisible,
5 * and on Windows it opens a console window for npm. Grok documents
6 * `GROK_DISABLE_AUTOUPDATER=1` as process-scoped suppression, so probes set it
7 * on a copy of the caller's environment. Sessions, text generation, and
8 * `grok update` keep the caller's environment and update as the user configured.
9 */
10export function grokProbeEnvironment(environment: NodeJS.ProcessEnv): NodeJS.ProcessEnv {
11 return { ...environment, GROK_DISABLE_AUTOUPDATER: "1" };