Skip to content

feat(agent/agentcontainers): fall back to workspace folder name #18466

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 12 commits into from
Jun 23, 2025
Merged
Prev Previous commit
Next Next commit
chore: improve comment
  • Loading branch information
DanielleMaywood committed Jun 23, 2025
commit ad39074c5b56bdfe2b103747393a6769caec77b1
5 changes: 3 additions & 2 deletions agent/agentcontainers/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,9 @@ func (api *API) processUpdatedContainersLocked(ctx context.Context, updated code
if !api.devcontainerNames[dc.Name] {
// If the devcontainer name wasn't set via terraform, we
// will attempt to create an agent name based on the workspace
// folder's name. If that is not possible, we will fall back
// to using the container's friendly name.
// folder's name. If it is not possible to generate a valid
// agent name based off of the folder name (i.e. no valid characters),
// we will instead fall back to using the container's friendly name.
dc.Name = safeAgentName(filepath.Base(dc.WorkspaceFolder), dc.Container.FriendlyName)
}
}
Expand Down