🔨 命令发送.

This commit is contained in:
lijiahang
2024-12-18 09:49:59 +08:00
parent 786d07907d
commit 04327c19e3
2 changed files with 49 additions and 9 deletions

View File

@@ -274,6 +274,17 @@ export default defineStore('terminal', {
}
},
// 粘贴命令到会话
pasteCommandToSession(session: ISshSession | undefined, command: string, newLine: boolean = false) {
const handler = session?.handler;
if (handler && handler.enabledStatus('pasteOrigin')) {
if (newLine) {
command = `${command}\r\n`;
}
handler.pasteOrigin(command);
}
},
},
});