File tree Expand file tree Collapse file tree
microsoft-foundry/extensions/microsoft-foundry Expand file tree Collapse file tree Load diff Large diffs are not rendered by default.
Original file line number Diff line number Diff 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 /
You can’t perform that action at this time.
0 commit comments