mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-11-16 19:36:54 +00:00
The native directory picker now passes createDirectory, so macOS shows New Folder. The remote folder picker gets a New folder action that calls the existing POST /api/files/mkdir under the current path and opens the new folder, ready to select.
26 lines
1.1 KiB
TypeScript
26 lines
1.1 KiB
TypeScript
import { describe, expect, it } from 'vitest'
|
|
|
|
import { selectPathsDialogProperties } from './select-paths-dialog'
|
|
|
|
describe('selectPathsDialogProperties', () => {
|
|
it('lets a directory picker create a new folder (macOS hides New Folder without createDirectory)', () => {
|
|
const properties = selectPathsDialogProperties({ directories: true, multiple: false })
|
|
|
|
expect(properties).toContain('openDirectory')
|
|
expect(properties).toContain('createDirectory')
|
|
})
|
|
|
|
it('keeps file pickers file-only and multi-select by default', () => {
|
|
const properties = selectPathsDialogProperties({})
|
|
|
|
expect(properties).toContain('openFile')
|
|
expect(properties).toContain('multiSelections')
|
|
expect(properties).not.toContain('openDirectory')
|
|
expect(properties).not.toContain('createDirectory')
|
|
})
|
|
|
|
it('drops multi-select only when the caller opts out', () => {
|
|
expect(selectPathsDialogProperties({ directories: true })).toContain('multiSelections')
|
|
expect(selectPathsDialogProperties({ directories: true, multiple: false })).not.toContain('multiSelections')
|
|
})
|
|
})
|