mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-08-02 23:14:49 +08:00
Add a /history/{prompt_id} endpoint.
This commit is contained in:
@@ -728,9 +728,14 @@ class PromptQueue:
|
||||
return True
|
||||
return False
|
||||
|
||||
def get_history(self):
|
||||
def get_history(self, prompt_id=None):
|
||||
with self.mutex:
|
||||
return copy.deepcopy(self.history)
|
||||
if prompt_id is None:
|
||||
return copy.deepcopy(self.history)
|
||||
elif prompt_id in self.history:
|
||||
return {prompt_id: copy.deepcopy(self.history[prompt_id])}
|
||||
else:
|
||||
return {}
|
||||
|
||||
def wipe_history(self):
|
||||
with self.mutex:
|
||||
|
Reference in New Issue
Block a user