mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Add appName to TelemetryProperties (#4111)
This commit is contained in:
parent
3139971f4a
commit
170fde848a
5 changed files with 9 additions and 1 deletions
|
|
@ -181,6 +181,7 @@ describe("RooCodeTelemetryClient", () => {
|
|||
const client = new RooCodeTelemetryClient(mockAuthService)
|
||||
|
||||
const providerProperties = {
|
||||
appName: "roo-code",
|
||||
appVersion: "1.0.0",
|
||||
vscodeVersion: "1.60.0",
|
||||
platform: "darwin",
|
||||
|
|
|
|||
|
|
@ -181,6 +181,7 @@ describe("TelemetryClient", () => {
|
|||
const client = new TelemetryClient(mockAuthService)
|
||||
|
||||
const providerProperties = {
|
||||
appName: "roo-code",
|
||||
appVersion: "1.0.0",
|
||||
vscodeVersion: "1.60.0",
|
||||
platform: "darwin",
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ export enum TelemetryEventName {
|
|||
*/
|
||||
|
||||
export const appPropertiesSchema = z.object({
|
||||
appName: z.string(),
|
||||
appVersion: z.string(),
|
||||
vscodeVersion: z.string(),
|
||||
platform: z.string(),
|
||||
|
|
|
|||
|
|
@ -1633,8 +1633,11 @@ export class ClineProvider
|
|||
const { mode, apiConfiguration, language } = await this.getState()
|
||||
const task = this.getCurrentCline()
|
||||
|
||||
const packageJSON = this.context.extension?.packageJSON
|
||||
|
||||
return {
|
||||
appVersion: this.context.extension?.packageJSON?.version,
|
||||
appName: packageJSON?.name ?? Package.name,
|
||||
appVersion: packageJSON?.version ?? Package.version,
|
||||
vscodeVersion: vscode.version,
|
||||
platform: process.platform,
|
||||
editorName: vscode.env.appName,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import posthog from "posthog-js"
|
||||
|
||||
import { TelemetrySetting } from "@roo/TelemetrySetting"
|
||||
|
||||
class TelemetryClient {
|
||||
|
|
@ -28,6 +29,7 @@ class TelemetryClient {
|
|||
if (!TelemetryClient.instance) {
|
||||
TelemetryClient.instance = new TelemetryClient()
|
||||
}
|
||||
|
||||
return TelemetryClient.instance
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue