MCPcopy Index your code
hub / github.com/coder/coder / CloneConfig

Method CloneConfig

agent/agentcontainers/subagent.go:30–40  ·  view source on GitHub ↗

CloneConfig makes a copy of SubAgent using configuration from the devcontainer. The ID is inherited from dc.SubagentID if present, and the name is inherited from the devcontainer. AuthToken is not copied.

(dc codersdk.WorkspaceAgentDevcontainer)

Source from the content-addressed store, hash-verified

28// devcontainer. The ID is inherited from dc.SubagentID if present, and
29// the name is inherited from the devcontainer. AuthToken is not copied.
30func (s SubAgent) CloneConfig(dc codersdk.WorkspaceAgentDevcontainer) SubAgent {
31 return SubAgent{
32 ID: dc.SubagentID.UUID,
33 Name: dc.Name,
34 Directory: s.Directory,
35 Architecture: s.Architecture,
36 OperatingSystem: s.OperatingSystem,
37 DisplayApps: slices.Clone(s.DisplayApps),
38 Apps: slices.Clone(s.Apps),
39 }
40}
41
42func (s SubAgent) EqualConfig(other SubAgent) bool {
43 return s.Name == other.Name &&

Calls 1

CloneMethod · 0.45

Tested by 1

TestSubAgent_CloneConfigFunction · 0.76