mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
The browse interaction also presents a dialog (the in-app modal), so 'dialog' failed to discriminate the two capability kinds; 'native' names where the chooser runs. Package directory-picker-dialog -> directory-picker-native, kind 'dialog' -> 'native', with every seam/gateway/client/doc reference updated and the seam Agent Note's naming rationale rewritten to match.
22 lines
884 B
TypeScript
22 lines
884 B
TypeScript
/** Registration/capability behavior of the native backend (the seam's cordis half). */
|
|
|
|
import { describe, expect, it } from 'vitest'
|
|
import { Context } from 'cordis'
|
|
import NativeDirectoryPicker from '../src/index.ts'
|
|
|
|
describe('NativeDirectoryPicker', () => {
|
|
it('registers ctx.directoryPicker with a stable native capability and leaves with its fiber', async () => {
|
|
const ctx = new Context()
|
|
const fiber = ctx.plugin(NativeDirectoryPicker)
|
|
await fiber.await()
|
|
const picker = ctx.get('directoryPicker')
|
|
expect(picker).toBeInstanceOf(NativeDirectoryPicker)
|
|
const capability = picker!.capability()
|
|
expect(capability.kind).toBe('native')
|
|
// Stability: consumers may capture the capability object across calls.
|
|
expect(picker!.capability()).toBe(capability)
|
|
await fiber.dispose()
|
|
expect(ctx.get('directoryPicker')).toBeUndefined()
|
|
})
|
|
})
|