feat: wipe current request data before making changes

This commit is contained in:
Udhay-Adithya
2025-09-26 02:14:05 +05:30
parent e1481e8d4e
commit bf11c73949
4 changed files with 17 additions and 6 deletions

View File

@@ -417,6 +417,10 @@ class ChatViewmodel extends StateNotifier<ChatState> {
body: body,
bodyContentType: bodyContentType,
formData: formData.isEmpty ? null : formData,
// Wipe existing parameters and authentication to ensure clean state
params: const [],
isParamEnabledList: const [],
authModel: null,
);
_appendSystem('Applied OpenAPI operation to the selected request.',
ChatMessageType.importOpenApi);
@@ -911,6 +915,10 @@ class ChatViewmodel extends StateNotifier<ChatState> {
body: body,
bodyContentType: bodyContentType,
formData: formData.isEmpty ? null : formData,
// Wipe existing parameters and authentication to ensure clean state
params: const [],
isParamEnabledList: const [],
authModel: null,
);
_appendSystem(
'Applied cURL to the selected request.', ChatMessageType.importCurl);