Skip to content

Commit 9340b7d

Browse files
committed
remove unused icon code
1 parent 579ad4e commit 9340b7d

File tree

1 file changed

+15
-26
lines changed

1 file changed

+15
-26
lines changed

src/workspacesProvider.ts

+15-26
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Api } from "coder/site/src/api/api"
2-
import { Workspace, WorkspaceAgent } from "coder/site/src/api/typesGenerated"
2+
import { Workspace, WorkspaceAgent, WorkspaceApp } from "coder/site/src/api/typesGenerated"
33
import { EventSource } from "eventsource"
44
import * as path from "path"
55
import * as vscode from "vscode"
@@ -156,29 +156,20 @@ export class WorkspaceProvider implements vscode.TreeDataProvider<vscode.TreeIte
156156
)
157157

158158
// Get app status from the workspace agents
159-
try {
160-
const agents = extractAgents(workspace)
161-
agents.forEach((agent) => {
162-
// Check if agent has apps property with status reporting
163-
if (agent.apps && Array.isArray(agent.apps)) {
164-
workspaceTreeItem.appStatus = agent.apps.map((app) => ({
165-
name: app.display_name || app.name || "App",
166-
status: app.status || "Running",
167-
icon: app.icon || "$(pulse)",
168-
url: app.url,
169-
agent_id: agent.id,
170-
agent_name: agent.name,
171-
command: app.command,
172-
workspace_name: workspace.name,
173-
}))
174-
}
175-
})
176-
} catch (error) {
177-
// Log the error but continue - we don't want to fail the whole tree if app status fails
178-
this.storage.writeToCoderOutputChannel(
179-
`Failed to get app status for workspace ${workspace.name}: ${errToStr(error, "unknown error")}`,
180-
)
181-
}
159+
const agents = extractAgents(workspace)
160+
agents.forEach((agent) => {
161+
// Check if agent has apps property with status reporting
162+
if (agent.apps && Array.isArray(agent.apps)) {
163+
workspaceTreeItem.appStatus = agent.apps.map((app: WorkspaceApp) => ({
164+
name: app.display_name,
165+
url: app.url,
166+
agent_id: agent.id,
167+
agent_name: agent.name,
168+
command: app.command,
169+
workspace_name: workspace.name,
170+
}))
171+
}
172+
})
182173

183174
return workspaceTreeItem
184175
}),
@@ -459,8 +450,6 @@ class AgentTreeItem extends OpenableTreeItem {
459450
export class WorkspaceTreeItem extends OpenableTreeItem {
460451
public appStatus: {
461452
name: string
462-
status: string
463-
icon?: string
464453
url?: string
465454
agent_id?: string
466455
agent_name?: string

0 commit comments

Comments
 (0)