@@ -169,9 +169,11 @@ public function loadExtension(array $config, ContainerConfigurator $container, C
169169 $ this ->processMultiAgentConfig ($ multiAgentName , $ multiAgent , $ builder );
170170 }
171171
172+ $ setupStoresOptions = [];
172173 foreach ($ config ['store ' ] ?? [] as $ type => $ store ) {
173- $ this ->processStoreConfig ($ type , $ store , $ builder );
174+ $ this ->processStoreConfig ($ type , $ store , $ builder, $ setupStoresOptions );
174175 }
176+ $ builder ->getDefinition ('ai.command.setup_store ' )->setArgument (1 , $ setupStoresOptions );
175177
176178 $ stores = array_keys ($ builder ->findTaggedServiceIds ('ai.store ' ));
177179
@@ -898,8 +900,9 @@ private function processAgentConfig(string $name, array $config, ContainerBuilde
898900
899901 /**
900902 * @param array<string, mixed> $stores
903+ * @param array<string, mixed> $setupStoresOptions
901904 */
902- private function processStoreConfig (string $ type , array $ stores , ContainerBuilder $ container ): void
905+ private function processStoreConfig (string $ type , array $ stores , ContainerBuilder $ container, & $ setupStoresOptions ): void
903906 {
904907 if ('azure_search ' === $ type ) {
905908 foreach ($ stores as $ name => $ store ) {
@@ -1093,6 +1096,8 @@ private function processStoreConfig(string $type, array $stores, ContainerBuilde
10931096 $ container ->setDefinition ($ serviceId , $ definition );
10941097 $ container ->registerAliasForArgument ($ serviceId , StoreInterface::class, $ name );
10951098 $ container ->registerAliasForArgument ($ serviceId , StoreInterface::class, $ type .'_ ' .$ name );
1099+
1100+ $ setupStoresOptions [$ serviceId ] = $ store ['setup_options ' ] ?? [];
10961101 }
10971102 }
10981103
0 commit comments