feat(plugins): install marketplace packages via dbx deep link

This commit is contained in:
t8y2 committed 2026-09-15 17:55:04 +08:00
1 parent 0437f952e0
commit 94bcbc1631
18 files changed
+223 -1

No files matched your search

@@ -9,6 +9,7 @@ export function useTauriEvents(deps: {
openDbFilePath: (path: string) => Promise<void>;
openConnectionDeepLink: (url: string) => Promise<void>;
openAiConfigDeepLink: (url: string) => Promise<void>;
openPluginInstallDeepLink: (url: string) => Promise<void>;
closeActiveSurface: () => void;
}) {
const connectionStore = useConnectionStore();
@@ -153,6 +154,17 @@ export function useTauriEvents(deps: {
}
}).then((unlisten) => unlistenHandles.push(unlisten));
listen<string[]>("dbx-open-plugin-install-links", async (event) => {
try {
for (const url of event.payload) {
await deps.openPluginInstallDeepLink(url);
}
focusCurrentWindow();
} catch (e) {
console.error("[DBX] dbx-open-plugin-install-links error:", e);
}
}).then((unlisten) => unlistenHandles.push(unlisten));
listen("dbx-close-active-tab", () => {
deps.closeActiveSurface();
}).then((unlisten) => unlistenHandles.push(unlisten));