feat: harden local shell, SFTP, and desktop session reliability
Finder-launched terminals now inherit a login PATH so tools like ollama resolve, destructive SFTP/editor actions require confirmation, and terminal search plus window dragging work again. SSH forwards and RDP sessions keep listeners and survive reconnect without FastPath crashes. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
188f3556ed
commit
08696896f9
223 files changed
+13493
-3423
No files matched your search
@@ -20,6 +20,7 @@ import { useEffect } from 'react'
|
||||
import { useTabStore } from '../stores/tabStore'
|
||||
import { useCommandPaletteStore } from '../stores/commandPaletteStore'
|
||||
import { useKeybindingStore } from '../stores/keybindingStore'
|
||||
import { useDesktopFullscreenStore } from '../stores/desktopFullscreenStore'
|
||||
import { KeybindingAction } from '../constants/keybindings'
|
||||
import { createLogger } from '../utils/logger'
|
||||
import i18n from '../i18n'
|
||||
@@ -189,20 +190,23 @@ export function useKeyboardShortcuts(): void {
|
||||
}
|
||||
}
|
||||
|
||||
// ---- F11: 全屏 ----
|
||||
// ---- F11: 全屏(RDP/VNC 会话全屏;其他标签走窗口全屏)----
|
||||
if (matchesKeySequence(e, keys[KeybindingAction.VIEW_FULLSCREEN])) {
|
||||
e.preventDefault()
|
||||
if (window.opsxApi?.settingsSet) {
|
||||
window.opsxApi
|
||||
.settingsGet('fullscreen')
|
||||
.then((res: { success: boolean; value?: unknown }) => {
|
||||
const isFullscreen = res?.value === true
|
||||
window.opsxApi?.settingsSet('fullscreen', !isFullscreen)
|
||||
})
|
||||
.catch(() => {
|
||||
logger.warn('Failed to toggle fullscreen')
|
||||
})
|
||||
const { tabs, activeTabId } = useTabStore.getState()
|
||||
const activeTab = tabs.find((tab) => tab.id === activeTabId)
|
||||
if (activeTab && (activeTab.type === 'rdp' || activeTab.type === 'vnc')) {
|
||||
void useDesktopFullscreenStore.getState().toggle(activeTab.id)
|
||||
return
|
||||
}
|
||||
void (async () => {
|
||||
try {
|
||||
const current = (await window.opsxApi?.isFullscreen?.()) === true
|
||||
await window.opsxApi?.setFullscreen?.(!current)
|
||||
} catch {
|
||||
logger.warn('Failed to toggle fullscreen')
|
||||
}
|
||||
})()
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user