@@ -1010,9 +1010,15 @@ func (api *API) injectSubAgentIntoContainerLocked(ctx context.Context, dc coders
1010
1010
// The preparation of the subagent is done, now we can create the
1011
1011
// subagent record in the database to receive the auth token.
1012
1012
createdAgent ,err := api .subAgentClient .Create (ctx ,SubAgent {
1013
- Name :dc .Name ,
1014
- Directory :"/workspace" ,// TODO(mafredri): Use a more appropriate directory.
1015
- OperatingSystem :"linux" ,// Assuming Linux for dev containers.
1013
+ Name :dc .Name ,
1014
+ // The default workspaceFolder for devcontainers is /workspaces.
1015
+ // However, it can be changed by setting {"workspaceFolder": "/src"}
1016
+ // in the devcontainer.json. This information is not encoded into
1017
+ // the container labels, so we must rely on the values parsed from
1018
+ // the devcontainer.json file on disk.
1019
+ // TODO(mafredri): Support custom workspace folders in the future.
1020
+ Directory :DevcontainerDefaultContainerWorkspaceFolder ,
1021
+ OperatingSystem :"linux" ,// Assuming Linux for dev containers.
1016
1022
Architecture :arch ,
1017
1023
})
1018
1024
if err != nil {