Skip to content

Commit b4ffffc

Browse files
chore: sync microsoft-foundry (140ffce979e0) (#609)
Co-authored-by: qinezh <15644078+qinezh@users.noreply.github.com>
1 parent 95f2d6b commit b4ffffc

3 files changed

Lines changed: 107 additions & 94 deletions

File tree

‎microsoft-foundry/extensions/microsoft-foundry/extension.mjs‎

Lines changed: 92 additions & 92 deletions
Large diffs are not rendered by default.

‎microsoft-foundry/extensions/microsoft-foundry/public/app.js‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,10 +2041,22 @@ async function init() {
20412041
// conservative create-first defaults.
20422042
if (projectInitResult.status === "fulfilled") {
20432043
const pi = projectInitResult.value;
2044-
if (pi && pi.ok) applyInitDefaults(pi);
2044+
if (pi && pi.ok) {
2045+
applyInitDefaults(pi);
2046+
if (Array.isArray(pi.agents)) {
2047+
state.hostedAgents.items = pi.agents;
2048+
state.hostedAgents.selected = pi.selected || "";
2049+
state.hostedAgents.status = "ready";
2050+
}
2051+
}
20452052
}
20462053
render();
20472054

2055+
// Project init normally supplies the agent list from the workspace scan it
2056+
// already performed. If it did not, start the fallback fetch immediately
2057+
// instead of waiting for identity and region initialization.
2058+
const hostedAgentsPromise = loadHostedAgents();
2059+
20482060
// Check the marketplace for a newer plugin build. Non-blocking: the bar
20492061
// appears once the check answers, and stays hidden when it fails.
20502062
loadPluginUpdate();
@@ -2069,7 +2081,7 @@ async function init() {
20692081
/* fail open — leave Deploy enabled */
20702082
}
20712083

2072-
await loadHostedAgents();
2084+
await hostedAgentsPromise;
20732085
await loadHostedAgentDeployment();
20742086

20752087
// Subscribe to server-sent canvas updates (agent-driven idea / workspace /
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)