Skip to content

Commit 689ab67

Browse files
authored
Merge pull request #44 from GW-Kang/fix/redirect-stdout-logs-to-stderr
fix: Redirect console.info logs to stderr to preserve MCP protocol Thank you!
2 parents cbc7cf7 + ac31bf0 commit 689ab67

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/prompts/manager.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,18 @@ export class PromptManager {
4545

4646
this.ensureDirectoryExists(resolvedConfigDir, 'main config directory');
4747

48-
console.info(`Using config directory: ${resolvedConfigDir}`);
48+
console.error(`Using config directory: ${resolvedConfigDir}`);
4949

5050
this.initializeValueStorage(resolvedConfigDir);
5151

52-
console.info('PromptManager initialized with', Object.keys(this.prompts).length, 'prompts');
52+
console.error('PromptManager initialized with', Object.keys(this.prompts).length, 'prompts');
5353
}
5454

5555
private ensureDirectoryExists(directoryPath: string, description: string): void {
5656
try {
5757
const createdPath = fs.mkdirSync(directoryPath, { recursive: true });
5858
if (createdPath) {
59-
console.info(`Created ${description}: ${directoryPath}`);
59+
console.error(`Created ${description}: ${directoryPath}`);
6060
}
6161
} catch (err) {
6262
const error = err as Error;

0 commit comments

Comments
 (0)