@v-tilt/browser 1.10.9 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,6 +32,14 @@ export declare class LazyLoadedChat implements LazyLoadedChatInterface {
32
32
  get currentView(): ChatWidgetView;
33
33
  private get _theme();
34
34
  private get _distinctId();
35
+ /**
36
+ * Track a chat message event via the SDK capture pipeline.
37
+ * Gated by remote config chatTracking settings.
38
+ *
39
+ * - User messages: only if chatTracking.trackUserMessages is enabled
40
+ * - AI/Agent messages: only if chatTracking.trackAgentMessages is enabled
41
+ */
42
+ private _trackChatMessage;
35
43
  open(): void;
36
44
  close(): void;
37
45
  toggle(): void;
@@ -56,7 +64,6 @@ export declare class LazyLoadedChat implements LazyLoadedChatInterface {
56
64
  destroy(): void;
57
65
  private _connectRealtime;
58
66
  private _disconnectRealtime;
59
- private _extractProjectId;
60
67
  private _handleNewMessage;
61
68
  private _handleTypingEvent;
62
69
  private _handleReadCursorEvent;
@@ -45,17 +45,23 @@ export interface PresenceStatus {
45
45
  current_page_url?: string;
46
46
  }
47
47
  /**
48
- * Chat event names for server-side analytics tracking
48
+ * Chat event names for analytics tracking
49
49
  *
50
- * Note: Widget UI events (open/close) are exposed via callbacks in ChatConfig.
51
- * Message events are tracked server-side to ensure reliability and capture AI/agent messages.
50
+ * Message events are tracked client-side via capture() for full enrichment
51
+ * (person properties, geo, device, referrer, etc.).
52
+ * Widget UI events (open/close) are exposed via callbacks in ChatConfig.
52
53
  *
53
- * All chat events use a single event type ($chat_message) with properties:
54
+ * All chat message events use a single event type ($chat_message) with properties:
54
55
  * - $sender_type: 'user' | 'ai' | 'agent'
55
- * - $is_greeting: true (for AI greeting that marks conversation start)
56
+ * - $channel_id: Chat channel ID
57
+ * - $message_id: Message ID
58
+ *
59
+ * Tracking is gated by remote config:
60
+ * - chatTracking.trackUserMessages → captures when $sender_type=user
61
+ * - chatTracking.trackAgentMessages → captures when $sender_type=ai|agent
56
62
  */
57
63
  export declare const CHAT_EVENTS: {
58
- /** Tracked server-side for all messages (user, AI, agent) */
64
+ /** Tracked client-side for all messages (user, AI, agent) */
59
65
  readonly MESSAGE: "$chat_message";
60
66
  };
61
67
  /**
package/dist/feature.d.ts CHANGED
@@ -193,11 +193,11 @@ export declare abstract class BaseFeature<TConfig extends FeatureConfig = Featur
193
193
  /**
194
194
  * Handle config updates. Override in subclass for custom behavior.
195
195
  */
196
- onConfigUpdate(config: VTiltConfig): void;
196
+ onConfigUpdate(_config: VTiltConfig): void;
197
197
  /**
198
198
  * Handle remote config updates. Override in subclass for custom behavior.
199
199
  */
200
- onRemoteConfig(remoteConfig: RemoteConfig): void;
200
+ onRemoteConfig(_remoteConfig: RemoteConfig): void;
201
201
  /**
202
202
  * Internal start logic. Called when feature should start.
203
203
  * Override in subclass to setup event listeners, observers, etc.