mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
feat: add template builder deployment config and telemetry types (#25082)
This commit is contained in:
@@ -1610,6 +1610,7 @@ type Snapshot struct {
|
||||
ChatModelConfigs []ChatModelConfig `json:"chat_model_configs"`
|
||||
ChatDiffStatusSummary *ChatDiffStatusSummary `json:"chat_diff_status_summary"`
|
||||
UserSecretsSummary *UserSecretsSummary `json:"user_secrets_summary"`
|
||||
TemplateBuilderSessions []TemplateBuilderSession `json:"template_builder_sessions"`
|
||||
}
|
||||
|
||||
// Deployment contains information about the host running Coder.
|
||||
@@ -2497,6 +2498,21 @@ type UserSecretsSummary struct {
|
||||
SecretsPerUserP90 int64 `json:"secrets_per_user_p90"`
|
||||
}
|
||||
|
||||
// TemplateBuilderSession tracks a single event in the template builder
|
||||
// wizard. Two events are emitted per session: one on wizard entry and
|
||||
// one on compose completion. User-supplied variable values are never
|
||||
// included.
|
||||
type TemplateBuilderSession struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
EventType string `json:"event_type"`
|
||||
UserID uuid.UUID `json:"user_id"`
|
||||
BaseTemplateID string `json:"base_template_id,omitempty"`
|
||||
ModuleIDs []string `json:"module_ids,omitempty"`
|
||||
DurationSeconds float64 `json:"duration_seconds,omitempty"`
|
||||
Success bool `json:"success,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
func ConvertAIBridgeInterceptionsSummary(endTime time.Time, provider, model, client string, summary database.CalculateAIBridgeInterceptionsTelemetrySummaryRow) AIBridgeInterceptionsSummary {
|
||||
return AIBridgeInterceptionsSummary{
|
||||
ID: uuid.New(),
|
||||
|
||||
Reference in New Issue
Block a user