import { ConfigProvider } from 'tabby-core'; export interface SidebarWorkspace { id: string; name: string; icon?: string; color?: string; hiddenProfileIds: string[]; hiddenGroupIds: string[]; favorites: string[]; favoriteGroups: string[]; groupOrder: Record; profileOrder: Record; } /** * One command of the library, written into a session from the context menu. * * A snippet is defined *once* and attached wherever it is useful — it does not * belong to the profile it was written from. Two consequences worth knowing * before touching this: fixing a command fixes it everywhere it is attached, * and detaching it from one profile leaves it available to every other. Which * of the two a gesture means is spelled out in the popup, because nothing in * the data can tell them apart. */ export interface SidebarSnippet { /** Stable across renames — an attachment points at this, never at a name or a position. */ id: string; /** What the menu shows. */ name: string; /** What is written into the terminal. */ command: string; } /** * How snippets behave on one profile or one folder. * * Both fields are tri-state on purpose: `undefined` means "inherit", which is * what lets the same setting be answered at whatever level of the tree the * user actually thinks about it — once on a "Prod" folder, or profile by * profile where one server is the exception. Resolution walks profile → * nearest folder → up to the root, and the first defined value wins; nothing * defined anywhere means `false`, so a fresh install neither launches sessions * nor runs anything on its own. * * Keyed by profile id *and* group id in one map: the resolution above walks * both kinds in the same pass, and splitting them would mean keeping two maps * in step through re-parenting and deletion for no gain. */ /** * How snippets behave, answered per profile/folder — and, within one of them, * per snippet. * * Two levels because the question is asked twice over: a profile may want most * of its snippets to run outright and one of them never to, which a single * answer per profile cannot express. Resolution therefore asks, at each link of * the chain, the snippet-specific answer first and the item's general one * second, before moving up to the folder above. */ export interface SidebarSnippetSettings { /** Open the session when the profile has none, instead of refusing to send. */ autoLaunch?: boolean; /** Send the trailing newline — i.e. run the command — instead of only typing it in. */ execute?: boolean; /** * Milliseconds to wait after an *automatic* launch before writing, 0 for * none. Never applied to a session that was already open: there is nothing * to wait for there. * * A blunt instrument, and knowingly so — SSH offers no "the shell is ready" * signal, so the alternative to a delay is guessing. It exists because the * guess is wrong on exactly the servers one does not administer: a long * MOTD swallows the command. Per profile and per folder like the two above, * because slowness is a property of a given server, not of the plugin. */ launchDelayMs?: number; } export declare class SidebarPlusConfigProvider extends ConfigProvider { defaults: { hotkeys: { 'sidebar-plus-insert-newline': string[]; 'sidebar-plus-focus-filter': string[]; }; sidebarPlus: { enabled: boolean; favorites: string[]; favoriteGroups: string[]; recentIcons: string[]; favoriteIcons: string[]; groupOrder: Record; sftpColumns: string[]; sftpEditorPath: string; sftpDeleteDefaultButton: "cancel" | "confirm"; sftpDragOutFolders: boolean; sftpAutoRefreshSeconds: number; sftpAutoReturnToProfiles: boolean; pingIntervalSeconds: number; sftpFoldersFirst: boolean; sftpShowHidden: boolean; sftpColumnBorders: boolean; sftpZebra: boolean; hideNativeTransfersMenu: boolean; showActiveSessions: boolean; showRecentProfiles: boolean; showTunnels: boolean; showSftp: boolean; showTransfers: boolean; showWorkspaces: boolean; workspaceSelectorMode: "tabs" | "dropdown"; showFilter: boolean; showSnippets: boolean; showNotes: boolean; snippetLibrary: SidebarSnippet[]; snippetAttachments: Record; snippetSettings: Record; snippetOverrides: Record>; snippetVariables: Record>>; snippetMuted: Record; profileNotes: Record; workspaces: SidebarWorkspace[]; }; }; }