mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-22 02:54:31 -07:00
feat(cli): Adds the ability to run MCP prompt commands in non-interactive mode (#10194)
Co-authored-by: Allen Hutchison <adh@google.com>
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
} from '@google/gemini-cli-core';
|
||||
import { CommandService } from './services/CommandService.js';
|
||||
import { FileCommandLoader } from './services/FileCommandLoader.js';
|
||||
import { McpPromptLoader } from './services/McpPromptLoader.js';
|
||||
import type { CommandContext } from './ui/commands/types.js';
|
||||
import { createNonInteractiveUI } from './ui/noninteractive/nonInteractiveUi.js';
|
||||
import type { LoadedSettings } from './config/settings.js';
|
||||
@@ -38,9 +39,8 @@ export const handleSlashCommand = async (
|
||||
return;
|
||||
}
|
||||
|
||||
// Only custom commands are supported for now.
|
||||
const commandService = await CommandService.create(
|
||||
[new FileCommandLoader(config)],
|
||||
[new McpPromptLoader(config), new FileCommandLoader(config)],
|
||||
abortController.signal,
|
||||
);
|
||||
const commands = commandService.getCommands();
|
||||
|
||||
Reference in New Issue
Block a user