(apps *sdkproto.DisplayApps)
| 3366 | } |
| 3367 | |
| 3368 | func 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 |
no outgoing calls
no test coverage detected