8000 feat: support devcontainer agents in ui and unify backend by mafredri · Pull Request #18332 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat: support devcontainer agents in ui and unify backend #18332

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

Merged
merged 29 commits into from
Jun 17, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ui-final?
  • Loading branch information
mafredri committed Jun 13, 2025
commit 18e1593c30dd0f6f2d350531abe22bc0180f30ab
16 changes: 10 additions & 6 deletions agent/agentcontainers/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -661,13 +661,17 @@ func (api *API) getContainers() (codersdk.WorkspaceAgentListContainersResponse,
if len(api.knownDevcontainers) > 0 {
devcontainers = make([]codersdk.WorkspaceAgentDevcontainer, 0, len(api.knownDevcontainers))
for _, dc := range api.knownDevcontainers {
// Include the agent if it's been created (we're iterating
// over copies, so mutating is fine).
if agent := api.injectedSubAgentProcs[dc.WorkspaceFolder].agent; agent.ID != uuid.Nil {
// Include the agent if it's been created (we're iterating over
// copies, so mutating is fine).
//
// NOTE(mafredri): We could filter on "proc.containerID == dc.Container.ID"
// here but not doing so allows us to do some tricks in the UI to
// make the experience more responsive for now.
if proc := api.injectedSubAgentProcs[dc.WorkspaceFolder]; proc.agent.ID != uuid.Nil {
dc.Agent = &codersdk.WorkspaceAgentDevcontainerAgent{
ID: agent.ID,
Name: agent.Name,
Directory: agent.Directory,
ID: proc.agent.ID,
Name: proc.agent.Name,
Directory: proc.agent.Directory,
}
}

Expand Down
Loading
Loading
0