summaryrefslogtreecommitdiff
path: root/packages/cli/src/services/FileCommandLoader.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/cli/src/services/FileCommandLoader.ts')
-rw-r--r--packages/cli/src/services/FileCommandLoader.ts12
1 files changed, 5 insertions, 7 deletions
diff --git a/packages/cli/src/services/FileCommandLoader.ts b/packages/cli/src/services/FileCommandLoader.ts
index 2942a8b9..a405655a 100644
--- a/packages/cli/src/services/FileCommandLoader.ts
+++ b/packages/cli/src/services/FileCommandLoader.ts
@@ -9,11 +9,7 @@ import path from 'path';
import toml from '@iarna/toml';
import { glob } from 'glob';
import { z } from 'zod';
-import {
- Config,
- getProjectCommandsDir,
- getUserCommandsDir,
-} from '@google/gemini-cli-core';
+import { Config, Storage } from '@google/gemini-cli-core';
import { ICommandLoader } from './types.js';
import {
CommandContext,
@@ -130,11 +126,13 @@ export class FileCommandLoader implements ICommandLoader {
private getCommandDirectories(): CommandDirectory[] {
const dirs: CommandDirectory[] = [];
+ const storage = this.config?.storage ?? new Storage(this.projectRoot);
+
// 1. User commands
- dirs.push({ path: getUserCommandsDir() });
+ dirs.push({ path: Storage.getUserCommandsDir() });
// 2. Project commands (override user commands)
- dirs.push({ path: getProjectCommandsDir(this.projectRoot) });
+ dirs.push({ path: storage.getProjectCommandsDir() });
// 3. Extension commands (processed last to detect all conflicts)
if (this.config) {