@@ -168,6 +168,8 @@ export class WorkspaceProvider implements vscode.TreeDataProvider<vscode.TreeIte
168
168
url : app . url ,
169
169
agent_id : agent . id ,
170
170
agent_name : agent . name ,
171
+ command : app . command ,
172
+ workspace_name : workspace . name ,
171
173
} ) )
172
174
}
173
175
} )
@@ -253,21 +255,25 @@ export class WorkspaceProvider implements vscode.TreeDataProvider<vscode.TreeIte
253
255
254
256
// Add app status section with collapsible header
255
257
if ( element . agent . apps && element . agent . apps . length > 0 ) {
256
- let needsAttention = [ ]
258
+ const needsAttention = [ ]
257
259
for ( const app of element . agent . apps ) {
258
260
if ( app . statuses && app . statuses . length > 0 ) {
259
261
for ( const status of app . statuses ) {
260
262
if ( status . needs_user_attention ) {
261
- needsAttention . push ( new AppStatusTreeItem ( status ) )
263
+ needsAttention . push (
264
+ new AppStatusTreeItem ( {
265
+ name : status . message ,
266
+ command : app . command ,
267
+ status : status . state ,
268
+ workspace_name : element . workspaceName ,
269
+ } ) ,
270
+ )
262
271
}
263
272
}
264
273
}
265
274
}
266
275
267
- const appStatusSection = new SectionTreeItem (
268
- "Applications in need of attention" ,
269
- needsAttention ,
270
- )
276
+ const appStatusSection = new SectionTreeItem ( "Applications in need of attention" , needsAttention )
271
277
items . push ( appStatusSection )
272
278
}
273
279
@@ -372,17 +378,15 @@ class AgentMetadataTreeItem extends vscode.TreeItem {
372
378
class AppStatusTreeItem extends vscode . TreeItem {
373
379
constructor (
374
380
public readonly app : {
375
- name ?: string
376
- display_name ?: string
381
+ name : string
377
382
status ?: string
378
- icon ?: string
379
383
url ?: string
380
- agent_id ?: string
381
- agent_name ?: string
384
+ command ?: string
385
+ workspace_name ?: string
382
386
} ,
383
387
) {
384
- super ( app . icon || "$(pulse)" , vscode . TreeItemCollapsibleState . None )
385
- this . description = app . status || "Running"
388
+ super ( app . name , vscode . TreeItemCollapsibleState . None )
389
+ this . description = app . status
386
390
this . contextValue = "coderAppStatus"
387
391
388
392
// Add command to handle clicking on the app
@@ -449,7 +453,16 @@ class AgentTreeItem extends OpenableTreeItem {
449
453
}
450
454
451
455
export class WorkspaceTreeItem extends OpenableTreeItem {
452
- public appStatus : { name : string ; status : string ; icon ?: string } [ ] = [ ]
456
+ public appStatus : {
457
+ name : string
458
+ status : string
459
+ icon ?: string
460
+ url ?: string
461
+ agent_id ?: string
462
+ agent_name ?: string
463
+ command ?: string
464
+ workspace_name ?: string
465
+ } [ ] = [ ]
453
466
454
467
constructor (
455
468
public readonly workspace : Workspace ,
0 commit comments