(command)
| 108 | |
| 109 | // 发送命令到服务器 |
| 110 | function sendCommand(command) { |
| 111 | console.log('\n📤 Sending command:', JSON.stringify(command, null, 2)); |
| 112 | serverProcess.stdin.write(JSON.stringify(command) + '\n'); |
| 113 | setTimeout(showPrompt, 1000); |
| 114 | } |
| 115 | |
| 116 | // 处理退出 |
| 117 | process.on('SIGINT', () => { |