Skip to content

Commit 689e565

Browse files
committed
avoid resetting agent since its often kept
1 parent 9a00b7c commit 689e565

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)