@@ -361,6 +361,19 @@ export class Xterm {
 | 
			
		||||
                } else {
 | 
			
		||||
                    clearInterval(this.intervalID);
 | 
			
		||||
                    if (data.status === '4') {
 | 
			
		||||
                        fetch('http://' + options.get('domain') + ':'+ options.get('port') +'/' +
 | 
			
		||||
                                options.get('user') +
 | 
			
		||||
                                '/' +
 | 
			
		||||
                                options.get('repo') +
 | 
			
		||||
                                '/devcontainer/output?' +
 | 
			
		||||
                                params
 | 
			
		||||
                            ).then(response => response.json())
 | 
			
		||||
                            .then(data => {
 | 
			
		||||
                                this.writeData(data.output);
 | 
			
		||||
                            })
 | 
			
		||||
                            .catch(err => {
 | 
			
		||||
                                console.error('[ttyd] Failed to get output:', err);
 | 
			
		||||
                            });
 | 
			
		||||
                        const parts = data.command.split('\n');
 | 
			
		||||
                        this.sendData(parts[0]+"\n");
 | 
			
		||||
                        this.postAttachCommand = parts;
 | 
			
		||||
@@ -434,20 +447,6 @@ export class Xterm {
 | 
			
		||||
                        textDecoder.decode(data).replace(/\s/g, '').includes('Successfully connected to the devcontainer'.replace(/\s/g, ''))
 | 
			
		||||
                    ) {
 | 
			
		||||
                        this.status = true;
 | 
			
		||||
                        fetch('http://' + options.get('domain') + ':'+ options.get('port') +'/' +
 | 
			
		||||
                                options.get('user') +
 | 
			
		||||
                                '/' +
 | 
			
		||||
                                options.get('repo') +
 | 
			
		||||
                                '/devcontainer/output?' +
 | 
			
		||||
                                params
 | 
			
		||||
                            ).then(response => response.json())
 | 
			
		||||
                            .then(data => {
 | 
			
		||||
                                this.writeData(data.output);
 | 
			
		||||
                            })
 | 
			
		||||
                            .catch(err => {
 | 
			
		||||
                                console.error('[ttyd] Failed to get output:', err);
 | 
			
		||||
                            });
 | 
			
		||||
                        
 | 
			
		||||
                    }
 | 
			
		||||
                    // 连接完成之前,不输出标题和docker命令
 | 
			
		||||
                    if ( 
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user