Improved ShallowCopy of AIRequestModel and substructures

This commit is contained in:
Manas Hejmadi
2025-06-15 23:44:59 +05:30
parent ab2a9d5ca7
commit 4209569aa5

View File

@@ -168,8 +168,8 @@ class CollectionStateNotifier
requestTabIndex: 0,
responseStatus: null,
message: null,
httpRequestModel: currentModel.httpRequestModel?.copyWith(),
aiRequestModel: currentModel.aiRequestModel?.copyWith(),
httpRequestModel: currentModel.httpRequestModel,
aiRequestModel: currentModel.aiRequestModel?.clone(),
httpResponseModel: null,
isWorking: false,
sendingTime: null,
@@ -197,7 +197,7 @@ class CollectionStateNotifier
apiType: aT,
id: newId,
name: "${currentModel.metaData.name} (history)",
aiRequestModel: currentModel.aiRequestModel,
aiRequestModel: currentModel.aiRequestModel?.clone(),
httpRequestModel: currentModel.httpRequestModel ?? HttpRequestModel(),
responseStatus: currentModel.metaData.responseStatus,
message: kResponseCodeReasons[currentModel.metaData.responseStatus],