Import lib/types/client/open-folder.d.ts
This commit is contained in:
parent
44e1401a1e
commit
f0c1d28a2e
|
|
@ -0,0 +1,34 @@
|
||||||
|
/**
|
||||||
|
* Transport for the official open-in-app host routes served by
|
||||||
|
* `@deepseek-ai/dsh-host-open-in-app`. The project row offers "open this
|
||||||
|
* project's folder" by asking that host half for the applications it verified
|
||||||
|
* as installed, then POSTing the launcher it already resolved — this plugin
|
||||||
|
* never probes or spawns a launcher itself, and a host without the capability
|
||||||
|
* (no resolved application, e.g. an SSH launch) simply yields no menu entry.
|
||||||
|
*/
|
||||||
|
/** GET route serving the probed application ids (host-owned constant). */
|
||||||
|
export declare const OPEN_IN_APP_APPS_ROUTE = "/open-in-app/apps";
|
||||||
|
/** POST route launching one resolved application on one absolute directory. */
|
||||||
|
export declare const OPEN_IN_APP_OPEN_ROUTE = "/open-in-app/open";
|
||||||
|
/**
|
||||||
|
* The installed file-manager id for this host, or undefined when the host
|
||||||
|
* resolved none (the row then offers no "open in folder" entry).
|
||||||
|
* @param apps - installed catalog ids from the apps route.
|
||||||
|
* @returns the preferred available id.
|
||||||
|
*/
|
||||||
|
export declare function folderAppId(apps: readonly string[]): string | undefined;
|
||||||
|
/**
|
||||||
|
* Read the host's installed-application ids. A host without the capability
|
||||||
|
* (or one that refuses) reads as an empty list rather than an error, so the
|
||||||
|
* caller can treat "no apps" and "no route" identically.
|
||||||
|
* @param signal - aborts the read when the browser half unmounts.
|
||||||
|
* @returns installed catalog ids, in host menu order.
|
||||||
|
*/
|
||||||
|
export declare function fetchOpenInApps(signal?: AbortSignal): Promise<readonly string[]>;
|
||||||
|
/**
|
||||||
|
* Launch one installed application on one absolute directory.
|
||||||
|
* @param appId - catalog id from the apps route.
|
||||||
|
* @param path - the project's absolute directory.
|
||||||
|
* @returns after the host acknowledged the launch; rejects on any refusal.
|
||||||
|
*/
|
||||||
|
export declare function openPathInApp(appId: string, path: string): Promise<void>;
|
||||||
Loading…
Reference in New Issue