Skip to content

Commit 638402a

Browse files
committed
avoid resetting agent since its often kept
1 parent 109ad39 commit 638402a

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

agent/agentcontainers/api.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,9 +671,9 @@ func (api *API) getContainers() (codersdk.WorkspaceAgentListContainersResponse,
671671
if len(api.knownDevcontainers) > 0 {
672672
devcontainers = make([]codersdk.WorkspaceAgentDevcontainer, 0, len(api.knownDevcontainers))
673673
for _, dc := range api.knownDevcontainers {
674-
// Include the agent if it's been created (we're iterating over
674+
// Include the agent if it's running (we're iterating over
675675
// copies, so mutating is fine).
676-
if proc := api.injectedSubAgentProcs[dc.WorkspaceFolder]; proc.agent.ID != uuid.Nil && dc.Container != nil && proc.containerID == dc.Container.ID {
676+
if proc := api.injectedSubAgentProcs[dc.WorkspaceFolder]; proc.agent.ID != uuid.Nil {
677677
dc.Agent = &codersdk.WorkspaceAgentDevcontainerAgent{
678678
ID: proc.agent.ID,
679679
Name: proc.agent.Name,

site/src/modules/resources/AgentDevcontainerCard.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ export const AgentDevcontainerCard: FC<AgentDevcontainerCardProps> = ({
116116
if (dc.id === devcontainer.id) {
117117
return {
118118
...dc,
119-
agent: null,
120119
container: null,
121120
status: "starting",
122121
};

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy