@aintela/chat 0.4.7 → 0.4.8

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/dist/index.js CHANGED
@@ -10,7 +10,7 @@ import { APPBAR_HEIGHT as pe, APPBAR_HEIGHT as ge, ASK_USER_CANCELLED as Se, Age
10
10
  import { u as Zt, a as Yt, b as Qt } from "./useContainerWidth-DEjS-DPn.js";
11
11
  import { A as es, D as as, g as ts, b as ss, c as ns, d as os, e as rs, f as is, i as cs, r as ls } from "./environmentUtils-VZNTCzEE.js";
12
12
  import { ALLOWED_DOMAINS as ps, ALLOWED_EMAILS as gs, AUTH_CONFIG as Ss, GOOGLE_CLIENT_ID as Cs, getAgentBaseUrl as Is, getArtifactsBaseUrl as hs, getDotNetBaseUrl as ds, getIconByName as Ps, iconCategories as us, materialIcons as Es, searchIcons as vs, setEbiContextData as Ts, setEbiContextSessionId as ms } from "./utils.js";
13
- import { S as Rs, a as xs, b as Ms, c as ys, d as fs, e as Ds, f as Us, g as _s, h as ks, i as Bs, j as Vs, k as bs, l as Fs, p as Hs, m as Ns, s as Gs, o as Os, q as ws, t as Ws } from "./atMentions-DrCm42jN.js";
13
+ import { S as Rs, a as xs, b as Ms, c as ys, d as fs, e as Ds, f as Us, g as _s, h as ks, i as Bs, j as Vs, k as bs, l as Fs, p as Hs, m as Ns, s as Gs, o as Os, q as ws, t as Ws } from "./atMentions-BlzXxKB9.js";
14
14
  import { u as Js } from "./useChatSessions-eMttJ-qI.js";
15
15
  import { Score as js } from "./interfaces.js";
16
16
  export {
@@ -12,6 +12,11 @@ export type AtQueryVertical = 'air' | 'hotel';
12
12
  * fetcher) so hosts that don't care keep compiling untouched — a function with fewer params is assignable. */
13
13
  export interface AtQueryContext {
14
14
  vertical: AtQueryVertical;
15
+ /** The hotel-intent head's SCORE for the current text (0..1), not the thresholded verdict. `vertical` is that
16
+ * score already cut at the server's 0.35; a source that merges two result sets needs the number, because the
17
+ * cut is where "weakest place outranks strongest airport" flips on one hundredth of a point. Undefined only
18
+ * when the host predates this field. */
19
+ hotelConfidence?: number;
15
20
  }
16
21
  export interface AtMentionFetchers {
17
22
  /** Location source (airports / cities — or hotel places when `context.vertical` says so, issue #876). */
@@ -29,6 +34,9 @@ export interface AtMentionOptions {
29
34
  personFirstThreshold?: number;
30
35
  /** The search vertical for the location source (issue #876). Default 'air' — today's behavior. */
31
36
  vertical?: AtQueryVertical;
37
+ /** Hotel-intent confidence from the analyze pass, handed to the location source alongside `vertical` so it can
38
+ * order its own two result sets by a score rather than by a verdict someone else thresholded. Default 0. */
39
+ hotelConfidence?: number;
32
40
  }
33
41
  /**
34
42
  * Fetch `@` mention items from whichever sources are wired, as one flat list. When BOTH a location and a person
@@ -38,6 +46,6 @@ export interface AtMentionOptions {
38
46
  * A single wired source returns an untagged flat list (unchanged behaviour). Each source is awaited in parallel and
39
47
  * failures are isolated: one source erroring never sinks the other.
40
48
  */
41
- export declare function fetchAtMentions(query: string, { onAtQuery, onAtPersonQuery }: AtMentionFetchers, { personConfidence, locationConfidence, personFirstThreshold, vertical }?: AtMentionOptions): Promise<AtMentionItem[]>;
49
+ export declare function fetchAtMentions(query: string, { onAtQuery, onAtPersonQuery }: AtMentionFetchers, { personConfidence, locationConfidence, personFirstThreshold, vertical, hotelConfidence }?: AtMentionOptions): Promise<AtMentionItem[]>;
42
50
  /** True when `items[idx]` opens a new `@` section (its group differs from the previous item's). */
43
51
  export declare function isSectionStart(items: AtMentionItem[], idx: number): boolean;
package/dist/utils.js CHANGED
@@ -2,7 +2,7 @@ var u = Object.defineProperty;
2
2
  var a = (e, t) => u(e, "name", { value: t, configurable: !0 });
3
3
  import { a as c, b as s } from "./environmentUtils-VZNTCzEE.js";
4
4
  import { A as k, D as U, g as x, c as M, d as V, e as G, f as R, i as H, r as W } from "./environmentUtils-VZNTCzEE.js";
5
- import { S as Y, a as Z, b as j, c as q, d as z, e as Q, f as $, g as J, h as X, i as ee, j as te, k as oe, l as ae, p as re, m as ie, s as ne, o as se, q as le, t as ce } from "./atMentions-DrCm42jN.js";
5
+ import { S as Y, a as Z, b as j, c as q, d as z, e as Q, f as $, g as J, h as X, i as ee, j as te, k as oe, l as ae, p as re, m as ie, s as ne, o as se, q as le, t as ce } from "./atMentions-BlzXxKB9.js";
6
6
  const m = "https://agent.tripapi.com.br", p = "http://localagent:8000", S = /* @__PURE__ */ a((e) => new URLSearchParams(e.location.search).get("local") === "true" ? p : c() ?? m, "getAgentBaseUrl"), f = "https://storage.googleapis.com/aibi_artifacts_bucket", I = /* @__PURE__ */ a(() => f, "getArtifactsBaseUrl"), n = {}, h = (n == null ? void 0 : n.VITE_CADDY) == "true";
7
7
  function w() {
8
8
  const e = h ? "http://wsserver.localhost" : "http://localhost:8000";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aintela/chat",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"