Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(agent/agentcontainers): support agent name in customization#18451

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

Merged
DanielleMaywood merged 4 commits intomainfromdm-devcontainer-agent-name
Jun 19, 2025

Conversation

DanielleMaywood
Copy link
Contributor

@DanielleMaywoodDanielleMaywood commentedJun 19, 2025
edited
Loading

Relates tocoder/internal#732

This PR supports specifying a name that will be used for the devcontainer agent in the customizations section of the devcontainer.json configuration file.

A follow up PR will introduce a fallback that names agents based on the folder name before falling back to the container name.

This PR supports specifying a name that will be used for thedevcontainer agent in the customizations section of thedevcontainer.json configuration file.
Copy link
Contributor

@CopilotCopilotAI left a 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 specifying a custom agent name through the devcontainer.json configuration.

  • Adds a new Name field to CoderCustomization in devcontainercli.go.
  • Updates the API logic to use the agent name from the last customization layer.
  • Enhances tests in api_test.go to verify that only the last customization layer's name is applied.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

FileDescription
agent/agentcontainers/devcontainercli.goAdds a new Name field to the customization struct
agent/agentcontainers/api.goImplements logic to select the agent name from the last layer
agent/agentcontainers/api_test.goIntroduces tests validating the correct agent name behavior
Comments suppressed due to low confidence (1)

agent/agentcontainers/api_test.go:1765

  • The test 'NameIsOnlyUsedWhenInLastLayer' currently verifies that the sub-agent name does not equal "custom-name" but does not assert the expected fallback name. Consider asserting an explicit default value to clarify the intended behavior.
require.NotEqual(t, "custom-name", subAgent.Name)

Technically this doesn't really test anything new but it is good to havean explicit test for anyways.
@DanielleMaywoodDanielleMaywood marked this pull request as ready for reviewJune 19, 2025 11:23
Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think we need some input validation but approach seems good to me otherwise 👍🏻

We want to be able to pick customizations that are only specified in thetop-level customizations stanza. That is, we do not want to accidentallypick something specified in a feature (such as the agent name).This refactor picks the agent name from configuration instead of themerged configuration to ensure a feature cannot influence it.
Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Solid! 👍🏻

@DanielleMaywoodDanielleMaywood merged commita04268a intomainJun 19, 2025
34 checks passed
@DanielleMaywoodDanielleMaywood deleted the dm-devcontainer-agent-name branchJune 19, 2025 12:22
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJun 19, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mafredrimafredrimafredri approved these changes

Copilot code reviewCopilotCopilot left review comments

@johnstcnjohnstcnAwaiting requested review from johnstcn

Assignees

@DanielleMaywoodDanielleMaywood

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@DanielleMaywood@mafredri

[8]ページ先頭

©2009-2025 Movatter.jp