@@ -26,7 +26,7 @@ const props = defineProps<{
2626}>();
2727
2828const emit = defineEmits <{
29- shareCreated: [terminalId : string ];
29+ shareCreated: [terminalId : string , name : string ];
3030}>();
3131
3232const { getWsUrl, getMode, getSessionId } = useApi ();
@@ -40,8 +40,8 @@ let resizeObserver: ResizeObserver | null = null;
4040let ipcCleanups: (() => void )[] = [];
4141let wsReconnectTimer: ReturnType <typeof setTimeout > | null = null ;
4242let disposed = false ;
43- // Use local node-pty only in Electron + local mode; SSH mode always uses WebSocket
44- const useLocalPty = !! electronTerminal && getMode () === " local" ;
43+ // Use local node-pty only in Electron + local mode (not in share mode — share always uses WebSocket)
44+ const useLocalPty = !! electronTerminal && getMode () === " local" && ! isSharing . value ;
4545
4646// Unique ID for this terminal instance (used for IPC routing)
4747const termId = ` t-${Date .now ()}-${Math .random ().toString (36 ).slice (2 , 6 )} ` ;
@@ -114,7 +114,7 @@ function connectWs() {
114114 } else if (msg .type === " terminal-ready" ) {
115115 sharedTerminalId = msg .terminalId ;
116116 if (! props .shareTerminalId ) {
117- emit (" shareCreated" , msg .terminalId );
117+ emit (" shareCreated" , msg .terminalId , msg . name ?? " " );
118118 }
119119 } else if (msg .type === " output" && term ) {
120120 term .write (msg .data );
0 commit comments