mirror of
https://github.com/voideditor/void
synced 2026-05-23 09:28:23 +00:00
Merge pull request #142 from plon-Susk7/dev
pass build information to extension
This commit is contained in:
commit
250b90634f
2 changed files with 20 additions and 2 deletions
|
|
@ -12,6 +12,7 @@ import { CtrlKWebviewProvider } from './providers/CtrlKWebviewProvider';
|
|||
import { AutocompleteProvider } from './AutcompleteProvider';
|
||||
import { runTreeSitter } from '../common/LangaugeServer/createJsProgramGraph';
|
||||
|
||||
|
||||
// // this comes from vscode.proposed.editorInsets.d.ts
|
||||
// declare module 'vscode' {
|
||||
// export interface WebviewEditorInset {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,29 @@
|
|||
import posthog from 'posthog-js'
|
||||
|
||||
|
||||
|
||||
|
||||
const buildEnv = 'development';
|
||||
const buildNumber = '1.0.0';
|
||||
const isMac = process.platform === 'darwin';
|
||||
// TODO use commandKey
|
||||
const commandKey = isMac ? '⌘' : 'Ctrl';
|
||||
const systemInfo = {
|
||||
buildEnv,
|
||||
buildNumber,
|
||||
isMac,
|
||||
}
|
||||
|
||||
|
||||
export const identifyUser = (id: string) => {
|
||||
posthog.identify(id)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export const captureEvent = (eventId: string, properties: object) => {
|
||||
posthog.capture(eventId, properties)
|
||||
posthog.capture(eventId, { ...properties, systemInfo })
|
||||
}
|
||||
|
||||
export const initPosthog = () => {
|
||||
|
|
@ -17,4 +34,4 @@ export const initPosthog = () => {
|
|||
person_profiles: 'identified_only' // we only track events from identified users. We identify them in Sidebar
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue