Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ class GodotServer {

// Set the path to the operations script
this.operationsScriptPath = join(__dirname, 'scripts', 'godot_operations.gd');
if (debugMode) console.debug(`[DEBUG] Operations script path: ${this.operationsScriptPath}`);
if (debugMode) console.error(`[DEBUG] Operations script path: ${this.operationsScriptPath}`);

// Initialize the MCP server
this.server = new Server(
Expand Down Expand Up @@ -320,7 +320,7 @@ class GodotServer {
*/
private logDebug(message: string): void {
if (DEBUG_MODE) {
console.debug(`[DEBUG] ${message}`);
console.error(`[DEBUG] ${message}`);
}
}

Expand Down Expand Up @@ -612,7 +612,7 @@ class GodotServer {
this.logDebug(` - Modern Node Types: ${features.modernNodeTypes}`);
}

console.log(`[SERVER] ${validationResult.message}`);
console.error(`[SERVER] ${validationResult.message}`);
return this.godotVersion!;
} catch (error) {
const errorMessage = error instanceof Error ? error.message : String(error);
Expand Down Expand Up @@ -7064,16 +7064,16 @@ class GodotServer {
}

this.logDebug(`Capturing screenshot for project: ${args.projectPath}`);
console.log(`[SCREENSHOT] Starting capture for: ${args.projectPath}`);
console.log(`[SCREENSHOT] Output path: ${args.outputPath}`);
console.log(`[SCREENSHOT] Scene path: ${args.scenePath || 'none'}`);
console.error(`[SCREENSHOT] Starting capture for: ${args.projectPath}`);
console.error(`[SCREENSHOT] Output path: ${args.outputPath}`);
console.error(`[SCREENSHOT] Scene path: ${args.scenePath || 'none'}`);

// Execute the capture_screenshot operation
const result = await this.executeOperation('capture_screenshot', args, args.projectPath);

console.log(`[SCREENSHOT] Operation completed`);
console.log(`[SCREENSHOT] STDOUT:\n${result.stdout}`);
console.log(`[SCREENSHOT] STDERR:\n${result.stderr}`);
console.error(`[SCREENSHOT] Operation completed`);
console.error(`[SCREENSHOT] STDOUT:\n${result.stdout}`);
console.error(`[SCREENSHOT] STDERR:\n${result.stderr}`);

// Parse the result
const lines = result.stdout.split('\n').filter(line => line.trim());
Expand Down Expand Up @@ -8514,7 +8514,7 @@ class GodotServer {
}
}

console.log(`[SERVER] Using Godot at: ${this.godotPath}`);
console.error(`[SERVER] Using Godot at: ${this.godotPath}`);

const transport = new StdioServerTransport();
await this.server.connect(transport);
Expand Down