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
@@ -0,0 +1,27 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import {
|
||||
conflictNamesFromListing,
|
||||
formatOverwriteMessage,
|
||||
transferDestinationPath,
|
||||
} from '../../../src/components/sftp/transferConflicts'
|
||||
|
||||
describe('transferConflicts', () => {
|
||||
it('builds remote and local destination paths', () => {
|
||||
expect(transferDestinationPath('upload', '/', 'a.txt')).toBe('/a.txt')
|
||||
expect(transferDestinationPath('upload', '/root/', 'a.txt')).toBe('/root/a.txt')
|
||||
expect(transferDestinationPath('download', '/Users/test', 'a.txt')).toBe('/Users/test/a.txt')
|
||||
})
|
||||
|
||||
it('finds conflicts from a listing', () => {
|
||||
expect(
|
||||
conflictNamesFromListing(['a.txt', 'b.txt', 'c.txt'], [{ name: 'b.txt' }, { name: 'c.txt' }])
|
||||
).toEqual(['b.txt', 'c.txt'])
|
||||
})
|
||||
|
||||
it('formats overwrite copy for one and many', () => {
|
||||
const t = (key: string, opts?: Record<string, unknown>) =>
|
||||
`${key}:${opts ? JSON.stringify(opts) : ''}`
|
||||
expect(formatOverwriteMessage(['only.log'], 'upload', t)).toContain('overwriteOneRemote')
|
||||
expect(formatOverwriteMessage(['a', 'b', 'c'], 'download', t)).toContain('overwriteManyLocal')
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user