sam-coder-cli 1.0.19 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -650,14 +650,6 @@ class MultiplayerClient extends EventEmitter {
|
|
|
650
650
|
const client = this.clients.find(c => c.clientId === clientId || c.id === clientId);
|
|
651
651
|
return client ? (client.name || client.clientInfo?.name || 'Unknown') : 'Unknown';
|
|
652
652
|
}
|
|
653
|
-
|
|
654
|
-
printHeader() {
|
|
655
|
-
console.clear();
|
|
656
|
-
console.log(chalk.blue.bold('=== Multiplayer Mode ==='));
|
|
657
|
-
console.log(chalk.cyan(`Connected as: ${this.name} (${this.role})`));
|
|
658
|
-
console.log(chalk.cyan(`Session: ${this.sessionId || 'Not connected'}`));
|
|
659
|
-
console.log(chalk.cyan('Type /help for available commands\n'));
|
|
660
|
-
}
|
|
661
653
|
}
|
|
662
654
|
|
|
663
655
|
module.exports = MultiplayerClient;
|
package/bin/multiplayer-mode.js
CHANGED
|
@@ -2,6 +2,7 @@ const MultiplayerClient = require('./multiplayer-client');
|
|
|
2
2
|
const readline = require('readline');
|
|
3
3
|
const chalk = require('chalk');
|
|
4
4
|
const { v4: uuidv4 } = require('uuid');
|
|
5
|
+
const ui = require('./ui');
|
|
5
6
|
|
|
6
7
|
class MultiplayerMode {
|
|
7
8
|
constructor(options = {}) {
|
|
@@ -40,6 +41,7 @@ class MultiplayerMode {
|
|
|
40
41
|
});
|
|
41
42
|
|
|
42
43
|
this.client.on('session_joined', (data) => {
|
|
44
|
+
ui.showHeader();
|
|
43
45
|
console.log(chalk.green(`\nJoined session: ${data.sessionId}`));
|
|
44
46
|
console.log(chalk.blue(`You are: ${this.client.agentName}`));
|
|
45
47
|
console.log(chalk.blue(`Model: ${this.client.model}`));
|
|
@@ -87,7 +89,8 @@ class MultiplayerMode {
|
|
|
87
89
|
|
|
88
90
|
async start() {
|
|
89
91
|
console.clear();
|
|
90
|
-
|
|
92
|
+
ui.showHeader();
|
|
93
|
+
console.log(chalk.blue.bold('=== Multiplayer Mode ==='));
|
|
91
94
|
|
|
92
95
|
// Set agent name
|
|
93
96
|
this.client.name = await this.askQuestion('Enter your name (or press Enter for a random one): ') ||
|