Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit18e1593

Browse files
committed
ui-final?
1 parent2c2bf28 commit18e1593

File tree

5 files changed

+133
-336
lines changed

5 files changed

+133
-336
lines changed

‎agent/agentcontainers/api.go‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -661,13 +661,17 @@ func (api *API) getContainers() (codersdk.WorkspaceAgentListContainersResponse,
661661
iflen(api.knownDevcontainers)>0 {
662662
devcontainers=make([]codersdk.WorkspaceAgentDevcontainer,0,len(api.knownDevcontainers))
663663
for_,dc:=rangeapi.knownDevcontainers {
664-
// Include the agent if it's been created (we're iterating
665-
// over copies, so mutating is fine).
666-
ifagent:=api.injectedSubAgentProcs[dc.WorkspaceFolder].agent;agent.ID!=uuid.Nil {
664+
// Include the agent if it's been created (we're iterating over
665+
// copies, so mutating is fine).
666+
//
667+
// NOTE(mafredri): We could filter on "proc.containerID == dc.Container.ID"
668+
// here but not doing so allows us to do some tricks in the UI to
669+
// make the experience more responsive for now.
670+
ifproc:=api.injectedSubAgentProcs[dc.WorkspaceFolder];proc.agent.ID!=uuid.Nil {
667671
dc.Agent=&codersdk.WorkspaceAgentDevcontainerAgent{
668-
ID:agent.ID,
669-
Name:agent.Name,
670-
Directory:agent.Directory,
672+
ID:proc.agent.ID,
673+
Name:proc.agent.Name,
674+
Directory:proc.agent.Directory,
671675
}
672676
}
673677

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp