- Notifications
You must be signed in to change notification settings - Fork911
feat(agent/agentcontainers): support apps for dev container agents#18346
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
d06023f
to08f0f9c
Compare08f0f9c
to6270098
CompareThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull Request Overview
This PR adds support for propagating user-defined apps (SubAgentApp
) through the devcontainer workflow and into the agent API.
- Introduces
SubAgentApp
and health-check definitions insubagent.go
and includes them in create requests. - Extends
FakeAgentAPI
to record and retrieve apps for end-to-end testing. - Updates the devcontainer CLI interface to accept environment variables and injects user/workspace context in
API.injectSubAgentIntoContainerLocked
.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
agent/agenttest/client.go | AddsGetSubAgentApps and backing store in fake API |
agent/agentcontainers/subagent.go | DefinesSubAgentApp , maps to proto request, includes in Create |
agent/agentcontainers/subagent_test.go | Tests conversion ofSubAgentApp to proto in Create |
agent/agentcontainers/devcontainercli.go | ExtendsReadConfig signature to accept env vars |
agent/agentcontainers/devcontainercli_test.go | AdjustsReadConfig calls in tests |
agent/agentcontainers/api.go | Injects apps and user/workspace name into sub-agent create |
agent/agentcontainers/acmock/acmock.go | Updates mock signature forReadConfig |
Comments suppressed due to low confidence (2)
agent/agentcontainers/api.go:164
- The comment for
WithUserName
incorrectly states it sets the workspace name; it should say it sets the user name.
// WithUserName sets the workspace name for the sub-agent.
agent/agentcontainers/subagent.go:27
- [nitpick] This exported type lacks a doc comment. Consider adding a comment above
SubAgentApp
explaining its purpose and fields.
type SubAgentApp struct {
Uh oh!
There was an error while loading.Please reload this page.
fc5d9b9
tobacab01
Compare
Uh oh!
There was an error while loading.Please reload this page.
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_AGENT_NAME
CODER_USER_NAME
CODER_WORKSPACE_NAME
CODER_DEPLOYMENT_URL