mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-06-23 02:16:08 +00:00
Disable all uses of pingTelemetry properly (#142)
This commit is contained in:
parent
611aa9fb82
commit
20769b071d
@ -8,6 +8,10 @@ export function disableTelemetry() {
|
|||||||
|
|
||||||
// We do this to work around CORS insanity.
|
// We do this to work around CORS insanity.
|
||||||
export async function pingTelemetry(event: string, data: any) {
|
export async function pingTelemetry(event: string, data: any) {
|
||||||
|
if (gDisableTelemetry) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const requestBody: any = {
|
const requestBody: any = {
|
||||||
event: 'NutChat.' + event,
|
event: 'NutChat.' + event,
|
||||||
data,
|
data,
|
||||||
@ -32,10 +36,6 @@ export class ChatMessageTelemetry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _ping(event: string, data: any = {}) {
|
private _ping(event: string, data: any = {}) {
|
||||||
if (gDisableTelemetry) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
pingTelemetry(event, {
|
pingTelemetry(event, {
|
||||||
...data,
|
...data,
|
||||||
messageId: this.id,
|
messageId: this.id,
|
||||||
|
Loading…
Reference in New Issue
Block a user