From ef6b8a4eaa1ce4cf0311649d009d1a8a3e66a71c Mon Sep 17 00:00:00 2001 From: Clem Date: Mon, 14 Aug 2023 15:24:41 +0200 Subject: [PATCH] feat(core/settings/serial/ssh/telnet): add clearServiceMessagesOnConnect option on connectable profile --- tabby-core/src/api/profileProvider.ts | 1 + tabby-serial/src/profiles.ts | 1 + .../src/components/editProfileModal.component.pug | 8 +++++++- tabby-ssh/src/profiles.ts | 1 + tabby-telnet/src/profiles.ts | 1 + .../src/api/connectableTerminalTab.component.ts | 3 +++ 6 files changed, 14 insertions(+), 1 deletion(-) diff --git a/tabby-core/src/api/profileProvider.ts b/tabby-core/src/api/profileProvider.ts index 31fa1f75..37b11fb1 100644 --- a/tabby-core/src/api/profileProvider.ts +++ b/tabby-core/src/api/profileProvider.ts @@ -22,6 +22,7 @@ export interface Profile { } export interface ConnectableProfile extends Profile { + clearServiceMessagesOnConnect: boolean } export type PartialProfile = Omit { reuseSession: true, input: { backspace: 'backspace' }, }, + clearServiceMessagesOnConnect: true, } constructor ( diff --git a/tabby-telnet/src/profiles.ts b/tabby-telnet/src/profiles.ts index a88ea0a2..0c247e8a 100644 --- a/tabby-telnet/src/profiles.ts +++ b/tabby-telnet/src/profiles.ts @@ -21,6 +21,7 @@ export class TelnetProfilesService extends ConnectableProfileProvider { this.reconnectOffered = false this.isDisconnectedByHand = false + if (this.profile.clearServiceMessagesOnConnect) { + this.frontend?.clear() + } } /**