@@ -60,6 +60,11 @@ public partial class AgentViewModel : ObservableObject, IModelUpdateable<AgentVi
6060 private const string DefaultDashboardUrl = "https://coder.com" ;
6161 private const int MaxAppsPerRow = 6 ;
6262
63+ // These are fake UUIDs, for UI purposes only. Display apps don't exist on
64+ // the backend as real app resources and therefore don't have an ID.
65+ private static readonly Uuid VscodeAppUuid = new ( "819828b1-5213-4c3d-855e-1b74db6ddd19" ) ;
66+ private static readonly Uuid VscodeInsidersAppUuid = new ( "becf1e10-5101-4940-a853-59af86468069" ) ;
67+
6368 private readonly ILogger < AgentViewModel > _logger ;
6469 private readonly ICoderApiClientFactory _coderApiClientFactory ;
6570 private readonly ICredentialManager _credentialManager ;
@@ -274,6 +279,32 @@ private void ContinueFetchApps(Task<WorkspaceAgent> task)
274279 apps . Add ( _agentAppViewModelFactory . Create ( uuid , app . DisplayName , app . Url , iconUrl ) ) ;
275280 }
276281
282+ foreach ( var displayApp in workspaceAgent . DisplayApps )
283+ {
284+ if ( displayApp is not WorkspaceAgent . DisplayAppVscode and not WorkspaceAgent . DisplayAppVscodeInsiders )
285+ continue ;
286+
287+ var id = VscodeAppUuid ;
288+ var displayName = "VS Code" ;
289+ var icon = "/icon/code.svg" ;
290+ var scheme = "vscode" ;
291+ if ( displayApp is WorkspaceAgent . DisplayAppVscodeInsiders )
292+ {
293+ id = VscodeInsidersAppUuid ;
294+ displayName = "VS Code Insiders" ;
295+ icon = "/icon/code-insiders.svg" ;
296+ scheme = "vscode-insiders" ;
297+ }
298+
299+ var appUri = $ "{ scheme } ://vscode-remote/ssh-remote+{ FullHostname } /{ workspaceAgent . ExpandedDirectory } ";
300+
301+ // Icon parse failures are not fatal, we will just use the fallback
302+ // icon.
303+ _ = Uri . TryCreate ( DashboardBaseUrl , icon , out var iconUrl ) ;
304+
305+ apps . Add ( _agentAppViewModelFactory . Create ( id , displayName , appUri , iconUrl ) ) ;
306+ }
307+
277308 // Sort by name.
278309 ModelUpdate . ApplyLists ( Apps , apps , ( a , b ) => string . Compare ( a . Name , b . Name , StringComparison . Ordinal ) ) ;
279310 }
0 commit comments