重写ssh前端组件,通用化

This commit is contained in:
dengqichen 2025-12-06 23:27:26 +08:00
parent 202d1b52e5
commit 743255d5c5

View File

@ -117,7 +117,15 @@ export class SSHConnectionStrategy extends BaseConnectionStrategy {
*/
sendInput(data: string): void {
if (this.ws && this.ws.readyState === WebSocket.OPEN) {
this.ws.send(data);
this.ws.send(JSON.stringify({
type: 'input',
data: {
request: {
type: 'input',
command: data
}
}
}));
}
}