@liip/liipgpt 3.12.0 → 3.12.2

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.
Files changed (29) hide show
  1. package/chat/liipgpt-chat.iife.js +3 -3
  2. package/chat/liipgpt-chat.js +3 -3
  3. package/config/index.d.ts +7 -1
  4. package/configurator/_app/env.js +1 -1
  5. package/configurator/_app/immutable/chunks/{o5n3JJnR.js → B1Joifa9.js} +1 -1
  6. package/configurator/_app/immutable/chunks/{DS0EeZTa.js → BpZBEnLx.js} +1 -1
  7. package/configurator/_app/immutable/chunks/{IVrT20gg.js → C7GamMay.js} +1 -1
  8. package/configurator/_app/immutable/chunks/{DWQwd7UL.js → CYSkUxy-.js} +1 -1
  9. package/configurator/_app/immutable/chunks/{BTdvPkyd.js → DK5x2wSR.js} +1 -1
  10. package/configurator/_app/immutable/chunks/{BAn02Khb.js → W0DG3qIi.js} +2 -2
  11. package/configurator/_app/immutable/chunks/{z-U4HNd3.js → nkdIuSLi.js} +1 -1
  12. package/configurator/_app/immutable/chunks/{qdgQQPPN.js → q8gaG5yu.js} +1 -1
  13. package/configurator/_app/immutable/chunks/{B4lUgYsH.js → wBAqx-SG.js} +1 -1
  14. package/configurator/_app/immutable/entry/{app.CFzWtUmE.js → app.N8qcqFkp.js} +2 -2
  15. package/configurator/_app/immutable/entry/start.C7KBUclR.js +1 -0
  16. package/configurator/_app/immutable/nodes/{0.C5XdevBn.js → 0.DnB99G2N.js} +1 -1
  17. package/configurator/_app/immutable/nodes/{1.SYxOPfTY.js → 1.DaqCyvgg.js} +1 -1
  18. package/configurator/_app/immutable/nodes/{2.Bldafw2d.js → 2.F3TuebRJ.js} +3 -3
  19. package/configurator/_app/immutable/nodes/{3.DamO4w17.js → 3.BbNw4LYP.js} +1 -1
  20. package/configurator/_app/version.json +1 -1
  21. package/configurator/index.html +6 -6
  22. package/configurator/sidebar.html +6 -6
  23. package/index.cjs +6 -6
  24. package/index.d.ts +12 -2
  25. package/index.js +6 -6
  26. package/package.json +1 -1
  27. package/search-summary/liipgpt-search-summary.iife.js +2 -2
  28. package/search-summary/liipgpt-search-summary.js +2 -2
  29. package/configurator/_app/immutable/entry/start.CmVJPKRp.js +0 -1
@@ -4,12 +4,12 @@
4
4
  <meta charset="utf-8" />
5
5
  <link rel="icon" href="./favicon.png" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1" />
7
- <link href="./_app/immutable/entry/start.CmVJPKRp.js" rel="modulepreload">
8
- <link href="./_app/immutable/chunks/z-U4HNd3.js" rel="modulepreload">
7
+ <link href="./_app/immutable/entry/start.C7KBUclR.js" rel="modulepreload">
8
+ <link href="./_app/immutable/chunks/nkdIuSLi.js" rel="modulepreload">
9
9
  <link href="./_app/immutable/chunks/DK3lEKRX.js" rel="modulepreload">
10
10
  <link href="./_app/immutable/chunks/CibALFW0.js" rel="modulepreload">
11
11
  <link href="./_app/immutable/chunks/Bo0U8J3e.js" rel="modulepreload">
12
- <link href="./_app/immutable/entry/app.CFzWtUmE.js" rel="modulepreload">
12
+ <link href="./_app/immutable/entry/app.N8qcqFkp.js" rel="modulepreload">
13
13
  <link href="./_app/immutable/chunks/DjVmpym-.js" rel="modulepreload">
14
14
  <link href="./_app/immutable/chunks/CFKVnMbq.js" rel="modulepreload">
15
15
 
@@ -18,7 +18,7 @@
18
18
  <div style="display: contents">
19
19
  <script>
20
20
  {
21
- __sveltekit_ah3cig = {
21
+ __sveltekit_kvl68p = {
22
22
  base: new URL(".", location).pathname.slice(0, -1),
23
23
  assets: "/configurator"
24
24
  };
@@ -26,8 +26,8 @@
26
26
  const element = document.currentScript.parentElement;
27
27
 
28
28
  Promise.all([
29
- import("./_app/immutable/entry/start.CmVJPKRp.js"),
30
- import("./_app/immutable/entry/app.CFzWtUmE.js")
29
+ import("./_app/immutable/entry/start.C7KBUclR.js"),
30
+ import("./_app/immutable/entry/app.N8qcqFkp.js")
31
31
  ]).then(([kit, app]) => {
32
32
  kit.start(app, element);
33
33
  });
@@ -4,12 +4,12 @@
4
4
  <meta charset="utf-8" />
5
5
  <link rel="icon" href="./favicon.png" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1" />
7
- <link href="./_app/immutable/entry/start.CmVJPKRp.js" rel="modulepreload">
8
- <link href="./_app/immutable/chunks/z-U4HNd3.js" rel="modulepreload">
7
+ <link href="./_app/immutable/entry/start.C7KBUclR.js" rel="modulepreload">
8
+ <link href="./_app/immutable/chunks/nkdIuSLi.js" rel="modulepreload">
9
9
  <link href="./_app/immutable/chunks/DK3lEKRX.js" rel="modulepreload">
10
10
  <link href="./_app/immutable/chunks/CibALFW0.js" rel="modulepreload">
11
11
  <link href="./_app/immutable/chunks/Bo0U8J3e.js" rel="modulepreload">
12
- <link href="./_app/immutable/entry/app.CFzWtUmE.js" rel="modulepreload">
12
+ <link href="./_app/immutable/entry/app.N8qcqFkp.js" rel="modulepreload">
13
13
  <link href="./_app/immutable/chunks/DjVmpym-.js" rel="modulepreload">
14
14
  <link href="./_app/immutable/chunks/CFKVnMbq.js" rel="modulepreload">
15
15
 
@@ -18,7 +18,7 @@
18
18
  <div style="display: contents">
19
19
  <script>
20
20
  {
21
- __sveltekit_ah3cig = {
21
+ __sveltekit_kvl68p = {
22
22
  base: new URL(".", location).pathname.slice(0, -1),
23
23
  assets: "/configurator"
24
24
  };
@@ -26,8 +26,8 @@
26
26
  const element = document.currentScript.parentElement;
27
27
 
28
28
  Promise.all([
29
- import("./_app/immutable/entry/start.CmVJPKRp.js"),
30
- import("./_app/immutable/entry/app.CFzWtUmE.js")
29
+ import("./_app/immutable/entry/start.C7KBUclR.js"),
30
+ import("./_app/immutable/entry/app.N8qcqFkp.js")
31
31
  ]).then(([kit, app]) => {
32
32
  kit.start(app, element);
33
33
  });
package/index.cjs CHANGED
@@ -3627,8 +3627,8 @@ class ChatResultBuilder {
3627
3627
  retrievalQuestion: options.userQuestion
3628
3628
  });
3629
3629
  }
3630
- pushError(error) {
3631
- this.options.onError?.(error);
3630
+ pushError(error, message) {
3631
+ this.options.onError?.(error, message);
3632
3632
  this.store.update((current) => ({ ...current, errors: [...current.errors, error] }));
3633
3633
  }
3634
3634
  updateRequestId(id) {
@@ -3724,7 +3724,7 @@ var PiiChecks = [
3724
3724
  {
3725
3725
  type: "ahv",
3726
3726
  check: (input) => {
3727
- const pattern = /\b756\.\d{4}\.\d{4}\.\d{2}\b/;
3727
+ const pattern = /\b756[.\s-]?\d{2,4}[.\s-]?\d{2,4}[.\s-]?\d{2}\b/;
3728
3728
  return pattern.test(input);
3729
3729
  }
3730
3730
  },
@@ -5330,8 +5330,8 @@ class LiipGPTClientPrimitive {
5330
5330
  const markdownRenderer = this.renderers.get(conversationId) ?? new MarkdownRenderer({ extensions: this.markedExtensions, newTabSrText: this._newTabSrText });
5331
5331
  const chatResultBuilder = new ChatResultBuilder({
5332
5332
  id: requestId,
5333
- onError: (error) => {
5334
- options.onError?.(error);
5333
+ onError: (error, message) => {
5334
+ options.onError?.(error, message);
5335
5335
  },
5336
5336
  onFinish: (message) => {
5337
5337
  content.setValue(message);
@@ -5409,7 +5409,7 @@ class LiipGPTClientPrimitive {
5409
5409
  restartWatchdog();
5410
5410
  switch (data.type) {
5411
5411
  case "error":
5412
- typingQueue.runAfterTyping(() => chatResultBuilder.pushError(data.error));
5412
+ typingQueue.runAfterTyping(() => chatResultBuilder.pushError(data.error, data.message));
5413
5413
  break;
5414
5414
  case "id":
5415
5415
  if (data.for === "request") {
package/index.d.ts CHANGED
@@ -1254,7 +1254,12 @@ export type ChatReferences = z.infer<typeof chatReferencesSchema>;
1254
1254
  export type ChatMessageBotStreaming = z.infer<typeof chatMessageBotStreamingSchema>;
1255
1255
  export type ChatMessageBotLoading = z.infer<typeof chatMessageBotLoadingSchema>;
1256
1256
  export type ChatErrors = z.infer<typeof chatErrorsSchema>;
1257
- export type OnError = (error: ChatErrors) => void;
1257
+ /**
1258
+ * `message` is the backend's own wording for this error, sent on the SSE `error` event. When
1259
+ * present it replaces the generic per-code translation, so the server can explain *why* a request
1260
+ * was rejected (e.g. a link in the question) instead of the catch-all "your request was blocked".
1261
+ */
1262
+ export type OnError = (error: ChatErrors, message?: string) => void;
1258
1263
  export type ConversationHistoryEntry = z.infer<typeof conversationHistorySchema>[number];
1259
1264
  export type MarkdownRendererOptions = {
1260
1265
  extensions?: MarkedExtension[];
@@ -1372,7 +1377,12 @@ export declare class ChatResultBuilder {
1372
1377
  private content;
1373
1378
  private backendSendsMappedRefs;
1374
1379
  constructor(options: ChatResultBuilderOptions);
1375
- pushError(error: ChatErrors): void;
1380
+ /**
1381
+ * `message` is the backend's optional wording for this error. It is handed to `onError` so the
1382
+ * UI can show it verbatim, but deliberately not stored on the entry: `errors` is a list of
1383
+ * machine-readable codes that history/persistence reads, and the wording is transient.
1384
+ */
1385
+ pushError(error: ChatErrors, message?: string): void;
1376
1386
  updateRequestId(id: string): void;
1377
1387
  updateText(text: string): void;
1378
1388
  finishMessage(): void;
package/index.js CHANGED
@@ -3530,8 +3530,8 @@ class ChatResultBuilder {
3530
3530
  retrievalQuestion: options.userQuestion
3531
3531
  });
3532
3532
  }
3533
- pushError(error) {
3534
- this.options.onError?.(error);
3533
+ pushError(error, message) {
3534
+ this.options.onError?.(error, message);
3535
3535
  this.store.update((current) => ({ ...current, errors: [...current.errors, error] }));
3536
3536
  }
3537
3537
  updateRequestId(id) {
@@ -3627,7 +3627,7 @@ var PiiChecks = [
3627
3627
  {
3628
3628
  type: "ahv",
3629
3629
  check: (input) => {
3630
- const pattern = /\b756\.\d{4}\.\d{4}\.\d{2}\b/;
3630
+ const pattern = /\b756[.\s-]?\d{2,4}[.\s-]?\d{2,4}[.\s-]?\d{2}\b/;
3631
3631
  return pattern.test(input);
3632
3632
  }
3633
3633
  },
@@ -5233,8 +5233,8 @@ class LiipGPTClientPrimitive {
5233
5233
  const markdownRenderer = this.renderers.get(conversationId) ?? new MarkdownRenderer({ extensions: this.markedExtensions, newTabSrText: this._newTabSrText });
5234
5234
  const chatResultBuilder = new ChatResultBuilder({
5235
5235
  id: requestId,
5236
- onError: (error) => {
5237
- options.onError?.(error);
5236
+ onError: (error, message) => {
5237
+ options.onError?.(error, message);
5238
5238
  },
5239
5239
  onFinish: (message) => {
5240
5240
  content.setValue(message);
@@ -5312,7 +5312,7 @@ class LiipGPTClientPrimitive {
5312
5312
  restartWatchdog();
5313
5313
  switch (data.type) {
5314
5314
  case "error":
5315
- typingQueue.runAfterTyping(() => chatResultBuilder.pushError(data.error));
5315
+ typingQueue.runAfterTyping(() => chatResultBuilder.pushError(data.error, data.message));
5316
5316
  break;
5317
5317
  case "id":
5318
5318
  if (data.for === "request") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liip/liipgpt",
3
- "version": "3.12.0",
3
+ "version": "3.12.2",
4
4
  "description": "LiipGPT Chat and Library",
5
5
  "type": "module",
6
6
  "exports": {