@mobileaction/action-kit 1.58.7 → 1.58.9-beta.20260326073923

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.
@@ -1,4 +1,4 @@
1
- import { e, j as o, k as t, z as M, A as i, a as n, b as c, c as r, d as p, f as b, B as l, h as u, i as S, l as T, m as d, n as m, o as I, C, p as y, q as g, r as P, s as A, t as B, D as h, u as z, v, w as D, L as O, x as w, _ as k, y as L, E as R, M as E, F as _, G as f, H as x, I as F, J as N, K as G, N as K, O as V, P as H, Q as U, R as W, S as J, T as j, U as q, V as Z, W as Q, X, Y, Z as $, $ as aa, a0 as sa, a1 as ea, a2 as oa, a3 as ta, a4 as Ma, a5 as ia, a6 as na, a7 as ca, a8 as ra, a9 as pa, aa as ba, ab as la, ac as ua, ad as Sa, ae as Ta, af as da, ag as ma, ah as Ia, ai as Ca, aj as ya, ak as ga, al as Pa, am as Aa, an as Ba, ao as ha, ap as za, aq as va, ar as Da, as as Oa, at as wa, au as ka, av as La, aw as Ra, ax as Ea, ay as _a, az as fa, aA as xa, aB as Fa, aC as Na, aD as Ga, aE as Ka, aF as Va, aG as Ha, aH as Ua, aI as Wa, aJ as Ja, aK as ja, aL as qa, aM as Za, aN as Qa, aO as Xa, aP as Ya, aQ as $a, aR as as, aS as ss, aT as es, aU as os, aV as ts, aW as Ms, aX as is, aY as ns, aZ as cs, a_ as rs, a$ as ps, b0 as bs, b1 as ls, b2 as us, b3 as Ss, b4 as Ts, b5 as ds, b6 as ms, b7 as Is, b8 as Cs, b9 as ys, ba as gs, bb as Ps, bc as As, bd as Bs, be as hs, bf as zs, bg as vs, bh as Ds, bi as Os, bj as ws, bk as ks, bl as Ls, bm as Rs, bn as Es, bo as _s, bp as fs, bq as xs, br as Fs, bs as Ns, bt as Gs, bu as Ks, bv as Vs, bw as Hs, bx as Us, by as Ws, bz as Js, bA as js, bB as qs, bC as Zs, bD as Qs, bE as Xs, bF as Ys, bG as $s, bH as ae, bI as se, bJ as ee, bK as oe, bL as te, bM as Me, bN as ie, bO as ne, bP as ce, bQ as re, bR as pe, bS as be, bT as le, bU as ue, bV as Se, bW as Te, bX as de, bY as me, bZ as Ie, b_ as Ce, b$ as ye, c0 as ge, c1 as Pe, c2 as Ae, c3 as Be, c4 as he, c5 as ze, c6 as ve, c7 as De, c8 as Oe, c9 as we, ca as ke, cb as Le, cc as Re, cd as Ee, ce as _e, cf as fe, cg as xe, ch as Fe, ci as Ne, cj as Ge, ck as Ke, cl as Ve, cm as He, cn as Ue, co as We, cp as Je, cq as je, cr as qe, cs as Ze, ct as Qe, cu as Xe, cv as Ye, cw as $e, cx as ao, cy as so, cz as eo, cA as oo, cB as to, cC as Mo, cD as io, cE as no, cF as co, cG as ro, cH as po, cI as bo, cJ as lo } from "./index--swt3JBY.js";
1
+ import { e, j as o, k as t, z as M, A as i, a as n, b as c, c as r, d as p, f as b, B as l, h as u, i as S, l as T, m as d, n as m, o as I, C, p as y, q as g, r as P, s as A, t as B, D as h, u as z, v, w as D, L as O, x as w, _ as k, y as L, E as R, M as E, F as _, G as f, H as x, I as F, J as N, K as G, N as K, O as V, P as H, Q as U, R as W, S as J, T as j, U as q, V as Z, W as Q, X, Y, Z as $, $ as aa, a0 as sa, a1 as ea, a2 as oa, a3 as ta, a4 as Ma, a5 as ia, a6 as na, a7 as ca, a8 as ra, a9 as pa, aa as ba, ab as la, ac as ua, ad as Sa, ae as Ta, af as da, ag as ma, ah as Ia, ai as Ca, aj as ya, ak as ga, al as Pa, am as Aa, an as Ba, ao as ha, ap as za, aq as va, ar as Da, as as Oa, at as wa, au as ka, av as La, aw as Ra, ax as Ea, ay as _a, az as fa, aA as xa, aB as Fa, aC as Na, aD as Ga, aE as Ka, aF as Va, aG as Ha, aH as Ua, aI as Wa, aJ as Ja, aK as ja, aL as qa, aM as Za, aN as Qa, aO as Xa, aP as Ya, aQ as $a, aR as as, aS as ss, aT as es, aU as os, aV as ts, aW as Ms, aX as is, aY as ns, aZ as cs, a_ as rs, a$ as ps, b0 as bs, b1 as ls, b2 as us, b3 as Ss, b4 as Ts, b5 as ds, b6 as ms, b7 as Is, b8 as Cs, b9 as ys, ba as gs, bb as Ps, bc as As, bd as Bs, be as hs, bf as zs, bg as vs, bh as Ds, bi as Os, bj as ws, bk as ks, bl as Ls, bm as Rs, bn as Es, bo as _s, bp as fs, bq as xs, br as Fs, bs as Ns, bt as Gs, bu as Ks, bv as Vs, bw as Hs, bx as Us, by as Ws, bz as Js, bA as js, bB as qs, bC as Zs, bD as Qs, bE as Xs, bF as Ys, bG as $s, bH as ae, bI as se, bJ as ee, bK as oe, bL as te, bM as Me, bN as ie, bO as ne, bP as ce, bQ as re, bR as pe, bS as be, bT as le, bU as ue, bV as Se, bW as Te, bX as de, bY as me, bZ as Ie, b_ as Ce, b$ as ye, c0 as ge, c1 as Pe, c2 as Ae, c3 as Be, c4 as he, c5 as ze, c6 as ve, c7 as De, c8 as Oe, c9 as we, ca as ke, cb as Le, cc as Re, cd as Ee, ce as _e, cf as fe, cg as xe, ch as Fe, ci as Ne, cj as Ge, ck as Ke, cl as Ve, cm as He, cn as Ue, co as We, cp as Je, cq as je, cr as qe, cs as Ze, ct as Qe, cu as Xe, cv as Ye, cw as $e, cx as ao, cy as so, cz as eo, cA as oo, cB as to, cC as Mo, cD as io, cE as no, cF as co, cG as ro, cH as po, cI as bo, cJ as lo } from "./index-5f6FpdEx.js";
2
2
  import { SelectOptGroup as So } from "ant-design-vue";
3
3
  export {
4
4
  e as ACTION_KIT_LOCALE_EN,
@@ -1,4 +1,4 @@
1
- import { g as ss } from "./index--swt3JBY.js";
1
+ import { g as ss } from "./index-5f6FpdEx.js";
2
2
  function os(W, _) {
3
3
  for (var C = 0; C < _.length; C++) {
4
4
  const B = _[C];
@@ -1,6 +1,6 @@
1
1
  import type { MaChatbotFeedbackTopic, MaChatbotMessage } from '../types';
2
2
  export interface UseFeedbackOptions {
3
- submitFeedbackApi: (recordId: number, isPositive: boolean, feedbackTopic?: string, feedbackText?: string) => Promise<boolean>;
3
+ submitFeedbackApi: (recordId: number, isPositive: boolean | null, feedbackTopic?: string, feedbackText?: string) => Promise<boolean>;
4
4
  }
5
5
  export declare function useFeedback({ submitFeedbackApi }: UseFeedbackOptions): {
6
6
  showFeedbackPanel: import("vue").Ref<boolean, boolean>;
@@ -13,6 +13,7 @@ export declare function useMessages({ maOrgId, mockStreamFn, api, onResponseStar
13
13
  id: string;
14
14
  role: import("../types").MaChatbotMessageRole;
15
15
  content: string;
16
+ reasoning?: string;
16
17
  timestamp?: Date;
17
18
  status?: import("../types").MaChatbotMessageStatus;
18
19
  recordId?: number;
@@ -23,6 +24,7 @@ export declare function useMessages({ maOrgId, mockStreamFn, api, onResponseStar
23
24
  id: string;
24
25
  role: import("../types").MaChatbotMessageRole;
25
26
  content: string;
27
+ reasoning?: string;
26
28
  timestamp?: Date;
27
29
  status?: import("../types").MaChatbotMessageStatus;
28
30
  recordId?: number;
@@ -40,6 +42,7 @@ export declare function useMessages({ maOrgId, mockStreamFn, api, onResponseStar
40
42
  isErrorMessage: (msg: MaChatbotMessage) => boolean;
41
43
  sendMessage: () => Promise<void>;
42
44
  stopStream: () => void;
45
+ resetChat: () => void;
43
46
  handlePromptSelect: (prompt: MaChatbotSuggestedPrompt) => void;
44
47
  };
45
48
  export {};
@@ -19,6 +19,7 @@ declare const __VLS_component: import("vue").DefineComponent<MaChatbotProps, {
19
19
  messages: import("vue").Ref<MaChatbotMessage[]>;
20
20
  sendMessage: () => Promise<void>;
21
21
  stopStream: () => void;
22
+ resetChat: () => void;
22
23
  isBusy: import("vue").ComputedRef<boolean>;
23
24
  error: import("vue").DeepReadonly<import("vue").Ref<string | null>>;
24
25
  showFeedbackPanel: import("vue").Ref<boolean>;
@@ -14,7 +14,7 @@ export declare const MaChatbotSymbol: InjectionKey<MaChatbotInstance>;
14
14
  * ```ts
15
15
  * app.use(createMaChatbot({
16
16
  * agentApiUrl: import.meta.env.VITE_CHATBOT_API_URL,
17
- * getAccessToken: () => store.accessToken,
17
+ * getAccessToken: async () => tokenManager.ensureValidAccessToken(70_000),
18
18
  * }))
19
19
  * ```
20
20
  */
@@ -2,9 +2,7 @@ import type { ComputedRef, DeepReadonly, Ref } from 'vue';
2
2
  export interface MaChatbotPluginOptions {
3
3
  agentApiUrl: string;
4
4
  gatewayUrl: string;
5
- getAccessToken: () => string;
6
- refreshToken?: () => Promise<void>;
7
- isTokenExpiring: () => boolean;
5
+ getAccessToken: () => Promise<string | null | undefined>;
8
6
  onAuthError?: (error: Error) => void;
9
7
  }
10
8
  export type MaChatbotFeedbackTopic = string;
@@ -14,6 +12,7 @@ export interface MaChatbotMessage {
14
12
  id: string;
15
13
  role: MaChatbotMessageRole;
16
14
  content: string;
15
+ reasoning?: string;
17
16
  timestamp?: Date;
18
17
  status?: MaChatbotMessageStatus;
19
18
  recordId?: number;
@@ -27,7 +26,7 @@ export interface FeedbackSubmitPayload {
27
26
  text: string;
28
27
  }
29
28
  export type MaChatbotSuggestedPrompt = string;
30
- export type MaChatbotEventType = 'model_id' | 'model_params' | 'agent_response' | 'guardrail_violation' | 'error' | 'request_time' | 'usage';
29
+ export type MaChatbotEventType = 'model_id' | 'model_params' | 'agent_response' | 'agent_reasoning' | 'guardrail_violation' | 'error' | 'request_time' | 'usage';
31
30
  export interface MaChatbotStreamEvent {
32
31
  type: MaChatbotEventType;
33
32
  data: unknown;
@@ -51,6 +50,7 @@ export interface SendMessageOptions {
51
50
  prompt: string;
52
51
  maOrgId?: string;
53
52
  onToken?: (token: string) => void;
53
+ onAgentReasoning?: (chunk: string) => void;
54
54
  onDone?: () => void;
55
55
  onError?: (errorMessage: string) => void;
56
56
  onGuardrailViolation?: (violation: MaChatbotGuardrailViolation) => void;
@@ -86,16 +86,18 @@ export interface MaChatbotInstance {
86
86
  isLoading: DeepReadonly<Ref<boolean>>;
87
87
  error: DeepReadonly<Ref<string | null>>;
88
88
  guardrailViolation: DeepReadonly<Ref<MaChatbotGuardrailViolation | null>>;
89
- sessionId: string;
89
+ sessionId: Ref<string>;
90
90
  sendMessage: (options: SendMessageOptions) => Promise<MaChatbotStreamMetadata>;
91
91
  stopStream: () => void;
92
+ resetSession: () => void;
92
93
  logSession: (userInput: string, aiResponse: string, model: string, inputTokenUsage: number, outputTokenUsage: number, requestTime: number, inputCreatedAt: Date, outputCreatedAt: Date) => Promise<number | null>;
93
- submitFeedback: (recordId: number, isPositive: boolean, feedbackTopic?: string, feedbackText?: string) => Promise<boolean>;
94
+ submitFeedback: (recordId: number, isPositive: boolean | null, feedbackTopic?: string, feedbackText?: string) => Promise<boolean>;
94
95
  }
95
96
  export interface MaChatbotExposed {
96
97
  messages: Ref<MaChatbotMessage[]>;
97
98
  sendMessage: () => Promise<void>;
98
99
  stopStream: () => void;
100
+ resetChat: () => void;
99
101
  isBusy: ComputedRef<boolean>;
100
102
  error: DeepReadonly<Ref<string | null>>;
101
103
  showFeedbackPanel: Ref<boolean>;
@@ -52,6 +52,7 @@ export declare const defaultOptions: {
52
52
  getPromptStarters: string;
53
53
  hidePrompts: string;
54
54
  feedbackTopics: string[];
55
+ reasoningLabel: string;
55
56
  };
56
57
  };
57
58
  };
@@ -1,4 +1,4 @@
1
- import { g as We } from "./index--swt3JBY.js";
1
+ import { g as We } from "./index-5f6FpdEx.js";
2
2
  function Ge(G, ie) {
3
3
  for (var F = 0; F < ie.length; F++) {
4
4
  const H = ie[F];
@@ -1,4 +1,4 @@
1
- import { g as $t } from "./index--swt3JBY.js";
1
+ import { g as $t } from "./index-5f6FpdEx.js";
2
2
  function Gt(j, z) {
3
3
  for (var k = 0; k < z.length; k++) {
4
4
  const F = z[k];
@@ -1,4 +1,4 @@
1
- import { g as je } from "./index--swt3JBY.js";
1
+ import { g as je } from "./index-5f6FpdEx.js";
2
2
  function He($, J) {
3
3
  for (var W = 0; W < J.length; W++) {
4
4
  const m = J[W];