Add support for extra system stats in error report (#684)

* Add support for extra system stats in error report

* Add toast on error
This commit is contained in:
Chenlei Hu
2024-08-29 21:29:33 -04:00
committed by GitHub
parent aaea05a37b
commit f42609c966
4 changed files with 39 additions and 4 deletions

View File

@@ -13,6 +13,7 @@ import {
User,
Settings
} from '@/types/apiTypes'
import axios from 'axios'
interface QueuePromptRequestBody {
client_id: string
@@ -46,6 +47,10 @@ class ComfyApi extends EventTarget {
this.initialClientId = sessionStorage.getItem('clientId')
}
internalURL(route: string): string {
return this.api_base + '/internal' + route
}
apiURL(route: string): string {
return this.api_base + '/api' + route
}
@@ -652,6 +657,10 @@ class ComfyApi extends EventTarget {
}
return resp.json()
}
async getLogs(): Promise<string> {
return (await axios.get(this.internalURL('/logs'))).data
}
}
export const api = new ComfyApi()