mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-20 15:19:16 +00:00
* feat(sftp): add follow terminal directory mode for sidebar (#1266) Add a toolbar toggle that keeps the side-panel SFTP browser synced with the linked SSH terminal cwd, inspired by MobaXterm's follow-folder behavior. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(sftp): probe pwd after commands when follow mode lacks OSC 7 Add a deferred getSessionPwd fallback after terminal commands when follow-terminal-cwd is enabled and the shell did not report OSC 7, and fix settings sync hook dependencies. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(sftp): repair follow toggle UI and backend cwd sync fallback Fix SftpPaneView memo skipping follow prop updates, probe fresh pwd when OSC 7 is missing, and broaden linked terminal session resolution for sidebar follow mode. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(sftp): harden follow sync after review findings Reuse shouldFollowTerminalCwdNavigate in production path, re-read connection after async cwd probe, skip redundant navigate on toggle, and only probe pwd when the SFTP side panel is open. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
46 lines
2.1 KiB
TypeScript
46 lines
2.1 KiB
TypeScript
export const terminalLayerAreEqual = (
|
|
prev: Record<string, unknown>,
|
|
next: Record<string, unknown>,
|
|
): boolean => (
|
|
prev.hosts === next.hosts &&
|
|
prev.groupConfigs === next.groupConfigs &&
|
|
prev.proxyProfiles === next.proxyProfiles &&
|
|
prev.keys === next.keys &&
|
|
prev.snippets === next.snippets &&
|
|
prev.snippetPackages === next.snippetPackages &&
|
|
prev.sessions === next.sessions &&
|
|
prev.workspaces === next.workspaces &&
|
|
prev.knownHosts === next.knownHosts &&
|
|
prev.draggingSessionId === next.draggingSessionId &&
|
|
prev.terminalTheme === next.terminalTheme &&
|
|
prev.accentMode === next.accentMode &&
|
|
prev.customAccent === next.customAccent &&
|
|
prev.terminalSettings === next.terminalSettings &&
|
|
prev.fontSize === next.fontSize &&
|
|
prev.hotkeyScheme === next.hotkeyScheme &&
|
|
prev.keyBindings === next.keyBindings &&
|
|
prev.sftpDefaultViewMode === next.sftpDefaultViewMode &&
|
|
prev.sftpDoubleClickBehavior === next.sftpDoubleClickBehavior &&
|
|
prev.sftpAutoSync === next.sftpAutoSync &&
|
|
prev.sftpShowHiddenFiles === next.sftpShowHiddenFiles &&
|
|
prev.sftpUseCompressedUpload === next.sftpUseCompressedUpload &&
|
|
prev.sftpAutoOpenSidebar === next.sftpAutoOpenSidebar &&
|
|
prev.sftpFollowTerminalCwd === next.sftpFollowTerminalCwd &&
|
|
prev.setSftpFollowTerminalCwd === next.setSftpFollowTerminalCwd &&
|
|
prev.editorWordWrap === next.editorWordWrap &&
|
|
prev.sshDebugLogsEnabled === next.sshDebugLogsEnabled &&
|
|
prev.setEditorWordWrap === next.setEditorWordWrap &&
|
|
prev.onHotkeyAction === next.onHotkeyAction &&
|
|
prev.onUpdateHost === next.onUpdateHost &&
|
|
prev.onAddKnownHost === next.onAddKnownHost &&
|
|
prev.onToggleWorkspaceViewMode === next.onToggleWorkspaceViewMode &&
|
|
prev.onSetWorkspaceFocusedSession === next.onSetWorkspaceFocusedSession &&
|
|
prev.onReorderWorkspaceSessions === next.onReorderWorkspaceSessions &&
|
|
prev.onSplitSession === next.onSplitSession &&
|
|
prev.isBroadcastEnabled === next.isBroadcastEnabled &&
|
|
prev.onToggleBroadcast === next.onToggleBroadcast &&
|
|
prev.toggleScriptsSidePanelRef === next.toggleScriptsSidePanelRef &&
|
|
prev.toggleSidePanelRef === next.toggleSidePanelRef &&
|
|
prev.identities === next.identities
|
|
);
|