Adds an 'ide' url parameter for gk.dev links#4934
Open
Conversation
🤖 Augment PR SummarySummary: This PR updates gk.dev link generation to include an Changes:
Technical Notes: The IDE identifier comes from 🤖 Was this summary useful? React with 👍 or 👎 |
936d004 to
0209c58
Compare
sergeibbb
added a commit
that referenced
this pull request
Jan 27, 2026
Updates `getGkDevUrl` to asynchronously fetch and include the host IDE (e.g., VS Code) as an `ide` query parameter. It should be used for all register, connect, and upgrade flows. Introduces `getGkDevUrlWithoutIdeArg` for cases where the `ide` parameter is not required, such as draft URLs. Updates all existing call sites to `await` the now-asynchronous `getGkDevUrl` method. Refactors query parameter generation for `source` and `ide` into dedicated helper methods for improved consistency. (#4905, #4934)
0209c58 to
d24cb30
Compare
src/plus/gk/urlsProvider.ts
Outdated
Comment on lines
50
to
58
| async getGkDevUrl(pathSegments?: string | string[], query?: string | URLSearchParams): Promise<string> { | ||
| const ide = (await getHostAppName()) ?? 'unknown'; | ||
| query = this.provideQueryWithIdeArg(query, ide); | ||
| query = this.provideQueryWithSourceArg(query); | ||
| const uri = this.buildGkDevUri(pathSegments, query); | ||
| return uri.toString(true); | ||
| } | ||
|
|
||
| getGkDevUrlWithoutIdeArg(pathSegments?: string | string[], query?: string | URLSearchParams): string { |
Contributor
There was a problem hiding this comment.
Why do we have two functions? Is there some technical reason we can't make it async in every case and just provide the option in the params to include IDE?
Member
Author
There was a problem hiding this comment.
Yes, you're right.
ViewNode.getUrl supports both async and sync signatures, so I can just update it and it does not require massive changes.
sergeibbb
added a commit
that referenced
this pull request
Feb 2, 2026
Updates `getGkDevUrl` to asynchronously fetch and include the host IDE (e.g., VS Code) as an `ide` query parameter. It should be used for all register, connect, and upgrade flows. Introduces `getGkDevUrlWithoutIdeArg` for cases where the `ide` parameter is not required, such as draft URLs. Updates all existing call sites to `await` the now-asynchronous `getGkDevUrl` method. Refactors query parameter generation for `source` and `ide` into dedicated helper methods for improved consistency. (#4905, #4934)
d24cb30 to
8d61774
Compare
sergeibbb
added a commit
that referenced
this pull request
Feb 2, 2026
Updates `getGkDevUrl` to asynchronously fetch and include the host IDE (e.g., VS Code) as an `ide` query parameter. It should be used for all register, connect, and upgrade flows. Introduces `getGkDevUrlWithoutIdeArg` for cases where the `ide` parameter is not required, such as draft URLs. Updates all existing call sites to `await` the now-asynchronous `getGkDevUrl` method. Refactors query parameter generation for `source` and `ide` into dedicated helper methods for improved consistency. (#4905, #4934)
8d61774 to
c7b8c20
Compare
Updates `getGkDevUrl` to asynchronously fetch and include the host IDE (e.g., VS Code) as an `ide` query parameter. It should be used for all register, connect, and upgrade flows. Introduces `getGkDevUrlWithoutIdeArg` for cases where the `ide` parameter is not required, such as draft URLs. Updates all existing call sites to `await` the now-asynchronous `getGkDevUrl` method. Refactors query parameter generation for `source` and `ide` into dedicated helper methods for improved consistency. (#4905, #4934)
c7b8c20 to
fdf0658
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Solves #4905
Checklist
Fixes $XXX -orCloses #XXX -prefix to auto-close the issue that your PR addresses