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

Function convertDisplayApps

coderd/provisionerdserver/provisionerdserver.go:3368–3391  ·  view source on GitHub ↗
(apps *sdkproto.DisplayApps)

Source from the content-addressed store, hash-verified

3366}
3367
3368func convertDisplayApps(apps *sdkproto.DisplayApps) []database.DisplayApp {
3369 // This shouldn't happen but let's avoid panicking. It also makes
3370 // writing tests a bit easier.
3371 if apps == nil {
3372 return nil
3373 }
3374 dapps := make([]database.DisplayApp, 0, 5)
3375 if apps.Vscode {
3376 dapps = append(dapps, database.DisplayAppVscode)
3377 }
3378 if apps.VscodeInsiders {
3379 dapps = append(dapps, database.DisplayAppVscodeInsiders)
3380 }
3381 if apps.SshHelper {
3382 dapps = append(dapps, database.DisplayAppSSHHelper)
3383 }
3384 if apps.PortForwardingHelper {
3385 dapps = append(dapps, database.DisplayAppPortForwardingHelper)
3386 }
3387 if apps.WebTerminal {
3388 dapps = append(dapps, database.DisplayAppWebTerminal)
3389 }
3390 return dapps
3391}
3392
3393// insertDevcontainerSubagent creates a workspace agent for a devcontainer's
3394// subagent if one is defined. It returns the subagent ID (zero UUID if no

Callers 1

InsertWorkspaceResourceFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected