refactor: don't hide pinned window on search result open (#662)

* refactor: don't hide pinned window on search result open

* refactor: update
This commit is contained in:
ayangweb
2025-06-11 15:26:06 +08:00
committed by GitHub
parent be3cae36e2
commit 44ca66259c
8 changed files with 55 additions and 64 deletions

View File

@@ -1,4 +1,5 @@
import type { BasePlatformAdapter } from "@/types/platform";
import { copyToClipboard, OpenURLWithBrowser } from ".";
export interface WebPlatformAdapter extends BasePlatformAdapter {
// Add web-specific methods here
@@ -188,5 +189,15 @@ export const createWebAdapter = (): WebPlatformAdapter => {
async revealItemInDir(path) {
console.log("revealItemInDir is not supported in web environment", path);
},
async openSearchItem(data) {
if (data?.url) {
return OpenURLWithBrowser(data.url);
}
if (data?.payload?.result?.value) {
return copyToClipboard(data.payload.result.value);
}
},
};
};