Fehler bei Prompt/Routine -> Conversation wird gelöscht, wenn sie bereits angefragt wurde
This commit is contained in:
@@ -535,17 +535,34 @@ namespace BeWo.ViewModel.View.AI
|
||||
|
||||
var vm = InsertConverstion(conv);
|
||||
|
||||
Action<Exception> error = (e) =>
|
||||
var created = false;
|
||||
|
||||
Action end_local = () =>
|
||||
{
|
||||
EndSending();
|
||||
ListVM.VMList.Remove(vm);
|
||||
ServiceFacade.EndManuelWaiting();
|
||||
};
|
||||
|
||||
Action<Exception> error = (e) =>
|
||||
{
|
||||
if (created)
|
||||
{
|
||||
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.DeleteAiConversation(vm.Oid),
|
||||
end_local);
|
||||
}
|
||||
else
|
||||
{
|
||||
end_local();
|
||||
}
|
||||
};
|
||||
|
||||
ServiceFacade.StartManuelWaiting();
|
||||
|
||||
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.CreateAiConversation(conv, ViewContext), cb =>
|
||||
{
|
||||
created = true;
|
||||
|
||||
vm.UpdateByDataContract(cb);
|
||||
|
||||
var msg = prompt.Prompt;
|
||||
@@ -598,17 +615,34 @@ namespace BeWo.ViewModel.View.AI
|
||||
|
||||
var vm = InsertConverstion(conv);
|
||||
|
||||
Action<Exception> error = (e) =>
|
||||
var created = false;
|
||||
|
||||
Action end_local = () =>
|
||||
{
|
||||
EndSending();
|
||||
ListVM.VMList.Remove(vm);
|
||||
ServiceFacade.EndManuelWaiting();
|
||||
};
|
||||
|
||||
Action<Exception> error = (e) =>
|
||||
{
|
||||
if (created)
|
||||
{
|
||||
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.DeleteAiConversation(vm.Oid),
|
||||
end_local);
|
||||
}
|
||||
else
|
||||
{
|
||||
end_local();
|
||||
}
|
||||
};
|
||||
|
||||
ServiceFacade.StartManuelWaiting();
|
||||
|
||||
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.CreateAiConversation(conv, ViewContext), cb =>
|
||||
{
|
||||
created = true;
|
||||
|
||||
vm.UpdateByDataContract(cb);
|
||||
ExecuteChain(routine, 0, error);
|
||||
}, error);
|
||||
|
||||
Reference in New Issue
Block a user