Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add ability to attach to devcontainers#463

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
DanielleMaywood merged 1 commit intomainfromdm-devcontainers
Apr 2, 2025

Conversation

DanielleMaywood
Copy link
Collaborator

@DanielleMaywoodDanielleMaywood commentedApr 1, 2025
edited
Loading

Relates tocoder/coder#16426

Adds the ability to connect to a running devcontainer inside a Coder Workspace.

We add a new handler to handle the URI

vscode://coder.coder-remote/openDevContainer

With the following query params:

  • url: The URL of the deployment
  • token: The API key
  • owner: The workspace owner
  • workspace: The workspace name
  • devContainerName: The name of the dev container
  • devContainerFolder: The folder inside the dev container

Adds the ability to connect to a running devcontainer inside a CoderWorksapce.
Copy link

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull Request Overview

This PR adds functionality to attach to a running devcontainer within a Coder Workspace. The changes include introducing a new utility to build remote authority strings, updating the extension to handle a new "/openDevContainer" path and register a corresponding command, and implementing the openDevContainer command in the commands module.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

FileDescription
src/util.tsAdds toRemoteAuthority to centralize remote authority string logic.
src/extension.tsIntroduces new query parameter processing and command invocation for devcontainers.
src/commands.tsImplements openDevContainer command and refactors openWorkspace to leverage toRemoteAuthority.

Comment on lines +515 to +516
const workspaceAgent = undefined // args[2] is reserved, but we do not support multiple agents yet.
const devContainerName = args[3] as string
Copy link
Preview

CopilotAIApr 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The extension passes a workspaceAgent parameter for the openDevContainer command, but this parameter is being discarded by explicitly setting workspaceAgent to undefined. Consider either using args[2] if provided or updating the extension to no longer supply the parameter.

Suggested change
constworkspaceAgent=undefined// args[2] is reserved, but we do not support multiple agents yet.
constdevContainerName=args[3]asstring
constworkspaceAgent=args[2]asWorkspaceAgent|undefined// Use args[2] if provided.

Copilot uses AI. Check for mistakes.

Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

We already have precedent for doing this with theopenWorkspace flow

Copy link
Member

@code-ashercode-asher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Slick! I only tested VS Code (not Cursor, etc), but it looks good.

const devContainerFolder = params.get("devContainerFolder")

if (!workspaceOwner) {
throw new Error("workspace owner must be specified as a query parameter")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

No need to change in this PR since this is a pattern that already existed, but at some point I wonder if we should catch handler errors and show them in an error notification. Currently the only way to see them seems to be to go to the extension's features > runtime status > uncaught errors.

DanielleMaywood reacted with thumbs up emoji
@DanielleMaywoodDanielleMaywood merged commit1922834 intomainApr 2, 2025
2 checks passed
@DanielleMaywoodDanielleMaywood deleted the dm-devcontainers branchApril 2, 2025 08:21
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@code-ashercode-ashercode-asher approved these changes

Copilot code reviewCopilotCopilot left review comments

@ParkreinerParkreinerAwaiting requested review from Parkreiner

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@DanielleMaywood@code-asher

[8]ページ先頭

©2009-2025 Movatter.jp