The code changes in `aigc.go` and `types.go` refactor the AI connector handling in the `DSL` struct. The `Connector` field now accepts an optional `moapi` prefix, allowing for the selection of Moapi models. If the `Connector` field starts with `moapi`, the code initializes a new Moapi instance with the specified model. Additionally, the `Connector` field is now marked as `omitempty` in the `types.go` file.
This update improves the flexibility of the AI connector configuration and enables the use of Moapi models in the AI system.
The Namespace function in utils.go has been updated to handle special characters in the name parameter. This ensures that the generated namespace is valid and avoids any potential issues with naming conflicts. The function now replaces forward slashes, square brackets, and hyphens with underscores before generating the namespace. This change improves the reliability and robustness of the code.
Deprecate the usage of $slot and $prop in the code and introduce $slots and $props as their replacements. This change ensures consistency and improves clarity in the codebase.
Clear the modules before loading the shared library to ensure a clean state. This is necessary to avoid any conflicts or issues with previously loaded modules.
Add the SelectModel command to the DSL, allowing the selection of a specific model. This command takes a model name as input and sets the AI to use that model. It returns a success message with a status code of 200 if the selection is successful.
Add the hideLabel option to the component and column DSLs. This allows hiding the label for the respective widgets. The hideLabel option is set to true in the component and column DSLs when necessary.
Set the full configuration by default for the list widget. This is a temporary solution and will be removed in the future. The full configuration should be set when the list is created.