@botonic/webchat-lit 2.37.0 → 2.38.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,24 @@
1
+ ## 2.38.0 (2026-11-04)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **botonic:** migrate webchat-react debug events to webchat-lit wrapper #BLT-2744 ([#1322](https://github.com/metis-ai/hubtype-product/pull/1322))
6
+ - **botonic:** cover ai agent router knowledge sources in webchat-lit debug-event #BLT-2743 ([#1321](https://github.com/metis-ai/hubtype-product/pull/1321))
7
+ - **botonic:** migrate contact reasons conditional event to webchat-lit debug-event #BLT-2700 ([#1320](https://github.com/metis-ai/hubtype-product/pull/1320))
8
+ - **botonic:** migrate ai-agent event rehydration to webchat-lit debug-event #BLT-2535 ([#1319](https://github.com/metis-ai/hubtype-product/pull/1319))
9
+ - **botonic:** migrate knowledge-base chunks rehydration to webchat-lit debug-event #BLT-2701 ([#1318](https://github.com/metis-ai/hubtype-product/pull/1318))
10
+ - **BLT-2661:** show do_nothing flag in AI Agent debug event ([#1189](https://github.com/metis-ai/hubtype-product/pull/1189))
11
+
12
+ ### 🩹 Fixes
13
+
14
+ - **test:** fix 31 hidden test failures undetected by CI skip bug ([#1375](https://github.com/metis-ai/hubtype-product/pull/1375))
15
+ - **dashboard:** persist sidebar collapse in shared userSettings key to sync with Angular #BLT-2673 ([#1275](https://github.com/metis-ai/hubtype-product/pull/1275))
16
+
17
+ ### ❤️ Thank You
18
+
19
+ - David Hidalgo @Davidhidalgo
20
+ - Oriol Raventós @Iru89
21
+
1
22
  ## 2.37.0 (2026-09-03)
2
23
 
3
24
  This was a version bump only for @botonic/webchat-lit to align it with other projects, there were no code changes.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botonic/webchat-lit",
3
- "version": "2.37.0",
3
+ "version": "2.38.0",
4
4
  "type": "module",
5
5
  "types": "./src/index.d.ts",
6
6
  "module": "./src/index.js",
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "lit": "^3.0.0",
19
- "@botonic/shared": "2.37.0"
19
+ "@botonic/shared": "2.38.0"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "tslib": "^2.3.0"
package/src/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './lib/debug-event/debug-event';
2
+ export { isSupportedDebugEventAction } from './lib/debug-event/event-config';
2
3
  export * from './lib/debug-event/types';
package/src/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './lib/debug-event/debug-event';
2
+ export { isSupportedDebugEventAction } from './lib/debug-event/event-config';
2
3
  export * from './lib/debug-event/types';
3
4
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/botonic/webchat-lit/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,yBAAyB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/botonic/webchat-lit/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA;AAC7C,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAA;AAC5E,cAAc,yBAAyB,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { type TemplateResult } from 'lit';
2
- import type { AiAgentDebugEvent, AiAgentRouterDebugEvent, ConditionalCustomDebugEvent, ConditionalQueueStatusDebugEvent, DebugEventSource, HandoffSuccessDebugEvent, KnowledgeBaseDebugEvent, ToolExecuted } from './types';
2
+ import type { AiAgentDebugEvent, AiAgentRouterDebugEvent, ConditionalContactReasonsDebugEvent, ConditionalCustomDebugEvent, ConditionalQueueStatusDebugEvent, DebugEventSource, HandoffSuccessDebugEvent, ToolExecuted } from './types';
3
3
  export interface RenderCtx {
4
4
  noteContent?: string;
5
5
  onSeeChunks: () => void;
@@ -13,8 +13,8 @@ export declare function parseTools(tools: ToolExecuted[]): {
13
13
  };
14
14
  export declare function getSourceIcon(source: DebugEventSource): TemplateResult;
15
15
  export declare function renderHandoffContent(data: HandoffSuccessDebugEvent, ctx: RenderCtx): TemplateResult;
16
- export declare function renderKnowledgeBaseContent(data: KnowledgeBaseDebugEvent, ctx: RenderCtx): TemplateResult;
17
16
  export declare function renderAiAgentContent(data: AiAgentDebugEvent, ctx: RenderCtx): TemplateResult;
18
- export declare function renderAiAgentRouterContent(data: AiAgentRouterDebugEvent): TemplateResult;
17
+ export declare function renderAiAgentRouterContent(data: AiAgentRouterDebugEvent, ctx: RenderCtx): TemplateResult;
19
18
  export declare function renderConditionalCustomContent(data: ConditionalCustomDebugEvent): TemplateResult;
20
19
  export declare function renderConditionalQueueStatusContent(data: ConditionalQueueStatusDebugEvent): TemplateResult;
20
+ export declare function renderConditionalContactReasonsContent(data: ConditionalContactReasonsDebugEvent): TemplateResult;
@@ -1,5 +1,5 @@
1
1
  import { html, nothing } from 'lit';
2
- import { aiSpecialistIcon, circleCheckIcon, filePdfIcon, fileWordIcon, handIcon, linkIcon, screwdriverWrenchIcon, } from './icons';
2
+ import { aiSpecialistIcon, filePdfIcon, fileWordIcon, handIcon, linkIcon, screwdriverWrenchIcon, } from './icons';
3
3
  const RETRIEVE_KNOWLEDGE_TOOL = 'retrieve_knowledge';
4
4
  export function parseTools(tools) {
5
5
  var _a, _b, _c;
@@ -111,56 +111,13 @@ export function renderHandoffContent(data, ctx) {
111
111
  </div>
112
112
  `;
113
113
  }
114
- export function renderKnowledgeBaseContent(data, ctx) {
115
- var _a;
116
- const chunksWithSources = (_a = data.knowledge_base_chunks_with_sources) !== null && _a !== void 0 ? _a : [];
117
- const sources = chunksWithSources.map(c => c.source);
118
- const chunks = chunksWithSources.flatMap(c => c.chunks);
119
- const hasKnowledge = sources.length > 0;
120
- const showFailReason = !hasKnowledge || Boolean(data.knowledgebase_fail_reason);
121
- return html `
122
- <div class="debug-content-wrapper">
123
- <div class="debug-detail">
124
- <strong class="debug-label">Query</strong>
125
- <div class="debug-value">"${data.user_input}"</div>
126
- </div>
127
-
128
- ${showFailReason
129
- ? html `
130
- <div class="debug-detail">
131
- <strong class="debug-label">Knowledge Base Fail Reason</strong>
132
- <div class="debug-value">${data.knowledgebase_fail_reason}</div>
133
- </div>
134
- `
135
- : html `
136
- ${renderSourcesSection(sources, chunks.length > 0, 'Sources', ctx.onSeeChunks)}
137
- ${hasKnowledge
138
- ? html `
139
- <div class="guardrail-item">
140
- ${circleCheckIcon()}
141
- <span class="guardrail-label">Knowledge found</span>
142
- </div>
143
- `
144
- : nothing}
145
-
146
- <div class="guardrail-item is-last">
147
- ${circleCheckIcon()}
148
- <span class="guardrail-label">Faithful answer</span>
149
- </div>
150
- `}
151
- </div>
152
- `;
153
- }
154
114
  export function renderAiAgentContent(data, ctx) {
155
115
  var _a;
156
116
  const { otherTools, query } = parseTools(data.tools_executed);
157
117
  const chunksWithSources = (_a = data.knowledge_base_chunks_with_sources) !== null && _a !== void 0 ? _a : [];
158
118
  const sources = chunksWithSources.map(c => c.source);
159
119
  const chunks = chunksWithSources.flatMap(c => c.chunks);
160
- const hasGuardrailsOrExit = data.input_guardrails_triggered.length > 0 ||
161
- data.output_guardrails_triggered.length > 0 ||
162
- data.exit ||
163
- data.error;
120
+ const showNoToolsExecuted = !data.truncated && !data.tools_executed.length;
164
121
  return html `
165
122
  <div class="debug-content-wrapper">
166
123
  ${query
@@ -194,7 +151,7 @@ export function renderAiAgentContent(data, ctx) {
194
151
  </div>
195
152
  `
196
153
  : nothing}
197
- ${!data.tools_executed.length
154
+ ${showNoToolsExecuted
198
155
  ? html `
199
156
  <div class="debug-detail">
200
157
  <strong class="debug-label">No tools executed</strong>
@@ -217,10 +174,38 @@ export function renderAiAgentContent(data, ctx) {
217
174
  </div>
218
175
  `
219
176
  : nothing}
177
+ ${data.do_nothing
178
+ ? html `
179
+ <div class="debug-detail">
180
+ <strong class="debug-label">Do nothing</strong>
181
+ </div>
182
+ `
183
+ : nothing}
220
184
  </div>
221
185
  `;
222
186
  }
223
- export function renderAiAgentRouterContent(data) {
187
+ export function renderAiAgentRouterContent(data, ctx) {
188
+ const guardrails = data.input_guardrails_triggered.length > 0
189
+ ? html `
190
+ <div class="debug-detail">
191
+ ${data.input_guardrails_triggered.map(g => html `
192
+ <div class="debug-item-with-icon">
193
+ ${handIcon()}
194
+ <span class="guardrail-label">Guardrail triggered</span>
195
+ <span class="guardrail-value">- ${g}</span>
196
+ </div>
197
+ `)}
198
+ </div>
199
+ `
200
+ : nothing;
201
+ const transferInfo = data.is_transferred_to_specialist
202
+ ? html `<div class="debug-value">
203
+ Transferred to
204
+ <span style="font-weight:400">- ${data.last_agent_name}</span>
205
+ </div>`
206
+ : data.input_guardrails_triggered.length > 0
207
+ ? guardrails
208
+ : html `<div class="debug-value">No transfer</div>`;
224
209
  return html `
225
210
  <div class="debug-content-wrapper">
226
211
  ${data.available_specialists.length > 0
@@ -236,24 +221,7 @@ export function renderAiAgentRouterContent(data) {
236
221
  `
237
222
  : nothing}
238
223
 
239
- <div class="debug-detail">
240
- ${data.is_transferred_to_specialist
241
- ? html `<div class="debug-value">
242
- Transferred to
243
- <span style="font-weight:400">- ${data.last_agent_name}</span>
244
- </div>`
245
- : data.input_guardrails_triggered.length > 0
246
- ? html `
247
- ${data.input_guardrails_triggered.map(g => html `
248
- <div class="debug-item-with-icon">
249
- ${handIcon()}
250
- <span class="guardrail-label">Guardrail triggered</span>
251
- <span class="guardrail-value">- ${g}</span>
252
- </div>
253
- `)}
254
- `
255
- : html `<div class="debug-value">No transfer</div>`}
256
- </div>
224
+ <div class="debug-detail">${transferInfo}</div>
257
225
  </div>
258
226
  `;
259
227
  }
@@ -293,4 +261,22 @@ export function renderConditionalQueueStatusContent(data) {
293
261
  </div>
294
262
  `;
295
263
  }
264
+ export function renderConditionalContactReasonsContent(data) {
265
+ return html `
266
+ <div class="debug-content-wrapper">
267
+ <div class="debug-detail">
268
+ ${data.contactReasons.length > 0
269
+ ? html `
270
+ <strong class="debug-label">Contact reasons</strong>
271
+ <div class="debug-value">${data.contactReasons.join(', ')}</div>
272
+ `
273
+ : html `<div class="debug-value">No contact reasons</div>`}
274
+ </div>
275
+ <div class="debug-detail">
276
+ <strong class="debug-label">Target</strong>
277
+ <div class="debug-value">${data.result}</div>
278
+ </div>
279
+ </div>
280
+ `;
281
+ }
296
282
  //# sourceMappingURL=content-renderers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"content-renderers.js","sourceRoot":"","sources":["../../../../../../../libs/botonic/webchat-lit/src/lib/debug-event/content-renderers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAA;AAExD,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,qBAAqB,GACtB,MAAM,SAAS,CAAA;AAYhB,MAAM,uBAAuB,GAAG,oBAAoB,CAAA;AAQpD,MAAM,UAAU,UAAU,CAAC,KAAqB;;IAC9C,MAAM,UAAU,GAAmB,EAAE,CAAA;IACrC,MAAM,aAAa,GAAa,EAAE,CAAA;IAClC,MAAM,YAAY,GAAa,EAAE,CAAA;IACjC,IAAI,KAAyB,CAAA;IAE7B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAI,CAAC,SAAS,KAAK,uBAAuB,EAAE,CAAC;YAC/C,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YACrB,SAAQ;QACV,CAAC;QACD,IAAI,OAAO,CAAA,MAAA,IAAI,CAAC,cAAc,0CAAG,OAAO,CAAC,CAAA,KAAK,QAAQ,EAAE,CAAC;YACvD,KAAK,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAW,CAAA;QAChD,CAAC;QACD,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,MAAA,IAAI,CAAC,yBAAyB,mCAAI,EA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gBAAgB,EAAE,IAAI,CAAC,CAAC,IAAI;;iBAEjC,CACF;;WAEJ;QACH,CAAC,CAAC,OAAO;;;UAGP,IAAI,CAAC,4BAA4B;QACjC,CAAC,CAAC,IAAI,CAAA;;gDAEgC,IAAI,CAAC,eAAe;mBACjD;QACT,CAAC,CAAC,IAAI,CAAC,0BAA0B,CAAC,MAAM,GAAG,CAAC;YAC1C,CAAC,CAAC,IAAI,CAAA;kBACA,IAAI,CAAC,0BAA0B,CAAC,GAAG,CACnC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAA;;wBAEH,QAAQ,EAAE;;wDAEsB,CAAC;;mBAEtC,CACF;eACF;YACH,CAAC,CAAC,IAAI,CAAA,4CAA4C;;;GAG3D,CAAA;AACH,CAAC;AAED,MAAM,UAAU,8BAA8B,CAC5C,IAAiC;IAEjC,OAAO,IAAI,CAAA;;;;mCAIsB,IAAI,CAAC,eAAe;;;;mCAIpB,IAAI,CAAC,QAAQ;;;;mCAIb,IAAI,CAAC,oBAAoB;;;GAGzD,CAAA;AACH,CAAC;AAED,MAAM,UAAU,mCAAmC,CACjD,IAAsC;IAEtC,OAAO,IAAI,CAAA;;;;mCAIsB,IAAI,CAAC,UAAU;;;;mCAIf,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ;;;;mCAItC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;;;GAGtE,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"content-renderers.js","sourceRoot":"","sources":["../../../../../../../libs/botonic/webchat-lit/src/lib/debug-event/content-renderers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAA;AAExD,OAAO,EACL,gBAAgB,EAEhB,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,qBAAqB,GACtB,MAAM,SAAS,CAAA;AAYhB,MAAM,uBAA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CAAA,4CAA4C,CAAA;IAEtD,OAAO,IAAI,CAAA;;QAEL,IAAI,CAAC,qBAAqB,CAAC,MAAM,GAAG,CAAC;QACrC,CAAC,CAAC,IAAI,CAAA;;;gBAGE,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAC9B,CAAC,CAAC,EAAE,CAAC,IAAI,CAAA;;sBAEH,gBAAgB,EAAE,IAAI,CAAC,CAAC,IAAI;;iBAEjC,CACF;;WAEJ;QACH,CAAC,CAAC,OAAO;;kCAEiB,YAAY;;GAE3C,CAAA;AACH,CAAC;AAED,MAAM,UAAU,8BAA8B,CAC5C,IAAiC;IAEjC,OAAO,IAAI,CAAA;;;;mCAIsB,IAAI,CAAC,eAAe;;;;mCAIpB,IAAI,CAAC,QAAQ;;;;mCAIb,IAAI,CAAC,oBAAoB;;;GAGzD,CAAA;AACH,CAAC;AAED,MAAM,UAAU,mCAAmC,CACjD,IAAsC;IAEtC,OAAO,IAAI,CAAA;;;;mCAIsB,IAAI,CAAC,UAAU;;;;mCAIf,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ;;;;mCAItC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;;;GAGtE,CAAA;AACH,CAAC;AAED,MAAM,UAAU,sCAAsC,CACpD,IAAyC;IAEzC,OAAO,IAAI,CAAA;;;UAGH,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC;QAC9B,CAAC,CAAC,IAAI,CAAA;;yCAEyB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC;aAC1D;QACH,CAAC,CAAC,IAAI,CAAA,mDAAmD;;;;mCAIhC,IAAI,CAAC,MAAM;;;GAG3C,CAAA;AACH,CAAC"}
@@ -178,10 +178,7 @@ export const debugEventStyles = css `
178
178
  margin-top: var(--lilara-spacing-xs);
179
179
  padding-top: var(--lilara-spacing-s);
180
180
  border-top: 1px solid
181
- var(
182
- --botonic-debug-event-border,
183
- var(--lilara-surface-foreground-border-color)
184
- );
181
+ var(--botonic-debug-event-border, var(--lilara-border-subtle));
185
182
  color: var(--botonic-debug-event-text, var(--lilara-text-base));
186
183
  font-size: var(--lilara-font-size-xs);
187
184
  padding-left: calc(var(--lilara-spacing-ml) + var(--lilara-spacing-xxs));
@@ -210,7 +207,7 @@ export const debugEventStyles = css `
210
207
  width: 1px;
211
208
  background-color: var(
212
209
  --botonic-debug-event-connector,
213
- var(--lilara-surface-foreground-border-color)
210
+ var(--lilara-border-subtle)
214
211
  );
215
212
  top: 0;
216
213
  height: 100%;
@@ -1 +1 @@
1
- {"version":3,"file":"debug-event.css.js","sourceRoot":"","sources":["../../../../../../../libs/botonic/webchat-lit/src/lib/debug-event/debug-event.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8UlC,CAAA"}
1
+ {"version":3,"file":"debug-event.css.js","sourceRoot":"","sources":["../../../../../../../libs/botonic/webchat-lit/src/lib/debug-event/debug-event.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2UlC,CAAA"}
@@ -7,10 +7,38 @@ export declare class BotonicDebugEvent extends LitElement {
7
7
  private _expanded;
8
8
  private _hasBeenOpened;
9
9
  private _requestedNoteId?;
10
+ private _requestedChunkIds?;
11
+ private _requestedRehydrationId?;
10
12
  static styles: import("lit").CSSResult[];
11
13
  connectedCallback(): void;
12
14
  updated(changed: Map<string, unknown>): void;
13
15
  private _maybeRequestNote;
16
+ /**
17
+ * Requests chunk data for AI agent events that carry knowledge-base chunk ids
18
+ * but no cached `knowledge_base_chunks_with_sources` (grouped in the
19
+ * executed tools).
20
+ *
21
+ * Requests are lazy: they start on the first open of the event and re-run
22
+ * when the chunk ids arrive or change afterwards (e.g. the message is
23
+ * rehydrated via realtime updates) — the consumer is expected to fetch
24
+ * the chunks and update `data` with them. The `_requestedChunkIds` guard
25
+ * keeps a pending request from being re-dispatched while the consumer
26
+ * rebuilds the `data` object.
27
+ */
28
+ private _maybeRequestChunks;
29
+ private _requestChunks;
30
+ private _getPendingChunkIds;
31
+ /**
32
+ * Requests the full event data for truncated AI agent events.
33
+ *
34
+ * The consumer is expected to fetch the full event (e.g. via
35
+ * `getMessageById` with debug events included), merge it and update `data`
36
+ * with `truncated` cleared — until then the renderer suppresses the
37
+ * "No tools executed" placeholder. The `_requestedRehydrationId` guard
38
+ * keeps a pending request from being re-dispatched while the consumer
39
+ * rebuilds the `data` object.
40
+ */
41
+ private _maybeRehydrateEvent;
14
42
  private get _config();
15
43
  private get _isCollapsible();
16
44
  private _handleHeaderClick;
@@ -4,6 +4,7 @@ import { html, LitElement, nothing } from 'lit';
4
4
  import { property, state } from 'lit/decorators.js';
5
5
  import { classMap } from 'lit/directives/class-map.js';
6
6
  import { resetStyles } from '../shared/base-styles';
7
+ import { parseTools } from './content-renderers';
7
8
  import { debugEventStyles } from './debug-event.css';
8
9
  import { EVENT_CONFIG } from './event-config';
9
10
  import { caretDownIcon, caretUpIcon } from './icons';
@@ -43,6 +44,8 @@ export class BotonicDebugEvent extends LitElement {
43
44
  updated(changed) {
44
45
  super.updated(changed);
45
46
  this._maybeRequestNote(changed);
47
+ this._maybeRequestChunks(changed);
48
+ this._maybeRehydrateEvent(changed);
46
49
  }
47
50
  _maybeRequestNote(changed) {
48
51
  if (!changed.has('data') && !changed.has('noteContent'))
@@ -62,6 +65,80 @@ export class BotonicDebugEvent extends LitElement {
62
65
  composed: true,
63
66
  }));
64
67
  }
68
+ /**
69
+ * Requests chunk data for AI agent events that carry knowledge-base chunk ids
70
+ * but no cached `knowledge_base_chunks_with_sources` (grouped in the
71
+ * executed tools).
72
+ *
73
+ * Requests are lazy: they start on the first open of the event and re-run
74
+ * when the chunk ids arrive or change afterwards (e.g. the message is
75
+ * rehydrated via realtime updates) — the consumer is expected to fetch
76
+ * the chunks and update `data` with them. The `_requestedChunkIds` guard
77
+ * keeps a pending request from being re-dispatched while the consumer
78
+ * rebuilds the `data` object.
79
+ */
80
+ _maybeRequestChunks(changed) {
81
+ if (!changed.has('data'))
82
+ return;
83
+ this._requestChunks();
84
+ }
85
+ _requestChunks() {
86
+ if (!this._hasBeenOpened)
87
+ return;
88
+ const chunkIds = this._getPendingChunkIds();
89
+ if (chunkIds.length === 0)
90
+ return;
91
+ const requestKey = chunkIds.join(',');
92
+ if (this._requestedChunkIds === requestKey)
93
+ return;
94
+ this._requestedChunkIds = requestKey;
95
+ this.dispatchEvent(new CustomEvent('load-chunks', {
96
+ detail: { chunkIds },
97
+ bubbles: true,
98
+ composed: true,
99
+ }));
100
+ }
101
+ _getPendingChunkIds() {
102
+ var _a;
103
+ if (this.action === EventAction.AiAgent) {
104
+ const data = this.data;
105
+ if ((_a = data.knowledge_base_chunks_with_sources) === null || _a === void 0 ? void 0 : _a.length)
106
+ return [];
107
+ return parseTools(data.tools_executed).allChunksIds;
108
+ }
109
+ if (this.action === EventAction.AiAgentRouter) {
110
+ return [];
111
+ }
112
+ return [];
113
+ }
114
+ /**
115
+ * Requests the full event data for truncated AI agent events.
116
+ *
117
+ * The consumer is expected to fetch the full event (e.g. via
118
+ * `getMessageById` with debug events included), merge it and update `data`
119
+ * with `truncated` cleared — until then the renderer suppresses the
120
+ * "No tools executed" placeholder. The `_requestedRehydrationId` guard
121
+ * keeps a pending request from being re-dispatched while the consumer
122
+ * rebuilds the `data` object.
123
+ */
124
+ _maybeRehydrateEvent(changed) {
125
+ if (!changed.has('data'))
126
+ return;
127
+ if (this.action !== EventAction.AiAgent)
128
+ return;
129
+ const data = this.data;
130
+ const hubtypeMessageId = data.hubtype_message_id;
131
+ if (!data.truncated || !hubtypeMessageId)
132
+ return;
133
+ if (this._requestedRehydrationId === hubtypeMessageId)
134
+ return;
135
+ this._requestedRehydrationId = hubtypeMessageId;
136
+ this.dispatchEvent(new CustomEvent('rehydrate-event', {
137
+ detail: { hubtypeMessageId },
138
+ bubbles: true,
139
+ composed: true,
140
+ }));
141
+ }
65
142
  get _config() {
66
143
  return EVENT_CONFIG[this.action];
67
144
  }
@@ -80,6 +157,7 @@ export class BotonicDebugEvent extends LitElement {
80
157
  bubbles: true,
81
158
  composed: true,
82
159
  }));
160
+ this._requestChunks();
83
161
  }
84
162
  }
85
163
  _renderCtx() {
@@ -1 +1 @@
1
- {"version":3,"file":"debug-event.js","sourceRoot":"","sources":["../../../../../../../libs/botonic/webchat-lit/src/lib/debug-event/debug-event.ts"],"names":[],"mappings":";AAAA,OAA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Ctx) => TemplateResult;
8
8
  }
9
9
  export declare const EVENT_CONFIG: Record<DebugEventAction, EventConfig>;
10
+ /** Whether the component can render the given debug event action. */
11
+ export declare const isSupportedDebugEventAction: (action: string) => action is DebugEventAction;
@@ -1,7 +1,7 @@
1
1
  import { EventAction } from '@botonic/shared';
2
2
  import { html } from 'lit';
3
- import { renderAiAgentContent, renderAiAgentRouterContent, renderConditionalCustomContent, renderConditionalQueueStatusContent, renderHandoffContent, renderKnowledgeBaseContent, } from './content-renderers';
4
- import { aiRouterIcon, aiSpecialistIcon, arrowProgressIcon, brainIcon, codeIcon, headSetIcon, lifeRingIcon, quoteRightIcon, splitIcon, wandIcon, windowRestoreIcon, } from './icons';
3
+ import { renderAiAgentContent, renderAiAgentRouterContent, renderConditionalContactReasonsContent, renderConditionalCustomContent, renderConditionalQueueStatusContent, renderHandoffContent, } from './content-renderers';
4
+ import { aiRouterIcon, aiSpecialistIcon, arrowProgressIcon, brainIcon, codeIcon, headSetIcon, lifeRingIcon, quoteRightIcon, splitIcon, windowRestoreIcon, } from './icons';
5
5
  // Each entry is authored with a data type narrowed to its action key. The
6
6
  // outer `as` cast trades strict variance in the mapped type for readable
7
7
  // per-entry authoring — the component always looks up an entry by
@@ -55,10 +55,10 @@ export const EVENT_CONFIG = {
55
55
  renderTitle: (d) => html `Queue status checked <span>- ${d.queue_name}</span>`,
56
56
  renderContent: renderConditionalQueueStatusContent,
57
57
  },
58
- [EventAction.Knowledgebase]: {
59
- icon: wandIcon,
60
- renderTitle: () => html `Knowledge Base triggered`,
61
- renderContent: renderKnowledgeBaseContent,
58
+ [EventAction.ConditionalContactReasons]: {
59
+ icon: splitIcon,
60
+ renderTitle: () => html `Contact reasons condition`,
61
+ renderContent: renderConditionalContactReasonsContent,
62
62
  },
63
63
  [EventAction.AiAgent]: {
64
64
  icon: aiSpecialistIcon,
@@ -68,7 +68,9 @@ export const EVENT_CONFIG = {
68
68
  [EventAction.AiAgentRouter]: {
69
69
  icon: aiRouterIcon,
70
70
  renderTitle: (d) => html `Router triggered <span>- ${d.flow_node_content_id}</span>`,
71
- renderContent: (data) => renderAiAgentRouterContent(data),
71
+ renderContent: renderAiAgentRouterContent,
72
72
  },
73
73
  };
74
+ /** Whether the component can render the given debug event action. */
75
+ export const isSupportedDebugEventAction = (action) => action in EVENT_CONFIG;
74
76
  //# sourceMappingURL=event-config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"event-config.js","sourceRoot":"","sources":["../../../../../../../libs/botonic/webchat-lit/src/lib/debug-event/event-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAE,IAAI,EAAuB,MAAM,KAAK,CAAA;AAE/C,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,8BAA8B,EAC9B,mCAAmC,EAEnC,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,SAAS,EACT,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,cAAc,EACd,SAAS,EACT,QAAQ,EACR,iBAAiB,GAClB,MAAM,SAAS,CAAA;AAwBhB,0EAA0E;AAC1E,yEAAyE;AACzE,kEAAkE;AAClE,6EAA6E;AAC7E,yBAAyB;AACzB,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE;QACrB,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,CAAC,CAAoB,EAAE,EAAE,CACpC,IAAI,CAAA,4BAA4B,CAAC,CAAC,gBAAgB,UAAU;KAC/D;IACD,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE;QACzB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,CAAC,CAAwB,EAAE,EAAE,CACxC,IAAI,CAAA,mCAAmC,CAAC,CAAC,sBAAsB,UAAU;KAC5E;IACD,CAAC,WAAW,CAAC,QAAQ,C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EAAE,SAAS;QACf,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA,kBAAkB;QACzC,aAAa,EAAE,8BAA8B;KAC9C;IACD,CAAC,WAAW,CAAC,sBAAsB,CAAC,EAAE;QACpC,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,CAAC,CAAmC,EAAE,EAAE,CACnD,IAAI,CAAA,gCAAgC,CAAC,CAAC,UAAU,SAAS;QAC3D,aAAa,EAAE,mCAAmC;KACnD;IACD,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE;QAC3B,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA,0BAA0B;QACjD,aAAa,EAAE,0BAA0B;KAC1C;IACD,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE;QACrB,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,CAAC,CAAoB,EAAE,EAAE,CACpC,IAAI,CAAA,gCAAgC,CAAC,CAAC,oBAAoB,SAAS;QACrE,aAAa,EAAE,oBAAoB;KACpC;IACD,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE;QAC3B,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,CAAC,CAA0B,EAAE,EAAE,CAC1C,IAAI,CAAA,4BAA4B,CAAC,CAAC,oBAAoB,SAAS;QACjE,aAAa,EAAE,CAAC,IAA6B,EAAE,EAAE,CAC/C,0BAA0B,CAAC,IAAI,CAAC;KACnC;CACuC,CAAA"}
1
+ {"version":3,"file":"event-config.js","sourceRoot":"","sources":["../../../../../../../libs/botonic/webchat-lit/src/lib/debug-event/event-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAE,IAAI,EAAuB,MAAM,KAAK,CAAA;AAE/C,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,sCAAsC,EACtC,8BAA8B,EAC9B,mCAAmC,EAEnC,oBAAoB,GACrB,MAAM,qBAAqB,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C,CAAC,CAAC,oBAAoB,SAAS;QACrE,aAAa,EAAE,oBAAoB;KACpC;IACD,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE;QAC3B,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,CAAC,CAA0B,EAAE,EAAE,CAC1C,IAAI,CAAA,4BAA4B,CAAC,CAAC,oBAAoB,SAAS;QACjE,aAAa,EAAE,0BAA0B;KAC1C;CACuC,CAAA;AAE1C,qEAAqE;AACrE,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACzC,MAAc,EACc,EAAE,CAAC,MAAM,IAAI,YAAY,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { EventAction } from '@botonic/shared';
2
- export type DebugEventAction = EventAction.Keyword | EventAction.IntentSmart | EventAction.Fallback | EventAction.BotAction | EventAction.HandoffSuccess | EventAction.RedirectFlow | EventAction.WebviewActionTriggered | EventAction.ConditionalChannel | EventAction.ConditionalCountry | EventAction.ConditionalCustom | EventAction.ConditionalQueueStatus | EventAction.Knowledgebase | EventAction.AiAgent | EventAction.AiAgentRouter;
2
+ export type DebugEventAction = EventAction.Keyword | EventAction.IntentSmart | EventAction.Fallback | EventAction.BotAction | EventAction.HandoffSuccess | EventAction.RedirectFlow | EventAction.WebviewActionTriggered | EventAction.ConditionalChannel | EventAction.ConditionalCountry | EventAction.ConditionalCustom | EventAction.ConditionalQueueStatus | EventAction.ConditionalContactReasons | EventAction.AiAgent | EventAction.AiAgentRouter;
3
3
  export interface KeywordDebugEvent {
4
4
  action: EventAction.Keyword;
5
5
  flow_id: string;
@@ -61,6 +61,11 @@ export interface ConditionalQueueStatusDebugEvent {
61
61
  is_queue_open: boolean;
62
62
  is_available_agent: boolean;
63
63
  }
64
+ export interface ConditionalContactReasonsDebugEvent {
65
+ action: EventAction.ConditionalContactReasons;
66
+ contactReasons: string[];
67
+ result: string;
68
+ }
64
69
  export interface DebugEventSource {
65
70
  id: string;
66
71
  type: 'url' | 'file' | string;
@@ -84,17 +89,6 @@ export interface ToolExecuted {
84
89
  knowledgebase_sources_ids?: string[];
85
90
  knowledgebase_chunks_ids?: string[];
86
91
  }
87
- export interface KnowledgeBaseDebugEvent {
88
- action: EventAction.Knowledgebase;
89
- flow_id: string;
90
- flow_node_id: string;
91
- knowledgebase_inference_id: string;
92
- knowledgebase_fail_reason: string;
93
- knowledgebase_sources_ids: string[];
94
- knowledgebase_chunks_ids: string[];
95
- user_input: string;
96
- knowledge_base_chunks_with_sources?: DebugEventChunkWithSource[];
97
- }
98
92
  export interface AiAgentDebugEvent {
99
93
  action: EventAction.AiAgent;
100
94
  flow_node_content_id: string;
@@ -104,7 +98,10 @@ export interface AiAgentDebugEvent {
104
98
  output_guardrails_triggered: string[];
105
99
  exit: boolean;
106
100
  error: boolean;
101
+ do_nothing: boolean;
107
102
  knowledge_base_chunks_with_sources?: DebugEventChunkWithSource[];
103
+ truncated?: boolean;
104
+ hubtype_message_id?: string;
108
105
  }
109
106
  export interface SpecialistDebugEvent {
110
107
  name: string;
@@ -113,7 +110,6 @@ export interface SpecialistDebugEvent {
113
110
  export interface AiAgentRouterDebugEvent {
114
111
  action: EventAction.AiAgentRouter;
115
112
  flow_node_content_id: string;
116
- tools_executed: ToolExecuted[];
117
113
  memory_length: number;
118
114
  input_guardrails_triggered: string[];
119
115
  output_guardrails_triggered: string[];
@@ -122,6 +118,5 @@ export interface AiAgentRouterDebugEvent {
122
118
  last_agent_name: string;
123
119
  available_specialists: SpecialistDebugEvent[];
124
120
  is_transferred_to_specialist: boolean;
125
- knowledge_base_chunks_with_sources?: DebugEventChunkWithSource[];
126
121
  }
127
- export type DebugEvent = KeywordDebugEvent | SmartIntentDebugEvent | FallbackDebugEvent | BotActionDebugEvent | HandoffSuccessDebugEvent | RedirectFlowDebugEvent | WebviewActionTriggeredDebugEvent | ConditionalChannelDebugEvent | ConditionalCountryDebugEvent | ConditionalCustomDebugEvent | ConditionalQueueStatusDebugEvent | KnowledgeBaseDebugEvent | AiAgentDebugEvent | AiAgentRouterDebugEvent;
122
+ export type DebugEvent = KeywordDebugEvent | SmartIntentDebugEvent | FallbackDebugEvent | BotActionDebugEvent | HandoffSuccessDebugEvent | RedirectFlowDebugEvent | WebviewActionTriggeredDebugEvent | ConditionalChannelDebugEvent | ConditionalCountryDebugEvent | ConditionalCustomDebugEvent | ConditionalQueueStatusDebugEvent | ConditionalContactReasonsDebugEvent | AiAgentDebugEvent | AiAgentRouterDebugEvent;