diff options
Diffstat (limited to 'packages/cli/src/utils')
| -rw-r--r-- | packages/cli/src/utils/BackgroundTerminalAnalyzer.ts | 3 | ||||
| -rw-r--r-- | packages/cli/src/utils/paths.ts | 8 |
2 files changed, 2 insertions, 9 deletions
diff --git a/packages/cli/src/utils/BackgroundTerminalAnalyzer.ts b/packages/cli/src/utils/BackgroundTerminalAnalyzer.ts index 6028f9b1..c73b1655 100644 --- a/packages/cli/src/utils/BackgroundTerminalAnalyzer.ts +++ b/packages/cli/src/utils/BackgroundTerminalAnalyzer.ts @@ -3,6 +3,7 @@ import { SchemaUnion, Type } from '@google/genai'; // Assuming these types exist import { GeminiClient } from '../core/gemini-client.js'; // Assuming this path import { exec } from 'child_process'; // Needed for Windows process check import { promisify } from 'util'; // To promisify exec +import { globalConfig } from '../config/config.js'; // Promisify child_process.exec for easier async/await usage const execAsync = promisify(exec); @@ -60,7 +61,7 @@ export class BackgroundTerminalAnalyzer { initialDelayMs?: number; } = {}, // Provide default options ) { - this.ai = aiClient || new GeminiClient(); // Call constructor without model + this.ai = aiClient || new GeminiClient(globalConfig); // Call constructor without model this.pollIntervalMs = options.pollIntervalMs ?? 5000; // Default 5 seconds this.maxAttempts = options.maxAttempts ?? 6; // Default 6 attempts (approx 30s total) this.initialDelayMs = options.initialDelayMs ?? 500; // Default 0.5s initial delay diff --git a/packages/cli/src/utils/paths.ts b/packages/cli/src/utils/paths.ts index 60762c9d..4dc6e5cb 100644 --- a/packages/cli/src/utils/paths.ts +++ b/packages/cli/src/utils/paths.ts @@ -1,14 +1,6 @@ -import process from 'node:process'; import path from 'node:path'; // Import the 'path' module /** - * Returns the target directory, using the provided argument or the current working directory. - */ -export function getTargetDirectory(targetDirArg: string | undefined): string { - return targetDirArg || process.cwd(); -} - -/** * Shortens a path string if it exceeds maxLen, prioritizing the start and end segments. * Example: /path/to/a/very/long/file.txt -> /path/.../long/file.txt */ |
