Closed singhk97 closed 7 months ago
Should add configureTaskModule
and configureAdaptiveCards
, to configure these options
The idea is that an options class should only have knobs and not major components of the library.
@singhk97 Not sure I understand this. The builder is setting up the app which is making use of the entire library. We want knobs in the sense that a lot of these features will exist regardless of user setup -- we don't want to NOT enable Adaptive Cards just because they didn't provide the explicit call to set it up.
The
Application
class is big, and connects multiple big components, like the Turn state, AI module, the Activity handlers, and Storage. There are many different configurations you can use to create this class. Right now, to create such an instance you simply populate a singleApplicationOptions
object and pass it to the class. This lacks the necessary readability to understand the different components that are being registered to the application object.The
ApplicationBuilder
class provides a clear public interface to simplify the creation of anApplication
instance, allowing end users to build the application step by step. This improves readability and makes the configuration process less overwhelming.before:
after:
Here's the
ApplicationBuilder
public interface for the JS SDK:The following Adjunct Changes in this drop down is not going to implement anymore. Since this will create big disparity with Python SDK, which won't be implementing the builder pattern
Adjunct Changes
- Refactored `ApplicationOptions` class to only include configurations and moved the major components to the `Application` class constructor. The idea is that an options class should only have knobs and not major components of the library. ```ts /** * Options for the Application class. * @template TState Type of the turn state. */ export interface ApplicationOptions