mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-25 17:24:07 +00:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user