-
Notifications
You must be signed in to change notification settings - Fork 773
feat(sagemaker): Adding support for Cursor IDE #8384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
arkaprava08
wants to merge
9
commits into
aws:master
Choose a base branch
from
arkaprava08:feat/cursor-ide-support
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
6995b40
feat: Adding support for Cursor IDE
267fcec
Merge branch 'master' into feat/cursor-ide-support
a3defcd
Re-run CI
2a60f26
vscode.env not available during test setup
6bc1c47
use a getter
de45782
Separate test environment constants from actual runtime usage
a906760
Just use the new constants object in test util
fd192c7
Merge branch 'master' into feat/cursor-ide-support
ashishrp-aws 1547f07
Merge branch 'master' into feat/cursor-ide-support
ashishrp-aws File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| /*! | ||
| * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| // eslint-disable-next-line @typescript-eslint/naming-convention | ||
| export const VSCODE_REMOTE_SSH_EXTENSION = { | ||
| vscode: { | ||
| id: 'ms-vscode-remote.remote-ssh', | ||
| minVersion: '0.74.0', | ||
| }, | ||
| cursor: { | ||
| id: 'anysphere.remote-ssh', | ||
| minVersion: '1.0.2', | ||
| }, | ||
| } as const | ||
|
|
||
| /** | ||
| * Extension IDs that don't require runtime vscode access. | ||
| * Safe to import in test environments. | ||
| */ | ||
| // eslint-disable-next-line @typescript-eslint/naming-convention | ||
| export const VSCODE_EXTENSION_ID_CONSTANTS = { | ||
| awstoolkit: 'amazonwebservices.aws-toolkit-vscode', | ||
| amazonq: 'amazonwebservices.amazon-q-vscode', | ||
| python: 'ms-python.python', | ||
| // python depends on jupyter plugin | ||
| jupyter: 'ms-toolsai.jupyter', | ||
| yaml: 'redhat.vscode-yaml', | ||
| go: 'golang.go', | ||
| java: 'redhat.java', | ||
| javadebug: 'vscjava.vscode-java-debug', | ||
| dotnet: 'ms-dotnettools.csdevkit', | ||
| git: 'vscode.git', | ||
| // default to VSCode in test environment | ||
| remotessh: VSCODE_REMOTE_SSH_EXTENSION.vscode, | ||
| } as const | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,26 +10,30 @@ import { TelemetryService } from './telemetry/telemetryService' | |
| import { CredentialsStore } from '../auth/credentials/store' | ||
| import { SamCliContext } from './sam/cli/samCliContext' | ||
| import { UriHandler } from './vscode/uriHandler' | ||
| import { VSCODE_EXTENSION_ID_CONSTANTS, VSCODE_REMOTE_SSH_EXTENSION } from './extensionIds' | ||
|
|
||
| // Determine the remote SSH extension based on the editor | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we iterate the VSCODE_REMOTE_SSH_EXTENSION to avoid if-else logic? It would be more open-close compatible. |
||
| const getRemoteSshExtension = () => { | ||
| const appName = vscode?.env?.appName?.toLowerCase() | ||
|
|
||
| if (appName?.includes('cursor')) { | ||
| return VSCODE_REMOTE_SSH_EXTENSION.cursor | ||
| } | ||
|
|
||
| return VSCODE_REMOTE_SSH_EXTENSION.vscode | ||
| } | ||
|
|
||
| // For actual use in IDE, not test environment | ||
| // eslint-disable-next-line @typescript-eslint/naming-convention | ||
| export const VSCODE_EXTENSION_ID = { | ||
| awstoolkit: 'amazonwebservices.aws-toolkit-vscode', | ||
| amazonq: 'amazonwebservices.amazon-q-vscode', | ||
| python: 'ms-python.python', | ||
| // python depends on jupyter plugin | ||
| jupyter: 'ms-toolsai.jupyter', | ||
| yaml: 'redhat.vscode-yaml', | ||
| go: 'golang.go', | ||
| java: 'redhat.java', | ||
| javadebug: 'vscjava.vscode-java-debug', | ||
| dotnet: 'ms-dotnettools.csdevkit', | ||
| git: 'vscode.git', | ||
| remotessh: 'ms-vscode-remote.remote-ssh', | ||
| ...VSCODE_EXTENSION_ID_CONSTANTS, | ||
| get remotessh() { | ||
| return getRemoteSshExtension() | ||
| }, | ||
| } as const | ||
|
|
||
| export const vscodeExtensionMinVersion = { | ||
| remotessh: '0.74.0', | ||
| } | ||
| // Re-export for backward compatibility | ||
| export { VSCODE_REMOTE_SSH_EXTENSION } | ||
|
|
||
| /** @deprecated Use `extensionGlobals.ts:globals` instead. */ | ||
| export interface ExtContext { | ||
|
|
||
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we decide this version? latest version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest tested version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have keep updating the Id for any remote ssh update from cursor?