import type { RepoIconPickResult } from '../../shared/repo-icon-pick-failure-copy' import type { ExecutionHostId } from '../../shared/execution-host' import type { ShellPathExistence } from '../../shared/file-access/path-existence-batch' import type { ShellOpenExternalEditorRequest, ShellOpenExternalEditorResult, ShellOpenFileResult, ShellOpenLocalPathResult } from '../../shared/shell/opening/shell-open-types' export type ShellApi = { /** Every OS open names the path's owner; main refuses anything not owned by this computer. */ openPath: (path: string, ownerHostId: ExecutionHostId) => Promise openInFileManager: ( path: string, ownerHostId: ExecutionHostId ) => Promise openInExternalEditor: ( request: ShellOpenExternalEditorRequest ) => Promise openUrl: (url: string) => Promise openFilePath: (path: string, ownerHostId: ExecutionHostId) => Promise openFileUri: (uri: string, ownerHostId: ExecutionHostId) => Promise pathsExist?: (paths: string[]) => Promise /** `wakeWslDistro`: a click, a user act that may start a stopped WSL distro. */ pathExists: (path: string, options?: { wakeWslDistro?: boolean }) => Promise pickAttachment: () => Promise pickAttachments: () => Promise pickImage: () => Promise pickRepoIconImage: () => Promise pickAudio: () => Promise pickDirectory: (args: { defaultPath?: string }) => Promise }