@helpai/elements 1.12.2 → 1.12.3

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/llms.txt CHANGED
@@ -1,11 +1,11 @@
1
1
  # Help AI Elements
2
2
 
3
- > Help AI's AI chat widget for any website: an AI agent that answers visitors from the customer's own help content, can hand the chat to a person, and shows Help articles and News. Install it with one script tag, the `<web-ai-chat>` element, the npm API or the React kit. These docs match @helpai/elements@1.12.2.
3
+ > Help AI's AI chat widget for any website: an AI agent that answers visitors from the customer's own help content, can hand the chat to a person, and shows Help articles and News. Install it with one script tag, the `<web-ai-chat>` element, the npm API or the React kit. These docs match @helpai/elements@1.12.3.
4
4
 
5
5
  What a coding agent needs to install it right the first time:
6
6
 
7
7
  - Two values come from the deployment's Install page in the Help AI dashboard: the public key (`agent_pk_…`) and the AI agent deployment id (a UUID). Both belong in browser code. The deployment's secret key never does.
8
- - Plain HTML, WordPress or any CMS: `<script src="https://cdn.help.ai/sdk/js/elements/1.12.2/elements.js" data-public-key="agent_pk_…" data-ai-agent-deployment-id="…" defer></script>`.
8
+ - Plain HTML, WordPress or any CMS: `<script src="https://cdn.help.ai/sdk/js/elements/1.12.3/elements.js" data-public-key="agent_pk_…" data-ai-agent-deployment-id="…" defer></script>`.
9
9
  - React, Next.js, Remix: install `@helpai/elements` and render `<HelpAI publicKey="…" aiAgentDeploymentId="…" />` from `@helpai/elements/react` once, in the root layout. `useHelpAI()` in any component returns `{ state, ask, open, close, reset }`. It is server-render safe; import everything from `@helpai/elements/react`.
10
10
  - Vue, Svelte, Angular and other bundlers: `import '@helpai/elements/web-component'`, then `<web-ai-chat public-key="…" ai-agent-deployment-id="…"></web-ai-chat>`. JSX typings: `@helpai/elements/jsx/react`, `/jsx/vue`, `/jsx/svelte`.
11
11
  - Site buttons need no JavaScript: `data-helpai-ask="Which plan fits a team of 10?"` puts the question in the chat, `data-helpai-open="help"` opens a tab (`home`, `chats`, `help`, `news`). In code, `ask(text)` fills the composer and sends only with `{ send: true }`.
@@ -18,23 +18,23 @@ What a coding agent needs to install it right the first time:
18
18
 
19
19
  ## Docs
20
20
 
21
- - [Quickstart](https://cdn.help.ai/sdk/js/elements/1.12.2/docs/quickstart.md): credentials, the install paths and a first check, in five minutes
22
- - [Installation](https://cdn.help.ai/sdk/js/elements/1.12.2/docs/installation.md): every install path in depth: script tag, async loader, npm, web component, CDN URLs and version pinning
23
- - [Frameworks](https://cdn.help.ai/sdk/js/elements/1.12.2/docs/frameworks.md): the React kit (`<HelpAI />`, `useHelpAI()`), Next.js, Remix, Vue, Nuxt, Svelte, Astro, Angular, WordPress, Shopify, Webflow
24
- - [Configuration](https://cdn.help.ai/sdk/js/elements/1.12.2/docs/configuration.md): every option by group, with examples
25
- - [Option reference](https://cdn.help.ai/sdk/js/elements/1.12.2/docs/options.md): the table of every option, generated from the schemas; authoritative
26
- - [API reference](https://cdn.help.ai/sdk/js/elements/1.12.2/docs/api-reference.md): exports, instance methods (`ask`, `open`, `state`, `ready`, `reset`, …), the global API, no-script triggers, deep links, JSX typings
27
- - [Events and hooks](https://cdn.help.ai/sdk/js/elements/1.12.2/docs/events-and-hooks.md): every event and its payload, `on()` and `hook()`
28
- - [Page tools](https://cdn.help.ai/sdk/js/elements/1.12.2/docs/page-tools.md): WebMCP-shaped tools the AI agent calls on your page (`registerTool`, `tools`, `useHelpAITool`, `<form toolname>`), run once in the browser
29
- - [Theming](https://cdn.help.ai/sdk/js/elements/1.12.2/docs/theming.md): colors, shapes, fonts, launcher styles, `theme: "host"` and `::part()` styling
30
- - [Recipes](https://cdn.help.ai/sdk/js/elements/1.12.2/docs/recipes.md): copy-paste solutions for common integrations
31
- - [Analytics](https://cdn.help.ai/sdk/js/elements/1.12.2/docs/analytics.md): sending widget activity to Google Analytics, Segment, PostHog and other trackers
32
- - [Security and privacy](https://cdn.help.ai/sdk/js/elements/1.12.2/docs/security-privacy.md): isolation, CSP, what the widget stores and sends
33
- - [Browser support](https://cdn.help.ai/sdk/js/elements/1.12.2/docs/browser-support.md): supported browsers and fallbacks
34
- - [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.12.2/docs/troubleshooting.md): an install that does not show, connect or answer
35
- - [FAQ](https://cdn.help.ai/sdk/js/elements/1.12.2/docs/faq.md): short answers to common questions
36
- - [Overview](https://cdn.help.ai/sdk/js/elements/1.12.2/docs/README.md): the whole SDK on one page
21
+ - [Quickstart](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/quickstart.md): credentials, the install paths and a first check, in five minutes
22
+ - [Installation](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/installation.md): every install path in depth: script tag, async loader, npm, web component, CDN URLs and version pinning
23
+ - [Frameworks](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/frameworks.md): the React kit (`<HelpAI />`, `useHelpAI()`), Next.js, Remix, Vue, Nuxt, Svelte, Astro, Angular, WordPress, Shopify, Webflow
24
+ - [Configuration](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/configuration.md): every option by group, with examples
25
+ - [Option reference](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/options.md): the table of every option, generated from the schemas; authoritative
26
+ - [API reference](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/api-reference.md): exports, instance methods (`ask`, `open`, `state`, `ready`, `reset`, …), the global API, no-script triggers, deep links, JSX typings
27
+ - [Events and hooks](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/events-and-hooks.md): every event and its payload, `on()` and `hook()`
28
+ - [Page tools](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/page-tools.md): WebMCP-shaped tools the AI agent calls on your page (`registerTool`, `tools`, `useHelpAITool`, `<form toolname>`), run once in the browser
29
+ - [Theming](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/theming.md): colors, shapes, fonts, launcher styles, `theme: "host"` and `::part()` styling
30
+ - [Recipes](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/recipes.md): copy-paste solutions for common integrations
31
+ - [Analytics](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/analytics.md): sending widget activity to Google Analytics, Segment, PostHog and other trackers
32
+ - [Security and privacy](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/security-privacy.md): isolation, CSP, what the widget stores and sends
33
+ - [Browser support](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/browser-support.md): supported browsers and fallbacks
34
+ - [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/troubleshooting.md): an install that does not show, connect or answer
35
+ - [FAQ](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/faq.md): short answers to common questions
36
+ - [Overview](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/README.md): the whole SDK on one page
37
37
 
38
38
  ## Optional
39
39
 
40
- - [Every doc in one file](https://cdn.help.ai/sdk/js/elements/1.12.2/llms-full.txt): the docs above, concatenated
40
+ - [Every doc in one file](https://cdn.help.ai/sdk/js/elements/1.12.3/llms-full.txt): the docs above, concatenated
package/package.json CHANGED
@@ -117,5 +117,5 @@
117
117
  ],
118
118
  "type": "module",
119
119
  "types": "./index.d.ts",
120
- "version": "1.12.2"
120
+ "version": "1.12.3"
121
121
  }
package/react.d.ts CHANGED
@@ -712,6 +712,14 @@ interface BehaviorOptions {
712
712
  interface HeaderOptions {
713
713
  actions?: ActionList;
714
714
  }
715
+ /**
716
+ * Section: Keep conversations — the deployment's history switch, pushed on the
717
+ * handshake as `config.history`.
718
+ */
719
+ interface HistoryOptions {
720
+ /** `false` hides the history button and never lists past conversations. Default `true`. */
721
+ enabled?: boolean;
722
+ }
715
723
  /**
716
724
  * Section: locale resolution + per-instance string overrides.
717
725
  *
@@ -1001,6 +1009,8 @@ interface ChatWidgetOptions {
1001
1009
  modules?: ModulesOptions;
1002
1010
  /** Anonymous owner-facing usage tracking (pixel hits). Server-pushable. */
1003
1011
  tracking?: TrackingOptions;
1012
+ /** Keep conversations. Server-pushed from the deployment's setting. */
1013
+ history?: HistoryOptions;
1004
1014
  /**
1005
1015
  * Custom client-side storage adapter. Implements the {@link ClientStorage}
1006
1016
  * interface (`get` / `set` / `remove` / `clear`).
@@ -1128,6 +1138,8 @@ interface ResolvedOptions {
1128
1138
  modules: ResolvedModules;
1129
1139
  /** Resolved anonymous usage tracking. */
1130
1140
  tracking: ResolvedTracking;
1141
+ /** Keep conversations. Off: no history button and no conversation list requests. */
1142
+ history: Required<HistoryOptions>;
1131
1143
  /** Resolved storage adapter — defaults to `LocalStorageAdapter`. */
1132
1144
  storage: ClientStorage;
1133
1145
  userToken?: UserTokenSource;
@@ -2554,6 +2566,8 @@ type ConnectionConfigPartial = z.infer<typeof connectionConfigPartialSchema>;
2554
2566
  * embed attribute / `init` option). Bumping it folds a `.v<version>` segment
2555
2567
  * into every client-storage key on the next load, abandoning the prior
2556
2568
  * namespace for all visitors.
2569
+ * - `history` is pushable — the deployment's Keep conversations setting, which the
2570
+ * dashboard edits outside the widget settings.
2557
2571
  */
2558
2572
  declare const serverConfigSchema: z.ZodObject<{
2559
2573
  presentation: z.ZodOptional<z.ZodOptional<z.ZodObject<{
@@ -2781,6 +2795,9 @@ declare const serverConfigSchema: z.ZodObject<{
2781
2795
  }, z.core.$loose>>>;
2782
2796
  dataApiBaseUrl: z.ZodOptional<z.ZodString>;
2783
2797
  storageVersion: z.ZodOptional<z.ZodString>;
2798
+ history: z.ZodOptional<z.ZodObject<{
2799
+ enabled: z.ZodOptional<z.ZodBoolean>;
2800
+ }, z.core.$loose>>;
2784
2801
  }, z.core.$loose>;
2785
2802
  type ServerConfig = z.infer<typeof serverConfigSchema>;
2786
2803
  /**
@@ -3076,6 +3093,9 @@ declare const handshakeResponseSchema: z.ZodObject<{
3076
3093
  }, z.core.$loose>>>;
3077
3094
  dataApiBaseUrl: z.ZodOptional<z.ZodString>;
3078
3095
  storageVersion: z.ZodOptional<z.ZodString>;
3096
+ history: z.ZodOptional<z.ZodObject<{
3097
+ enabled: z.ZodOptional<z.ZodBoolean>;
3098
+ }, z.core.$loose>>;
3079
3099
  }, z.core.$loose>>;
3080
3100
  site: z.ZodOptional<z.ZodObject<{
3081
3101
  title: z.ZodOptional<z.ZodString>;