Signed-off-by: ale <ale@manalejandro.com>
Este commit está contenido en:
ale
2025-10-08 04:03:23 +02:00
padre 856bb8e6ca
commit 8a1ee6c6b9
Se han modificado 2 ficheros con 11 adiciones y 6 borrados

Ver fichero

@@ -469,8 +469,8 @@ def dispatch_command(command: str, **kwargs) -> Dict:
elif command == "set_target": elif command == "set_target":
return executor.set_target( return executor.set_target(
kwargs["target"], kwargs["target"], # This will be passed as target_name
kwargs.get("configuration") **kwargs.get("configuration", {})
) )
elif command == "sample": elif command == "sample":

Ver fichero

@@ -216,9 +216,14 @@ export class CudaQuantumMCPServer {
// Set default target if specified // Set default target if specified
if (this.config.defaultTarget) { if (this.config.defaultTarget) {
const bridge = getPythonBridge(); try {
await bridge.setTarget(this.config.defaultTarget); const bridge = getPythonBridge();
this.logger.info(`Set default quantum target: ${this.config.defaultTarget}`); await bridge.setTarget(this.config.defaultTarget);
this.logger.info(`Set default quantum target: ${this.config.defaultTarget}`);
} catch (error) {
this.logger.warn(`Failed to set default target ${this.config.defaultTarget}, continuing without it:`, error);
// Don't fail initialization if target setup fails
}
} }
this.logger.info('CUDA Quantum MCP Server initialized successfully'); this.logger.info('CUDA Quantum MCP Server initialized successfully');
@@ -287,7 +292,7 @@ async function main(): Promise<void> {
name: process.env.MCP_SERVER_NAME || 'cuda-quantum-mcp', name: process.env.MCP_SERVER_NAME || 'cuda-quantum-mcp',
version: process.env.MCP_SERVER_VERSION || '1.0.0', version: process.env.MCP_SERVER_VERSION || '1.0.0',
pythonPath: process.env.CUDAQ_PYTHON_PATH, pythonPath: process.env.CUDAQ_PYTHON_PATH,
defaultTarget: process.env.CUDAQ_DEFAULT_TARGET || 'qpp-cpu', defaultTarget: process.env.CUDAQ_DEFAULT_TARGET, // Don't set default target to avoid initialization issues
logLevel: process.env.LOG_LEVEL === 'debug' ? LogLevel.DEBUG : logLevel: process.env.LOG_LEVEL === 'debug' ? LogLevel.DEBUG :
process.env.LOG_LEVEL === 'warn' ? LogLevel.WARN : process.env.LOG_LEVEL === 'warn' ? LogLevel.WARN :
process.env.LOG_LEVEL === 'error' ? LogLevel.ERROR : process.env.LOG_LEVEL === 'error' ? LogLevel.ERROR :