feat(cli): add coder open vscode (#11191)

Fixes #7667
This commit is contained in:
Mathias Fredriksson
2024-01-02 20:46:18 +02:00
committed by GitHub
parent 099be249a7
commit df3c310379
26 changed files with 1123 additions and 292 deletions

View File

@ -136,8 +136,10 @@ func (a *ManifestAPI) GetManifest(ctx context.Context, _ *agentproto.GetManifest
return &agentproto.Manifest{
AgentId: workspaceAgent.ID[:],
AgentName: workspaceAgent.Name,
OwnerUsername: owner.Username,
WorkspaceId: workspace.ID[:],
WorkspaceName: workspace.Name,
GitAuthConfigs: gitAuthConfigs,
EnvironmentVariables: apiAgent.EnvironmentVariables,
Directory: apiAgent.Directory,

6
coderd/apidoc/docs.go generated
View File

@ -7276,6 +7276,9 @@ const docTemplate = `{
"agent_id": {
"type": "string"
},
"agent_name": {
"type": "string"
},
"apps": {
"type": "array",
"items": {
@ -7328,6 +7331,9 @@ const docTemplate = `{
},
"workspace_id": {
"type": "string"
},
"workspace_name": {
"type": "string"
}
}
},

View File

@ -6416,6 +6416,9 @@
"agent_id": {
"type": "string"
},
"agent_name": {
"type": "string"
},
"apps": {
"type": "array",
"items": {
@ -6468,6 +6471,9 @@
},
"workspace_id": {
"type": "string"
},
"workspace_name": {
"type": "string"
}
}
},

View File

@ -212,8 +212,10 @@ func (api *API) workspaceAgentManifest(rw http.ResponseWriter, r *http.Request)
httpapi.Write(ctx, rw, http.StatusOK, agentsdk.Manifest{
AgentID: agentID,
AgentName: manifest.AgentName,
OwnerName: manifest.OwnerUsername,
WorkspaceID: workspaceID,
WorkspaceName: manifest.WorkspaceName,
Apps: apps,
Scripts: scripts,
DERPMap: tailnet.DERPMapFromProto(manifest.DerpMap),