shell-mirror 1.5.86 → 1.5.87
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
CHANGED
package/public/app/terminal.html
CHANGED
package/public/app/terminal.js
CHANGED
|
@@ -1067,24 +1067,25 @@ function createNewSession() {
|
|
|
1067
1067
|
console.log('[CLIENT] Debug - ws:', ws ? ws.readyState : 'null',
|
|
1068
1068
|
'dataChannel:', dataChannel ? dataChannel.readyState : 'null');
|
|
1069
1069
|
|
|
1070
|
-
|
|
1071
|
-
|
|
1070
|
+
// PRIORITIZE WebRTC data channel - it has proper SessionManager!
|
|
1071
|
+
if (dataChannel && dataChannel.readyState === 'open') {
|
|
1072
|
+
console.log('[CLIENT] 📤 Sending session create via WebRTC data channel');
|
|
1072
1073
|
const message = {
|
|
1073
|
-
type: '
|
|
1074
|
+
type: 'session-create',
|
|
1074
1075
|
cols: term.cols,
|
|
1075
1076
|
rows: term.rows
|
|
1076
1077
|
};
|
|
1077
1078
|
console.log('[CLIENT] Message:', JSON.stringify(message));
|
|
1078
|
-
|
|
1079
|
-
} else if (
|
|
1080
|
-
console.log('[CLIENT] 📤 Sending session create via
|
|
1079
|
+
dataChannel.send(JSON.stringify(message));
|
|
1080
|
+
} else if (ws && ws.readyState === WebSocket.OPEN) {
|
|
1081
|
+
console.log('[CLIENT] 📤 Sending session create via Direct WebSocket');
|
|
1081
1082
|
const message = {
|
|
1082
|
-
type: '
|
|
1083
|
+
type: 'create_session',
|
|
1083
1084
|
cols: term.cols,
|
|
1084
1085
|
rows: term.rows
|
|
1085
1086
|
};
|
|
1086
1087
|
console.log('[CLIENT] Message:', JSON.stringify(message));
|
|
1087
|
-
|
|
1088
|
+
ws.send(JSON.stringify(message));
|
|
1088
1089
|
} else {
|
|
1089
1090
|
console.error('[CLIENT] ❌ Cannot create session - no active connection');
|
|
1090
1091
|
console.error('[CLIENT] ws:', ws ? ws.readyState : 'null',
|