Skip to content

Commit a3e19dc

Browse files
committed
rename deeplink to open-project and use query params
1 parent e9bbd8b commit a3e19dc

2 files changed

Lines changed: 2 additions & 14 deletions

File tree

packages/app/src/pages/layout.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,15 +1096,8 @@ export default function Layout(props: ParentProps) {
10961096
const parseDeepLink = (input: string) => {
10971097
if (!input.startsWith("opencode://")) return
10981098
const url = new URL(input)
1099-
if (url.hostname !== "file") return
1100-
let directory = decodeURIComponent(url.pathname)
1101-
if (/^\/[A-Za-z]:/.test(directory)) {
1102-
directory = directory.slice(1)
1103-
}
1104-
directory = directory.replace(/\/$/, "")
1105-
if (platform.os === "windows") {
1106-
directory = directory.replace(/\//g, "\\")
1107-
}
1099+
if (url.hostname !== "open-project") return
1100+
const directory = url.searchParams.get("directory")
11081101
if (!directory) return
11091102
return directory
11101103
}

packages/desktop/src-tauri/tauri.prod.conf.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@
2525
}
2626
},
2727
"plugins": {
28-
"deep-link": {
29-
"desktop": {
30-
"schemes": ["opencode"]
31-
}
32-
},
3328
"updater": {
3429
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEYwMDM5Nzg5OUMzOUExMDQKUldRRW9UbWNpWmNEOENYT01CV0lhOXR1UFhpaXJsK1Z3aU9lZnNtNzE0TDROWVMwVW9XQnFOelkK",
3530
"endpoints": ["https://github.com/anomalyco/opencode/releases/latest/download/latest.json"]

0 commit comments

Comments
 (0)