@@ -40,22 +40,23 @@ import (
40
40
41
41
func (r * RootCmd ) workspaceAgent () * serpent.Command {
42
42
var (
43
- auth string
44
- logDir string
45
- scriptDataDir string
46
- pprofAddress string
47
- noReap bool
48
- sshMaxTimeout time.Duration
49
- tailnetListenPort int64
50
- prometheusAddress string
51
- debugAddress string
52
- slogHumanPath string
53
- slogJSONPath string
54
- slogStackdriverPath string
55
- blockFileTransfer bool
56
- agentHeaderCommand string
57
- agentHeader []string
58
- devcontainers bool
43
+ auth string
44
+ logDir string
45
+ scriptDataDir string
46
+ pprofAddress string
47
+ noReap bool
48
+ sshMaxTimeout time.Duration
49
+ tailnetListenPort int64
50
+ prometheusAddress string
51
+ debugAddress string
52
+ slogHumanPath string
53
+ slogJSONPath string
54
+ slogStackdriverPath string
55
+ blockFileTransfer bool
56
+ agentHeaderCommand string
57
+ agentHeader []string
58
+ devcontainers bool
59
+ devcontainerProjectDiscovery bool
59
60
)
60
61
cmd := & serpent.Command {
61
62
Use : "agent" ,
@@ -364,6 +365,7 @@ func (r *RootCmd) workspaceAgent() *serpent.Command {
364
365
Devcontainers : devcontainers ,
365
366
DevcontainerAPIOptions : []agentcontainers.Option {
366
367
agentcontainers .WithSubAgentURL (r .agentURL .String ()),
368
+ agentcontainers .WithProjectDiscovery (devcontainerProjectDiscovery ),
367
369
},
368
370
})
369
371
@@ -510,6 +512,13 @@ func (r *RootCmd) workspaceAgent() *serpent.Command {
510
512
Description : "Allow the agent to automatically detect running devcontainers." ,
511
513
Value : serpent .BoolOf (& devcontainers ),
512
514
},
515
+ {
516
+ Flag : "devcontainers-project-discovery-enable" ,
517
+ Default : "true" ,
518
+ Env : "CODER_AGENT_DEVCONTAINERS_PROJECT_DISCOVERY_ENABLE" ,
519
+ Description : "Allow the agent to search the filesystem for devcontainer projects." ,
520
+ Value : serpent .BoolOf (& devcontainerProjectDiscovery ),
521
+ },
513
522
}
514
523
515
524
return cmd
0 commit comments