[Init] Initial commit - NetMesh terminal manager
Some checks failed
build-packages / resolve bundled mosh-client (push) Has been cancelled
build-packages / resolve bundled et-client (push) Has been cancelled
build-packages / build-macos (push) Has been cancelled
build-packages / build-windows (push) Has been cancelled
build-packages / build-linux-x64 (push) Has been cancelled
build-packages / build-linux-arm64 (push) Has been cancelled
build-packages / release (push) Has been cancelled
build-packages / update Nix release metadata (push) Has been cancelled
build-packages / bump homebrew tap (push) Has been cancelled
test / lint-and-test (push) Has been cancelled
AI automation / Route event (push) Has been cancelled
AI automation / Hand reopened issue to maintainers (push) Has been cancelled
AI automation / Clean source issue state (push) Has been cancelled
AI automation / Reconcile handoffs (push) Has been cancelled
AI automation / Classify issue (push) Has been cancelled
AI automation / Claude Code smoke (push) Has been cancelled
AI automation / Review issue follow-up (push) Has been cancelled
AI automation / Publish issue follow-up (push) Has been cancelled
AI automation / Implement with Claude Code (push) Has been cancelled
AI automation / Publish implement PR (push) Has been cancelled
AI automation / Continue queued issue comments (push) Has been cancelled
AI automation / Codex review loop (push) Has been cancelled
AI automation / Publish Codex fix (push) Has been cancelled
AI automation / Clear Codex dispatch marker (push) Has been cancelled
AI automation / Own PR re-request Codex (push) Has been cancelled
AI automation / External PR re-request Codex (push) Has been cancelled
AI automation / Poll Codex reaction / retry (push) Has been cancelled
build-et-binaries / build-linux-x64 (push) Has been cancelled
build-et-binaries / build-linux-arm64 (push) Has been cancelled
build-et-binaries / build-macos-universal (push) Has been cancelled
build-et-binaries / build-windows-x64 (push) Has been cancelled
build-et-binaries / release (push) Has been cancelled
Some checks failed
build-packages / resolve bundled mosh-client (push) Has been cancelled
build-packages / resolve bundled et-client (push) Has been cancelled
build-packages / build-macos (push) Has been cancelled
build-packages / build-windows (push) Has been cancelled
build-packages / build-linux-x64 (push) Has been cancelled
build-packages / build-linux-arm64 (push) Has been cancelled
build-packages / release (push) Has been cancelled
build-packages / update Nix release metadata (push) Has been cancelled
build-packages / bump homebrew tap (push) Has been cancelled
test / lint-and-test (push) Has been cancelled
AI automation / Route event (push) Has been cancelled
AI automation / Hand reopened issue to maintainers (push) Has been cancelled
AI automation / Clean source issue state (push) Has been cancelled
AI automation / Reconcile handoffs (push) Has been cancelled
AI automation / Classify issue (push) Has been cancelled
AI automation / Claude Code smoke (push) Has been cancelled
AI automation / Review issue follow-up (push) Has been cancelled
AI automation / Publish issue follow-up (push) Has been cancelled
AI automation / Implement with Claude Code (push) Has been cancelled
AI automation / Publish implement PR (push) Has been cancelled
AI automation / Continue queued issue comments (push) Has been cancelled
AI automation / Codex review loop (push) Has been cancelled
AI automation / Publish Codex fix (push) Has been cancelled
AI automation / Clear Codex dispatch marker (push) Has been cancelled
AI automation / Own PR re-request Codex (push) Has been cancelled
AI automation / External PR re-request Codex (push) Has been cancelled
AI automation / Poll Codex reaction / retry (push) Has been cancelled
build-et-binaries / build-linux-x64 (push) Has been cancelled
build-et-binaries / build-linux-arm64 (push) Has been cancelled
build-et-binaries / build-macos-universal (push) Has been cancelled
build-et-binaries / build-windows-x64 (push) Has been cancelled
build-et-binaries / release (push) Has been cancelled
This commit is contained in:
102
components/terminal/terminalMemo.ts
Normal file
102
components/terminal/terminalMemo.ts
Normal file
@@ -0,0 +1,102 @@
|
||||
import type { TerminalProps } from './terminalHelpers';
|
||||
|
||||
const themeFingerprint = (theme: TerminalProps['terminalTheme'] | undefined): string => (
|
||||
theme?.colors ? `${theme.id}:${theme.colors.background}:${theme.colors.foreground}:${theme.colors.cursor}` : ''
|
||||
);
|
||||
|
||||
export const terminalPropsAreEqual = (
|
||||
prev: TerminalProps,
|
||||
next: TerminalProps,
|
||||
): boolean => (
|
||||
prev.host === next.host
|
||||
&& prev.keys === next.keys
|
||||
&& prev.identities === next.identities
|
||||
&& prev.snippets === next.snippets
|
||||
&& prev.snippetPackages === next.snippetPackages
|
||||
&& prev.compactToolbar === next.compactToolbar
|
||||
&& prev.lineTimestampsAvailable === next.lineTimestampsAvailable
|
||||
&& prev.onDeleteSnippets === next.onDeleteSnippets
|
||||
&& prev.chainHosts === next.chainHosts
|
||||
&& themeFingerprint(prev.appearanceTheme ?? prev.terminalTheme) === themeFingerprint(next.appearanceTheme ?? next.terminalTheme)
|
||||
&& prev.knownHosts === next.knownHosts
|
||||
// Solo tab switches only flip isVisible. Skipping it leaves isVisibleRef
|
||||
// stale, so hidden panes keep the visible write path and tab-return recovery
|
||||
// in useTerminalEffects never runs (#1985).
|
||||
&& prev.isVisible === next.isVisible
|
||||
&& prev.paneLayoutKey === next.paneLayoutKey
|
||||
&& prev.inWorkspace === next.inWorkspace
|
||||
&& prev.isResizing === next.isResizing
|
||||
&& prev.isFocusMode === next.isFocusMode
|
||||
&& prev.isPaneMagnified === next.isPaneMagnified
|
||||
&& prev.isFocused === next.isFocused
|
||||
&& prev.isFocusedPane === next.isFocusedPane
|
||||
&& prev.fontFamilyId === next.fontFamilyId
|
||||
&& prev.fontSize === next.fontSize
|
||||
&& prev.followAppTerminalTheme === next.followAppTerminalTheme
|
||||
// accentMode / customAccent intentionally omitted — Terminal reads appearanceChromeStore.
|
||||
&& prev.terminalSettings === next.terminalSettings
|
||||
&& prev.sessionId === next.sessionId
|
||||
&& prev.restoreState === next.restoreState
|
||||
&& prev.vaultInitializedOverride === next.vaultInitializedOverride
|
||||
&& prev.shellType === next.shellType
|
||||
&& prev.lastCwd === next.lastCwd
|
||||
&& prev.restoreTerminalCwd === next.restoreTerminalCwd
|
||||
&& prev.sessionDisplayName === next.sessionDisplayName
|
||||
&& prev.startupCommand === next.startupCommand
|
||||
&& prev.noAutoRun === next.noAutoRun
|
||||
&& prev.pendingScriptId === next.pendingScriptId
|
||||
&& prev.pendingScript === next.pendingScript
|
||||
&& prev.reuseConnectionFromSessionId === next.reuseConnectionFromSessionId
|
||||
&& prev.requireFreshConnection === next.requireFreshConnection
|
||||
&& prev.attachExistingSession === next.attachExistingSession
|
||||
&& prev.serialConfig === next.serialConfig
|
||||
&& prev.hotkeyScheme === next.hotkeyScheme
|
||||
&& prev.disableTerminalFontZoom === next.disableTerminalFontZoom
|
||||
&& prev.keyBindings === next.keyBindings
|
||||
&& prev.isBroadcastEnabled === next.isBroadcastEnabled
|
||||
&& prev.isWorkspaceComposeBarOpen === next.isWorkspaceComposeBarOpen
|
||||
&& prev.sessionLog === next.sessionLog
|
||||
&& prev.sshDebugLogEnabled === next.sshDebugLogEnabled
|
||||
&& prev.sudoAutofillPassword === next.sudoAutofillPassword
|
||||
&& prev.sudoAutofillCandidates === next.sudoAutofillCandidates
|
||||
&& prev.showSelectionAIAction === next.showSelectionAIAction
|
||||
&& prev.onHotkeyAction === next.onHotkeyAction
|
||||
&& prev.onTerminalFontSizeChange === next.onTerminalFontSizeChange
|
||||
&& prev.onStatusChange === next.onStatusChange
|
||||
&& prev.onSessionExit === next.onSessionExit
|
||||
&& prev.onTerminalDataCapture === next.onTerminalDataCapture
|
||||
&& prev.onOsDetected === next.onOsDetected
|
||||
&& prev.onCloseSession === next.onCloseSession
|
||||
&& prev.onUpdateHost === next.onUpdateHost
|
||||
&& prev.onAddKnownHost === next.onAddKnownHost
|
||||
&& prev.onExpandToFocus === next.onExpandToFocus
|
||||
&& prev.onTogglePaneMagnification === next.onTogglePaneMagnification
|
||||
&& prev.onCommandExecuted === next.onCommandExecuted
|
||||
&& prev.onCommandSubmitted === next.onCommandSubmitted
|
||||
&& prev.onSplitHorizontal === next.onSplitHorizontal
|
||||
&& prev.onSplitVertical === next.onSplitVertical
|
||||
&& prev.onOpenSftp === next.onOpenSftp
|
||||
&& prev.onTerminalCwdChange === next.onTerminalCwdChange
|
||||
&& prev.onTerminalTitleChange === next.onTerminalTitleChange
|
||||
&& prev.onTerminalBell === next.onTerminalBell
|
||||
&& prev.onTerminalOutput === next.onTerminalOutput
|
||||
&& prev.onTerminalContextReaderChange === next.onTerminalContextReaderChange
|
||||
&& prev.onOpenScripts === next.onOpenScripts
|
||||
&& prev.onOpenHistory === next.onOpenHistory
|
||||
&& prev.onOpenTheme === next.onOpenTheme
|
||||
&& prev.onOpenSystem === next.onOpenSystem
|
||||
&& prev.onToggleBroadcast === next.onToggleBroadcast
|
||||
&& prev.onToggleComposeBar === next.onToggleComposeBar
|
||||
&& prev.onBroadcastInput === next.onBroadcastInput
|
||||
&& prev.onBroadcastInterruptPriorityChange === next.onBroadcastInterruptPriorityChange
|
||||
&& prev.onSnippetExecutorChange === next.onSnippetExecutorChange
|
||||
&& prev.onProgrammaticCommandLogRewriteChange === next.onProgrammaticCommandLogRewriteChange
|
||||
&& prev.onAddSelectionToAI === next.onAddSelectionToAI
|
||||
&& prev.onRename === next.onRename
|
||||
&& prev.onDetach === next.onDetach
|
||||
&& prev.onStartSessionDrag === next.onStartSessionDrag
|
||||
&& prev.onEndSessionDrag === next.onEndSessionDrag
|
||||
&& prev.onDetachPointerDown === next.onDetachPointerDown
|
||||
&& prev.onDetachDragStart === next.onDetachDragStart
|
||||
&& prev.onDetachDragEnd === next.onDetachDragEnd
|
||||
);
|
||||
Reference in New Issue
Block a user