mirror of
https://github.com/leon-ai/leon.git
synced 2025-01-08 10:47:45 +03:00
feat(server): support isGitpod
telemetry
This commit is contained in:
parent
094b1218e6
commit
075f4458a0
@ -118,3 +118,4 @@ export const LEON_FILE_PATH = path.join('leon.json')
|
||||
export const INSTANCE_ID = fs.existsSync(LEON_FILE_PATH)
|
||||
? JSON.parse(fs.readFileSync(LEON_FILE_PATH, 'utf8')).instanceID
|
||||
: null
|
||||
export const IS_GITPOD = process.env['GITPOD_WORKSPACE_URL'] !== undefined
|
||||
|
@ -14,6 +14,7 @@ import type {
|
||||
import {
|
||||
IS_TELEMETRY_ENABLED,
|
||||
INSTANCE_ID,
|
||||
IS_GITPOD,
|
||||
IS_DEVELOPMENT_ENV,
|
||||
IS_PRODUCTION_ENV,
|
||||
LANG,
|
||||
@ -48,7 +49,8 @@ export class Telemetry {
|
||||
|
||||
public static async postInstall(): Promise<PostIntallResponse> {
|
||||
const { data } = await this.axios.post('/on-post-install', {
|
||||
instanceID: this.instanceID
|
||||
instanceID: this.instanceID,
|
||||
isGitpod: IS_GITPOD
|
||||
})
|
||||
|
||||
return data
|
||||
@ -60,6 +62,7 @@ export class Telemetry {
|
||||
const platform = os.platform()
|
||||
const data = {
|
||||
isProduction: IS_PRODUCTION_ENV,
|
||||
isGitpod: IS_GITPOD,
|
||||
isOnline: true,
|
||||
language: LANG,
|
||||
sttProvider: STT_PROVIDER,
|
||||
|
Loading…
Reference in New Issue
Block a user