mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
feat: support devcontainer agents in ui and unify backend (#18332)
This commit consolidates two container endpoints on the backend and improves the frontend devcontainer support by showing names and displaying apps as appropriate. With this change, the frontend now has knowledge of the subagent and we can also display things like port forwards. The frontend was updated to show dev container labels on the border as well as subagent connection status. The recreation flow was also adjusted a bit to show placeholder app icons when relevant. Support for apps was also added, although these are still WIP on the backend. And the port forwarding utility was added in since the sub agents now provide the necessary info. Fixes coder/internal#666
This commit is contained in:
committed by
GitHub
parent
cda9208580
commit
97474bb28b
69
coderd/apidoc/docs.go
generated
69
coderd/apidoc/docs.go
generated
@ -17501,18 +17501,6 @@ const docTemplate = `{
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"devcontainer_dirty": {
|
||||
"description": "DevcontainerDirty is true if the devcontainer configuration has changed\nsince the container was created. This is used to determine if the\ncontainer needs to be rebuilt.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"devcontainer_status": {
|
||||
"description": "DevcontainerStatus is the status of the devcontainer, if this\ncontainer is a devcontainer. This is used to determine if the\ndevcontainer is running, stopped, starting, or in an error state.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAgentDevcontainerStatus"
|
||||
}
|
||||
]
|
||||
},
|
||||
"id": {
|
||||
"description": "ID is the unique identifier of the container.",
|
||||
"type": "string"
|
||||
@ -17577,6 +17565,56 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.WorkspaceAgentDevcontainer": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"agent": {
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAgentDevcontainerAgent"
|
||||
},
|
||||
"config_path": {
|
||||
"type": "string"
|
||||
},
|
||||
"container": {
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAgentContainer"
|
||||
},
|
||||
"dirty": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"description": "Additional runtime fields.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAgentDevcontainerStatus"
|
||||
}
|
||||
]
|
||||
},
|
||||
"workspace_folder": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.WorkspaceAgentDevcontainerAgent": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"directory": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.WorkspaceAgentDevcontainerStatus": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@ -17642,6 +17680,13 @@ const docTemplate = `{
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAgentContainer"
|
||||
}
|
||||
},
|
||||
"devcontainers": {
|
||||
"description": "Devcontainers is a list of devcontainers visible to the workspace agent.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAgentDevcontainer"
|
||||
}
|
||||
},
|
||||
"warnings": {
|
||||
"description": "Warnings is a list of warnings that may have occurred during the\nprocess of listing containers. This should not include fatal errors.",
|
||||
"type": "array",
|
||||
|
Reference in New Issue
Block a user