Skip to content

feat(cli): improve devcontainer support for coder show #18793

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 8 commits into from
Jul 8, 2025
Merged
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
slice.Find
  • Loading branch information
mafredri committed Jul 8, 2025
commit f5fa73c3073fd734047a4726c6ce2973d52f1696
11 changes: 4 additions & 7 deletions cli/cliui/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,10 @@ func renderDevcontainerRow(resources []codersdk.WorkspaceResource, devcontainer
displayName := devcontainer.Name
if devcontainer.Agent != nil && devcontainer.Status == codersdk.WorkspaceAgentDevcontainerStatusRunning {
for _, resource := range resources {
for _, agent := range resource.Agents {
if agent.ID == devcontainer.Agent.ID {
subAgent = &agent
break
}
}
if subAgent != nil {
if agent, found := slice.Find(resource.Agents, func(agent codersdk.WorkspaceAgent) bool {
return agent.ID == devcontainer.Agent.ID
}); found {
subAgent = &agent
break
}
}
Expand Down
Loading