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

Commit2b22ee2

Browse files
committed
adjust refetch trigger
1 parentf150bad commit2b22ee2

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

‎site/src/modules/resources/AgentDevcontainerCard.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ export const AgentDevcontainerCard: FC<AgentDevcontainerCardProps> = ({
152152
});
153153

154154
// Re-fetch containers when the subAgent changes to ensure data is
155-
// in sync.
155+
// in sync. This relies on agent updates being pushed to the client
156+
// to trigger the re-fetch. That is why we match on name here
157+
// instead of ID as we need to fetch to get an up-to-date ID.
156158
constlatestSubAgentByName=subAgents.find(
157159
(agent)=>agent.name===devcontainer.name,
158160
);
@@ -163,7 +165,12 @@ export const AgentDevcontainerCard: FC<AgentDevcontainerCardProps> = ({
163165
queryClient.invalidateQueries({
164166
queryKey:["agents",parentAgent.id,"containers"],
165167
});
166-
},[latestSubAgentByName,queryClient,parentAgent.id]);
168+
},[
169+
latestSubAgentByName?.id,
170+
latestSubAgentByName?.status,
171+
queryClient,
172+
parentAgent.id,
173+
]);
167174

168175
constshowDevcontainerControls=subAgent&&devcontainer.container;
169176
constshowSubAgentApps=

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp