experiment: better web picker using @pierre/tree (#31208)
This commit is contained in:
parent
25cb2be619
commit
88f5b9a90e
39 changed files with 1297 additions and 211 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { contextBridge, ipcRenderer } from "electron"
|
||||
import { contextBridge, ipcRenderer, webUtils } from "electron"
|
||||
import type { ElectronAPI, WslServersEvent } from "./types"
|
||||
import type { UpdaterState } from "@opencode-ai/app/updater"
|
||||
|
||||
|
|
@ -88,6 +88,7 @@ const api: ElectronAPI = {
|
|||
openFilePicker: (opts) => ipcRenderer.invoke("open-file-picker", opts),
|
||||
readPickedFile: (token, path) => ipcRenderer.invoke("read-picked-file", token, path),
|
||||
releasePickedFiles: (token) => ipcRenderer.invoke("release-picked-files", token),
|
||||
getPathForFile: (file) => webUtils.getPathForFile(file),
|
||||
saveFilePicker: (opts) => ipcRenderer.invoke("save-file-picker", opts),
|
||||
openLink: (url) => ipcRenderer.send("open-link", url),
|
||||
openPath: (path, app) => ipcRenderer.invoke("open-path", path, app),
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ export type ElectronAPI = {
|
|||
}) => Promise<{ token: string; files: { path: string; name: string; size: number }[] } | null>
|
||||
readPickedFile: (token: string, path: string) => Promise<ArrayBuffer>
|
||||
releasePickedFiles: (token: string) => Promise<void>
|
||||
getPathForFile: (file: File) => string
|
||||
saveFilePicker: (opts?: { title?: string; defaultPath?: string }) => Promise<string | null>
|
||||
openLink: (url: string) => void
|
||||
openPath: (path: string, app?: string) => Promise<void>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue