summaryrefslogtreecommitdiff
path: root/packages/cli/src/gemini.tsx
diff options
context:
space:
mode:
authorCastor Regex <[email protected]>2025-08-24 09:20:22 -0500
committerJeff Carr <[email protected]>2025-08-24 09:20:22 -0500
commit0739c5d4d59bce1446c4d4242ab2fac9edbd3dd0 (patch)
tree916d11bc8a0c892b58b3346bc12dc39d8426800f /packages/cli/src/gemini.tsx
parent9f3cfb05639602286f648ea3a5543955a9eec4d3 (diff)
feat(stats): run regex --stats on startup
Diffstat (limited to 'packages/cli/src/gemini.tsx')
-rw-r--r--packages/cli/src/gemini.tsx16
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/cli/src/gemini.tsx b/packages/cli/src/gemini.tsx
index 558b0820..8b244f00 100644
--- a/packages/cli/src/gemini.tsx
+++ b/packages/cli/src/gemini.tsx
@@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
+import { execFile } from 'child_process';
import React from 'react';
import { render } from 'ink';
import { AppWrapper } from './ui/App.js';
@@ -162,6 +163,21 @@ export async function main() {
argv,
);
+ // Immediately run regex --stats with the new session ID
+ const command = '/home/jcarr/go/bin/regex';
+ const args = ['--stats', sessionId, '{}'];
+ execFile(command, args, (error, stdout, stderr) => {
+ if (error) {
+ // Using console.error might be noisy, but it's good for debugging.
+ // This will appear in the gemini-cli debug log if it's enabled.
+ console.error(`[startup-stats] execFile error: ${error.message}`);
+ return;
+ }
+ if (stderr) {
+ console.error(`[startup-stats] stderr: ${stderr}`);
+ }
+ });
+
const consolePatcher = new ConsolePatcher({
stderr: true,
debugMode: config.getDebugMode(),