summaryrefslogtreecommitdiff
path: root/packages/cli/src/gemini.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/cli/src/gemini.tsx')
-rw-r--r--packages/cli/src/gemini.tsx16
1 files changed, 14 insertions, 2 deletions
diff --git a/packages/cli/src/gemini.tsx b/packages/cli/src/gemini.tsx
index ebb2a552..27547454 100644
--- a/packages/cli/src/gemini.tsx
+++ b/packages/cli/src/gemini.tsx
@@ -17,6 +17,7 @@ import { themeManager } from './ui/themes/theme-manager.js';
import { getStartupWarnings } from './utils/startupWarnings.js';
import { runNonInteractive } from './nonInteractiveCli.js';
import { loadGeminiIgnorePatterns } from './utils/loadIgnorePatterns.js';
+import { loadExtensions, ExtensionConfig } from './config/extension.js';
import {
ApprovalMode,
Config,
@@ -74,7 +75,12 @@ export async function main() {
process.exit(1);
}
- const config = await loadCliConfig(settings.merged, geminiIgnorePatterns);
+ const extensions = loadExtensions(workspaceRoot);
+ const config = await loadCliConfig(
+ settings.merged,
+ extensions,
+ geminiIgnorePatterns,
+ );
// Initialize centralized FileDiscoveryService
await config.getFileService();
@@ -124,7 +130,11 @@ export async function main() {
}
// Non-interactive mode handled by runNonInteractive
- const nonInteractiveConfig = await loadNonInteractiveConfig(config, settings);
+ const nonInteractiveConfig = await loadNonInteractiveConfig(
+ config,
+ extensions,
+ settings,
+ );
await runNonInteractive(nonInteractiveConfig, input);
process.exit(0);
@@ -157,6 +167,7 @@ process.on('unhandledRejection', (reason, _promise) => {
async function loadNonInteractiveConfig(
config: Config,
+ extensions: ExtensionConfig[],
settings: LoadedSettings,
) {
if (config.getApprovalMode() === ApprovalMode.YOLO) {
@@ -190,6 +201,7 @@ async function loadNonInteractiveConfig(
};
return await loadCliConfig(
nonInteractiveSettings,
+ extensions,
config.getGeminiIgnorePatterns(),
);
}