feat(agent/agentcontainers): support apps for dev container agents (#18346)

Add apps to the sub agent based on the dev container customization.

The implementation also provides the following env variables for use in
the devcontainer json

- `CODER_WORKSPACE_AGENT_NAME`
- `CODER_WORKSPACE_USER_NAME`
- `CODER_WORKSPACE_NAME`
- `CODER_DEPLOYMENT_URL`
This commit is contained in:
Danielle Maywood
2025-06-18 14:55:27 +01:00
committed by GitHub
parent 5e3a225e3b
commit 529fb5083c
9 changed files with 526 additions and 20 deletions
@@ -316,7 +316,7 @@ func TestDevcontainerCLI_ArgsAndParsing(t *testing.T) {
}
dccli := agentcontainers.NewDevcontainerCLI(logger, testExecer)
config, err := dccli.ReadConfig(ctx, tt.workspaceFolder, tt.configPath, tt.opts...)
config, err := dccli.ReadConfig(ctx, tt.workspaceFolder, tt.configPath, []string{}, tt.opts...)
if tt.wantError {
assert.Error(t, err, "want error")
assert.Equal(t, agentcontainers.DevcontainerConfig{}, config, "expected empty config on error")