shell-mirror 1.5.84 → 1.5.85
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.
- package/package.json +1 -1
- package/public/app/terminal.js +12 -11
package/package.json
CHANGED
package/public/app/terminal.js
CHANGED
|
@@ -1048,19 +1048,20 @@ function switchToSession(sessionId) {
|
|
|
1048
1048
|
function createNewSession() {
|
|
1049
1049
|
console.log('[CLIENT] 🆕 Creating new session...');
|
|
1050
1050
|
|
|
1051
|
-
// Send create session message via active connection
|
|
1052
|
-
const message = {
|
|
1053
|
-
type: 'session-create',
|
|
1054
|
-
cols: term.cols,
|
|
1055
|
-
rows: term.rows
|
|
1056
|
-
};
|
|
1057
|
-
|
|
1058
1051
|
if (ws && ws.readyState === WebSocket.OPEN) {
|
|
1059
|
-
// Direct WebSocket connection
|
|
1060
|
-
ws.send(JSON.stringify(
|
|
1052
|
+
// Direct WebSocket connection - use underscore
|
|
1053
|
+
ws.send(JSON.stringify({
|
|
1054
|
+
type: 'create_session',
|
|
1055
|
+
cols: term.cols,
|
|
1056
|
+
rows: term.rows
|
|
1057
|
+
}));
|
|
1061
1058
|
} else if (dataChannel && dataChannel.readyState === 'open') {
|
|
1062
|
-
// WebRTC data channel connection
|
|
1063
|
-
dataChannel.send(JSON.stringify(
|
|
1059
|
+
// WebRTC data channel connection - use hyphen
|
|
1060
|
+
dataChannel.send(JSON.stringify({
|
|
1061
|
+
type: 'session-create',
|
|
1062
|
+
cols: term.cols,
|
|
1063
|
+
rows: term.rows
|
|
1064
|
+
}));
|
|
1064
1065
|
} else {
|
|
1065
1066
|
console.error('[CLIENT] ❌ Cannot create session - no active connection');
|
|
1066
1067
|
term.write('\r\n\x1b[31m❌ Cannot create session - not connected\x1b[0m\r\n');
|