diff options
| author | Jacob Richman <[email protected]> | 2025-05-30 22:18:01 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-05-30 15:18:01 -0700 |
| commit | 01768d7759b81a0f1483c751206f6afcae6fc505 (patch) | |
| tree | befda8dfe9807bfee805e291fa203cfe8dfefe29 /packages/cli/src/ui/hooks/slashCommandProcessor.ts | |
| parent | 3291ffbe099f2fdc8f88a0c1bb06fb43b65326a9 (diff) | |
feat: add --show_memory_usage flag to display memory usage in status bar (#606)
Diffstat (limited to 'packages/cli/src/ui/hooks/slashCommandProcessor.ts')
| -rw-r--r-- | packages/cli/src/ui/hooks/slashCommandProcessor.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/cli/src/ui/hooks/slashCommandProcessor.ts b/packages/cli/src/ui/hooks/slashCommandProcessor.ts index 5ec07c91..8f294380 100644 --- a/packages/cli/src/ui/hooks/slashCommandProcessor.ts +++ b/packages/cli/src/ui/hooks/slashCommandProcessor.ts @@ -7,11 +7,13 @@ import { useCallback, useMemo } from 'react'; import { type PartListUnion } from '@google/genai'; import open from 'open'; +import process from 'node:process'; import { UseHistoryManagerReturn } from './useHistoryManager.js'; import { Config } from '@gemini-code/server'; import { Message, MessageType, HistoryItemWithoutId } from '../types.js'; import { createShowMemoryAction } from './useShowMemoryCommand.js'; import { GIT_COMMIT_INFO } from '../../generated/git-commit.js'; +import { formatMemoryUsage } from '../utils/formatters.js'; export interface SlashCommandActionReturn { shouldScheduleTool?: boolean; @@ -206,6 +208,7 @@ export const useSlashCommandProcessor = ( sandboxEnv = `sandbox-exec (${process.env.SEATBELT_PROFILE || 'unknown'})`; } const modelVersion = config?.getModel() || 'Unknown'; + const memoryUsage = formatMemoryUsage(process.memoryUsage().rss); const diagnosticInfo = ` ## Describe the bug @@ -220,6 +223,7 @@ Add any other context about the problem here. * **Operating System:** ${osVersion} * **Sandbox Environment:** ${sandboxEnv} * **Model Version:** ${modelVersion} +* **Memory Usage:** ${memoryUsage} `; let bugReportUrl = |
