From eb65034117f7722554a717de034e891ba1996e93 Mon Sep 17 00:00:00 2001 From: christine betts Date: Fri, 25 Jul 2025 20:56:33 +0000 Subject: Load and use MCP server prompts as slash commands in the CLI (#4828) Co-authored-by: harold Co-authored-by: N. Taylor Mullen --- packages/core/src/config/config.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'packages/core/src/config/config.ts') diff --git a/packages/core/src/config/config.ts b/packages/core/src/config/config.ts index 96b6f2cb..7ccfdbc8 100644 --- a/packages/core/src/config/config.ts +++ b/packages/core/src/config/config.ts @@ -11,6 +11,7 @@ import { ContentGeneratorConfig, createContentGeneratorConfig, } from '../core/contentGenerator.js'; +import { PromptRegistry } from '../prompts/prompt-registry.js'; import { ToolRegistry } from '../tools/tool-registry.js'; import { LSTool } from '../tools/ls.js'; import { ReadFileTool } from '../tools/read-file.js'; @@ -186,6 +187,7 @@ export interface ConfigParameters { export class Config { private toolRegistry!: ToolRegistry; + private promptRegistry!: PromptRegistry; private readonly sessionId: string; private contentGeneratorConfig!: ContentGeneratorConfig; private readonly embeddingModel: string; @@ -314,6 +316,7 @@ export class Config { if (this.getCheckpointingEnabled()) { await this.getGitService(); } + this.promptRegistry = new PromptRegistry(); this.toolRegistry = await this.createToolRegistry(); } @@ -396,6 +399,10 @@ export class Config { return Promise.resolve(this.toolRegistry); } + getPromptRegistry(): PromptRegistry { + return this.promptRegistry; + } + getDebugMode(): boolean { return this.debugMode; } -- cgit v1.2.3