Documentation
¶
Index ¶
Constants ¶
const ( PostHogAPIKey = "phc_CGzEmfPURHyNWrG49yNJA7wY5io8URFu3sazRYTAXw6Z" PostHogAPIHost = "https://app.posthog.com" )
Hardcoded PostHog project credentials. These are baked into the binary — users have no control over analytics configuration.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostHogClient ¶ added in v0.14.0
type PostHogClient struct {
// contains filtered or unexported fields
}
PostHogClient captures server-side analytics events to a PostHog project. Events are sent via the /capture REST endpoint — no SDK dependency required. All calls are fire-and-forget with a bounded worker goroutine so they never block request handlers.
func NewPostHogClient ¶ added in v0.14.0
func NewPostHogClient(apiKey, host string) *PostHogClient
NewPostHogClient returns an active client that starts a background worker. Returns nil if apiKey is empty.
func (*PostHogClient) Capture ¶ added in v0.14.0
func (c *PostHogClient) Capture(event, distinctID string, props map[string]any)
Capture enqueues an event. Properties are merged with the default server-side properties (os, arch, version). The call is non-blocking — if the queue is full the event is dropped silently.
func (*PostHogClient) Stop ¶ added in v0.14.0
func (c *PostHogClient) Stop()
Stop drains the queue and shuts down the worker.
type ServerMode ¶
type ServerMode string
ServerMode determines the operational mode of the server.
const ( ModeBuild ServerMode = "build" ModePlan ServerMode = "plan" )
type Theme ¶
type Theme struct {
Directory string `json:"directory"`
PrimaryColor string `json:"primaryColor"` // hex input from user, e.g. "#6366f1"
Accent string `json:"accent"` // --accent
AccentHover string `json:"accentHover"` // --accent-hover
AccentSoft string `json:"accentSoft"` // --accent-soft (rgba)
AccentRing string `json:"accentRing"` // --accent-ring (rgba)
OnPrimary string `json:"onPrimary"` // text color on accent bg
Glow string `json:"glow"` // --glow (rgba, for background accents)
Tint string `json:"tint"` // --tint (rgba, ~5% for sidebar/header)
}
Theme holds a per-directory color palette derived from a user-chosen primary color.
Source Files
¶
- config_routes.go
- docindex_routes.go
- event_routes.go
- git_routes.go
- latex_fitz.go
- latex_routes.go
- mcp_routes.go
- model_routes.go
- note_routes.go
- permission_routes.go
- plan_routes.go
- posthog.go
- pricing_routes.go
- provider_routes.go
- resource_routes.go
- resume_routes.go
- routes.go
- server.go
- session_routes.go
- skills_routes.go
- static.go
- task_routes.go
- theme_routes.go
- version_routes.go