{"modulePath":"github.com/wavetermdev/waveterm","version":"v0.14.5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package telemetrydata\n\n## Variables\n\n```go\nvar ValidEventNames = map[string]bool{\n\t\"app:startup\":  true,\n\t\"app:shutdown\": true,\n\t\"app:activity\": true,\n\t\"app:display\":  true,\n\t\"app:counts\":   true,\n\n\t\"action:magnify\":     true,\n\t\"action:settabtheme\": true,\n\t\"action:runaicmd\":    true,\n\t\"action:createtab\":   true,\n\t\"action:createblock\": true,\n\t\"action:openwaveai\":  true,\n\t\"action:other\":       true,\n\t\"action:term\":        true,\n\t\"action:termdurable\": true,\n\t\"action:link\":        true,\n\n\t\"wsh:run\": true,\n\n\t\"debug:panic\": true,\n\n\t\"conn:connect\":      true,\n\t\"conn:connecterror\": true,\n\t\"conn:nowsh\":        true,\n\n\t\"waveai:enabletelemetry\": true,\n\t\"waveai:post\":            true,\n\t\"waveai:feedback\":        true,\n\t\"waveai:showdiff\":        true,\n\t\"waveai:revertfile\":      true,\n\n\t\"onboarding:start\":      true,\n\t\"onboarding:skip\":       true,\n\t\"onboarding:fire\":       true,\n\t\"onboarding:githubstar\": true,\n\n\t\"job:start\":     true,\n\t\"job:reconnect\": true,\n\t\"job:done\":      true,\n}\n```\n\n## Types\n\n```go\ntype TEvent struct {\n\tUuid    string      `json:\"uuid,omitempty\" db:\"uuid\"`\n\tTs      int64       `json:\"ts,omitempty\" db:\"ts\"`\n\tTsLocal string      `json:\"tslocal,omitempty\" db:\"tslocal\"` // iso8601 format (wall clock converted to PT)\n\tEvent   string      `json:\"event\" db:\"event\"`\n\tProps   TEventProps `json:\"props\" db:\"-\"` // Don't scan directly to map\n\n\t// DB fields\n\tUploaded bool `json:\"-\" db:\"uploaded\"`\n\n\t// For database scanning\n\tRawProps string `json:\"-\" db:\"props\"`\n}\n```\n\n```go\nfunc MakeTEvent(event string, props TEventProps) *TEvent\n```\n\n```go\nfunc MakeUntypedTEvent(event string, propsMap map[string]any) (*TEvent, error)\n```\n\n```go\nfunc (t *TEvent) ConvertRawJSON() error\n```\n\n```go\nfunc (t *TEvent) EnsureTimestamps()\n```\n\n```go\nfunc (t *TEvent) UserSetOnceProps() *TEventUserProps\n```\n\n```go\nfunc (t *TEvent) UserSetProps() *TEventUserProps\n```\n\n```go\nfunc (te *TEvent) Validate(current bool) error\n```\nvalidates a tevent that was just created (not for validating out of the DB, or an uploaded TEvent) checks that TS is pretty current (or unset)\n\n```go\ntype TEventProps struct {\n\tTEventUserProps `tstype:\"-\"` // generally don't need to set these since they will be automatically copied over\n\n\tActiveMinutes       int `json:\"activity:activeminutes,omitempty\"`\n\tFgMinutes           int `json:\"activity:fgminutes,omitempty\"`\n\tOpenMinutes         int `json:\"activity:openminutes,omitempty\"`\n\tWaveAIActiveMinutes int `json:\"activity:waveaiactiveminutes,omitempty\"`\n\tWaveAIFgMinutes     int `json:\"activity:waveaifgminutes,omitempty\"`\n\tTermCommandsRun     int `json:\"activity:termcommandsrun,omitempty\"`\n\tTermCommandsRemote  int `json:\"activity:termcommands:remote,omitempty\"`\n\tTermCommandsDurable int `json:\"activity:termcommands:durable,omitempty\"`\n\tTermCommandsWsl     int `json:\"activity:termcommands:wsl,omitempty\"`\n\n\tAppFirstDay    bool `json:\"app:firstday,omitempty\"`\n\tAppFirstLaunch bool `json:\"app:firstlaunch,omitempty\"`\n\n\tActionInitiator string `json:\"action:initiator,omitempty\" tstype:\"\\\"keyboard\\\" | \\\"mouse\\\"\"`\n\tActionType      string `json:\"action:type,omitempty\"`\n\n\tPanicType string `json:\"debug:panictype,omitempty\"`\n\n\tBlockView       string `json:\"block:view,omitempty\"`\n\tBlockController string `json:\"block:controller,omitempty\"`\n\n\tAiBackendType string `json:\"ai:backendtype,omitempty\"`\n\tAiLocal       bool   `json:\"ai:local,omitempty\"`\n\n\tWshCmd        string `json:\"wsh:cmd,omitempty\"`\n\tWshErrorCount int    `json:\"wsh:errorcount,omitempty\"`\n\tWshCount      int    `json:\"wsh:count,omitempty\"`\n\n\tConnType         string `json:\"conn:conntype,omitempty\"`\n\tConnWshErrorCode string `json:\"conn:wsherrorcode,omitempty\"`\n\tConnErrorCode    string `json:\"conn:errorcode,omitempty\"`\n\tConnSubErrorCode string `json:\"conn:suberrorcode,omitempty\"`\n\tConnContextError bool   `json:\"conn:contexterror,omitempty\"`\n\n\tOnboardingFeature    string `json:\"onboarding:feature,omitempty\" tstype:\"\\\"waveai\\\" | \\\"durable\\\" | \\\"magnify\\\" | \\\"wsh\\\"\"`\n\tOnboardingVersion    string `json:\"onboarding:version,omitempty\"`\n\tOnboardingGithubStar string `json:\"onboarding:githubstar,omitempty\" tstype:\"\\\"already\\\" | \\\"star\\\" | \\\"later\\\"\"`\n\tOnboardingPage       string `json:\"onboarding:page,omitempty\"`\n\n\tDisplayHeight int         `json:\"display:height,omitempty\"`\n\tDisplayWidth  int         `json:\"display:width,omitempty\"`\n\tDisplayDPR    float64     `json:\"display:dpr,omitempty\"`\n\tDisplayCount  int         `json:\"display:count,omitempty\"`\n\tDisplayAll    interface{} `json:\"display:all,omitempty\"`\n\n\tCountBlocks        int            `json:\"count:blocks,omitempty\"`\n\tCountTabs          int            `json:\"count:tabs,omitempty\"`\n\tCountWindows       int            `json:\"count:windows,omitempty\"`\n\tCountWorkspaces    int            `json:\"count:workspaces,omitempty\"`\n\tCountSSHConn       int            `json:\"count:sshconn,omitempty\"`\n\tCountWSLConn       int            `json:\"count:wslconn,omitempty\"`\n\tCountJobs          int            `json:\"count:jobs,omitempty\"`\n\tCountJobsConnected int            `json:\"count:jobsconnected,omitempty\"`\n\tCountViews         map[string]int `json:\"count:views,omitempty\"`\n\n\tWaveAIAPIType              string         `json:\"waveai:apitype,omitempty\"`\n\tWaveAIModel                string         `json:\"waveai:model,omitempty\"`\n\tWaveAIChatId               string         `json:\"waveai:chatid,omitempty\"`\n\tWaveAIStepNum              int            `json:\"waveai:stepnum,omitempty\"`\n\tWaveAIInputTokens          int            `json:\"waveai:inputtokens,omitempty\"`\n\tWaveAIOutputTokens         int            `json:\"waveai:outputtokens,omitempty\"`\n\tWaveAINativeWebSearchCount int            `json:\"waveai:nativewebsearchcount,omitempty\"`\n\tWaveAIRequestCount         int            `json:\"waveai:requestcount,omitempty\"`\n\tWaveAIToolUseCount         int            `json:\"waveai:toolusecount,omitempty\"`\n\tWaveAIToolUseErrorCount    int            `json:\"waveai:tooluseerrorcount,omitempty\"`\n\tWaveAIToolDetail           map[string]int `json:\"waveai:tooldetail,omitempty\"`\n\tWaveAIPremiumReq           int            `json:\"waveai:premiumreq,omitempty\"`\n\tWaveAIProxyReq             int            `json:\"waveai:proxyreq,omitempty\"`\n\tWaveAIHadError             bool           `json:\"waveai:haderror,omitempty\"`\n\tWaveAIImageCount           int            `json:\"waveai:imagecount,omitempty\"`\n\tWaveAIPDFCount             int            `json:\"waveai:pdfcount,omitempty\"`\n\tWaveAITextDocCount         int            `json:\"waveai:textdoccount,omitempty\"`\n\tWaveAITextLen              int            `json:\"waveai:textlen,omitempty\"`\n\tWaveAIFirstByteMs          int            `json:\"waveai:firstbytems,omitempty\"`  // ms\n\tWaveAIRequestDurMs         int            `json:\"waveai:requestdurms,omitempty\"` // ms\n\tWaveAIWidgetAccess         bool           `json:\"waveai:widgetaccess,omitempty\"`\n\tWaveAIThinkingLevel        string         `json:\"waveai:thinkinglevel,omitempty\"`\n\tWaveAIMode                 string         `json:\"waveai:mode,omitempty\"`\n\tWaveAIProvider             string         `json:\"waveai:provider,omitempty\"`\n\tWaveAIIsLocal              bool           `json:\"waveai:islocal,omitempty\"`\n\tWaveAIFeedback             string         `json:\"waveai:feedback,omitempty\" tstype:\"\\\"good\\\" | \\\"bad\\\"\"`\n\tWaveAIAction               string         `json:\"waveai:action,omitempty\"`\n\n\tJobDoneReason string `json:\"job:donereason,omitempty\"`\n\tJobKind       string `json:\"job:kind,omitempty\"`\n\n\tUserSet     *TEventUserProps `json:\"$set,omitempty\"`\n\tUserSetOnce *TEventUserProps `json:\"$set_once,omitempty\"`\n}\n```\n\n```go\ntype TEventUserProps struct {\n\tClientArch           string `json:\"client:arch,omitempty\"`\n\tClientVersion        string `json:\"client:version,omitempty\"`\n\tClientInitialVersion string `json:\"client:initial_version,omitempty\"`\n\tClientBuildTime      string `json:\"client:buildtime,omitempty\"`\n\tClientOSRelease      string `json:\"client:osrelease,omitempty\"`\n\tClientIsDev          bool   `json:\"client:isdev,omitempty\"`\n\tClientPackageType    string `json:\"client:packagetype,omitempty\"`\n\tClientMacOSVersion   string `json:\"client:macos,omitempty\"`\n\n\tCohortMonth   string `json:\"cohort:month,omitempty\"`\n\tCohortISOWeek string `json:\"cohort:isoweek,omitempty\"`\n\n\tAutoUpdateChannel string `json:\"autoupdate:channel,omitempty\"`\n\tAutoUpdateEnabled bool   `json:\"autoupdate:enabled,omitempty\"`\n\n\tLocalShellType    string `json:\"localshell:type,omitempty\"`\n\tLocalShellVersion string `json:\"localshell:version,omitempty\"`\n\n\tLocCountryCode string `json:\"loc:countrycode,omitempty\"`\n\tLocRegionCode  string `json:\"loc:regioncode,omitempty\"`\n\n\tSettingsCustomWidgets   int  `json:\"settings:customwidgets,omitempty\"`\n\tSettingsCustomAIPresets int  `json:\"settings:customaipresets,omitempty\"`\n\tSettingsCustomSettings  int  `json:\"settings:customsettings,omitempty\"`\n\tSettingsCustomAIModes   int  `json:\"settings:customaimodes,omitempty\"`\n\tSettingsSecretsCount    int  `json:\"settings:secretscount,omitempty\"`\n\tSettingsTransparent     bool `json:\"settings:transparent,omitempty\"`\n}\n```\n\n","path":"github.com/wavetermdev/waveterm/pkg/telemetry/telemetrydata","name":"telemetrydata","synopsis":"","isRedistributable":true}
