Replaces the previous placeholder for default LLM selection with a working default AI model selector in settings. Updates SettingsModel and related providers to support storing and updating the default AI model as a JSON object. Integrates the selector UI and ensures new AI requests use the default model if set.
Refactored collection state management to handle API type changes and AI request models. Updated widgets and tests to support nullable HTTP methods and AI request models, and improved response body rendering for AI responses.
Removed redundant AuthModel parameter from sendHttpRequest and streamHttpRequest functions, now using authModel from HttpRequestModel directly. Updated all usages, tests, and related logic to reflect this change. Improved streaming response handling in CollectionStateNotifier and HttpResponseModel.
Renamed respModel and historyM to httpResponseModel and historyModel for improved code readability and consistency within the CollectionStateNotifier class.
Improved readability by expanding null checks with braces in CollectionStateNotifier methods. Also added a non-null assertion for historyM when adding a history request.
- Introduced APIAuthType enum for various authentication methods.
- Created APIAuthModel with basic authentication fields.
- Updated RequestModel to include authType and authData.
- Implemented EditAuthType widget for selecting and managing authentication.
- Enhanced CollectionStateNotifier to handle authentication updates.
:wq
- Changed return type of handlePreRequestScript and handlePostResponseScript to Future<RequestModel> for better type safety.
- Updated the logic to return the modified request model after executing scripts.
- Ensured that the request model is updated correctly in the sendRequest method after executing the pre-request script.