Remove hard coded max_items in history API
diff --git a/web/scripts/api.js b/web/scripts/api.js
index de56b23108..9aa7528af0 100644
--- a/web/scripts/api.js
+++ b/web/scripts/api.js
@@ -254,9 +254,9 @@ class ComfyApi extends EventTarget {
 	 * Gets the prompt execution history
 	 * @returns Prompt history including node outputs
 	 */
-	async getHistory() {
+	async getHistory(max_items=200) {
 		try {
-			const res = await this.fetchApi("/history?max_items=200");
+			const res = await this.fetchApi(`/history?max_items=${max_items}`);
 			return { History: Object.values(await res.json()) };
 		} catch (error) {
 			console.error(error);
