@@ -61,41 +61,6 @@ registerTerminalAction({
61
61
}
62
62
} ) ;
63
63
64
- registerTerminalAction ( {
65
- id : TerminalDeveloperCommandId . WriteDataToTerminal ,
66
- title : localize2 ( 'workbench.action.terminal.writeDataToTerminal' , 'Write Data to Terminal' ) ,
67
- category : Categories . Developer ,
68
- run : async ( c , accessor ) => {
69
- const quickInputService = accessor . get ( IQuickInputService ) ;
70
- const instance = await c . service . getActiveOrCreateInstance ( ) ;
71
- await c . service . revealActiveTerminal ( ) ;
72
- await instance . processReady ;
73
- if ( ! instance . xterm ) {
74
- throw new Error ( 'Cannot write data to terminal if xterm isn\'t initialized' ) ;
75
- }
76
- const data = await quickInputService . input ( {
77
- value : '' ,
78
- placeHolder : 'Enter data, use \\x to escape' ,
79
- prompt : localize ( 'workbench.action.terminal.writeDataToTerminal.prompt' , "Enter data to write directly to the terminal, bypassing the pty" ) ,
80
- } ) ;
81
- if ( ! data ) {
82
- return ;
83
- }
84
- let escapedData = data
85
- . replace ( / \\ n / g, '\n' )
86
- . replace ( / \\ r / g, '\r' ) ;
87
- while ( true ) {
88
- const match = escapedData . match ( / \\ x ( [ 0 - 9 a - f A - F ] { 2 } ) / ) ;
89
- if ( match === null || match . index === undefined || match . length < 2 ) {
90
- break ;
91
- }
92
- escapedData = escapedData . slice ( 0 , match . index ) + String . fromCharCode ( parseInt ( match [ 1 ] , 16 ) ) + escapedData . slice ( match . index + 4 ) ;
93
- }
94
- const xterm = instance . xterm as any as IInternalXtermTerminal ;
95
- xterm . _writeText ( escapedData ) ;
96
- }
97
- } ) ;
98
-
99
64
registerTerminalAction ( {
100
65
id : TerminalDeveloperCommandId . RecordSession ,
101
66
title : localize2 ( 'workbench.action.terminal.recordSession' , 'Record Terminal Session' ) ,
0 commit comments