feat(agent): support deleting dev containers (#21247)

Add logic to the agent, and an endpoint, to allow requesting and then deleting a Dev Container and its related agent.
This commit is contained in:
Danielle Maywood
2025-12-22 11:28:31 +00:00
committed by GitHub
parent 59959e0add
commit 44a46db487
12 changed files with 872 additions and 78 deletions
+13
View File
@@ -401,9 +401,22 @@ const (
WorkspaceAgentDevcontainerStatusRunning WorkspaceAgentDevcontainerStatus = "running"
WorkspaceAgentDevcontainerStatusStopped WorkspaceAgentDevcontainerStatus = "stopped"
WorkspaceAgentDevcontainerStatusStarting WorkspaceAgentDevcontainerStatus = "starting"
WorkspaceAgentDevcontainerStatusStopping WorkspaceAgentDevcontainerStatus = "stopping"
WorkspaceAgentDevcontainerStatusDeleting WorkspaceAgentDevcontainerStatus = "deleting"
WorkspaceAgentDevcontainerStatusError WorkspaceAgentDevcontainerStatus = "error"
)
func (s WorkspaceAgentDevcontainerStatus) Transitioning() bool {
switch s {
case WorkspaceAgentDevcontainerStatusStarting,
WorkspaceAgentDevcontainerStatusStopping,
WorkspaceAgentDevcontainerStatusDeleting:
return true
default:
return false
}
}
// WorkspaceAgentDevcontainer defines the location of a devcontainer
// configuration in a workspace that is visible to the workspace agent.
type WorkspaceAgentDevcontainer struct {