@gram-ai/elements 1.26.0 → 1.27.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.
Files changed (92) hide show
  1. package/README.md +83 -15
  2. package/dist/components/Chat/stories/ConnectionConfiguration.stories.d.ts +1 -1
  3. package/dist/components/ui/calendar.d.ts +25 -0
  4. package/dist/components/ui/time-range-picker.d.ts +46 -0
  5. package/dist/components/ui/time-range-picker.stories.d.ts +37 -0
  6. package/dist/components/ui/tool-ui.d.ts +16 -1
  7. package/dist/core-Cqad6-xW.js +36 -0
  8. package/dist/core-Cqad6-xW.js.map +1 -0
  9. package/dist/core-DBxmxwCi.cjs +2 -0
  10. package/dist/core-DBxmxwCi.cjs.map +1 -0
  11. package/dist/elements.cjs +1 -1
  12. package/dist/elements.css +1 -1
  13. package/dist/elements.js +18 -14
  14. package/dist/hooks/useModel.d.ts +2 -0
  15. package/dist/index-CP-wWZCV.cjs +172 -0
  16. package/dist/index-CP-wWZCV.cjs.map +1 -0
  17. package/dist/{index-BJnv49-A.js → index-oO5BAmPI.js} +12667 -12048
  18. package/dist/index-oO5BAmPI.js.map +1 -0
  19. package/dist/index.d.ts +5 -1
  20. package/dist/lib/auth.d.ts +12 -4
  21. package/dist/lib/models.d.ts +1 -1
  22. package/dist/{profiler-DCWYDZ1F.cjs → profiler-CEpc7O5Q.cjs} +2 -2
  23. package/dist/{profiler-DCWYDZ1F.cjs.map → profiler-CEpc7O5Q.cjs.map} +1 -1
  24. package/dist/{profiler-D4Tw5ecI.js → profiler-ECh1zoXF.js} +2 -2
  25. package/dist/{profiler-D4Tw5ecI.js.map → profiler-ECh1zoXF.js.map} +1 -1
  26. package/dist/server/bun.cjs +2 -0
  27. package/dist/server/bun.cjs.map +1 -0
  28. package/dist/server/bun.d.ts +8 -0
  29. package/dist/server/bun.js +26 -0
  30. package/dist/server/bun.js.map +1 -0
  31. package/dist/server/core.d.ts +37 -0
  32. package/dist/server/express.cjs +2 -0
  33. package/dist/server/express.cjs.map +1 -0
  34. package/dist/server/express.d.ts +9 -0
  35. package/dist/server/express.js +21 -0
  36. package/dist/server/express.js.map +1 -0
  37. package/dist/server/fastify.cjs +2 -0
  38. package/dist/server/fastify.cjs.map +1 -0
  39. package/dist/server/fastify.d.ts +9 -0
  40. package/dist/server/fastify.js +19 -0
  41. package/dist/server/fastify.js.map +1 -0
  42. package/dist/server/hono.cjs +2 -0
  43. package/dist/server/hono.cjs.map +1 -0
  44. package/dist/server/hono.d.ts +9 -0
  45. package/dist/server/hono.js +20 -0
  46. package/dist/server/hono.js.map +1 -0
  47. package/dist/server/nextjs.cjs +2 -0
  48. package/dist/server/nextjs.cjs.map +1 -0
  49. package/dist/server/nextjs.d.ts +8 -0
  50. package/dist/server/nextjs.js +26 -0
  51. package/dist/server/nextjs.js.map +1 -0
  52. package/dist/server/tanstack-start.cjs +2 -0
  53. package/dist/server/tanstack-start.cjs.map +1 -0
  54. package/dist/server/tanstack-start.d.ts +25 -0
  55. package/dist/server/tanstack-start.js +39 -0
  56. package/dist/server/tanstack-start.js.map +1 -0
  57. package/dist/server.cjs +1 -1
  58. package/dist/server.cjs.map +1 -1
  59. package/dist/server.d.ts +10 -16
  60. package/dist/server.js +22 -29
  61. package/dist/server.js.map +1 -1
  62. package/dist/{startRecording-BHhcCWQE.js → startRecording-CmZjjJoz.js} +2 -2
  63. package/dist/{startRecording-BHhcCWQE.js.map → startRecording-CmZjjJoz.js.map} +1 -1
  64. package/dist/{startRecording-3sTskM3H.cjs → startRecording-qDCAu4Q0.cjs} +2 -2
  65. package/dist/{startRecording-3sTskM3H.cjs.map → startRecording-qDCAu4Q0.cjs.map} +1 -1
  66. package/dist/types/index.d.ts +22 -10
  67. package/package.json +63 -3
  68. package/src/components/Chat/stories/ConnectionConfiguration.stories.tsx +6 -8
  69. package/src/components/assistant-ui/thread.tsx +8 -14
  70. package/src/components/ui/calendar.tsx +262 -0
  71. package/src/components/ui/time-range-picker.stories.tsx +249 -0
  72. package/src/components/ui/time-range-picker.tsx +675 -0
  73. package/src/components/ui/tool-ui.tsx +31 -2
  74. package/src/hooks/useAuth.ts +59 -7
  75. package/src/hooks/useFollowOnSuggestions.ts +7 -14
  76. package/src/hooks/useModel.ts +30 -0
  77. package/src/index.ts +17 -0
  78. package/src/lib/api.test.ts +4 -4
  79. package/src/lib/auth.ts +34 -4
  80. package/src/lib/models.ts +1 -0
  81. package/src/server/bun.ts +63 -0
  82. package/src/server/core.ts +84 -0
  83. package/src/server/express.ts +60 -0
  84. package/src/server/fastify.ts +61 -0
  85. package/src/server/hono.ts +55 -0
  86. package/src/server/nextjs.ts +58 -0
  87. package/src/server/tanstack-start.ts +110 -0
  88. package/src/server.ts +37 -49
  89. package/src/types/index.ts +25 -9
  90. package/dist/index-BJnv49-A.js.map +0 -1
  91. package/dist/index-ChW-CSuu.cjs +0 -147
  92. package/dist/index-ChW-CSuu.cjs.map +0 -1
package/README.md CHANGED
@@ -43,36 +43,104 @@ pnpm add @gram-ai/elements
43
43
 
44
44
  ## Setting up your backend
45
45
 
46
- At the moment, we provide a set of handlers via the `@gram-ai/elements/server` package that you can use to automatically setup your backend for usage with Gram Elements. The example below demonstrates the setup for Express:
46
+ We provide framework-specific adapters to make it easy to set up a backend endpoint for Gram Elements. These adapters handle the session token creation securely on your server without exposing your `GRAM_API_KEY` to the browser.
47
+
48
+ ### Express
47
49
 
48
50
  ```typescript
49
- import { createElementsServerHandlers } from '@gram-ai/elements/server'
51
+ import { createExpressHandler } from '@gram-ai/elements/server/express'
50
52
  import express from 'express'
51
53
 
52
- const handlers = createElementsServerHandlers()
53
54
  const app = express()
54
-
55
55
  app.use(express.json())
56
56
 
57
- app.post('/chat/session', (req, res) =>
58
- handlers.session(req, res, {
59
- // The origin from which the token will be used
60
- embedOrigin: 'http://localhost:3000',
61
- // A free-form user identifier
62
- userIdentifier: 'user-123',
63
- // Token expiration in seconds (max / default 3600)
57
+ app.post('/chat/session', createExpressHandler({
58
+ embedOrigin: 'http://localhost:3000',
59
+ userIdentifier: 'user-123',
60
+ expiresAfter: 3600, // optional, max 3600 seconds
61
+ }))
62
+
63
+ app.listen(3000)
64
+ ```
65
+
66
+ For dynamic options based on the request:
67
+
68
+ ```typescript
69
+ app.post('/chat/session', createExpressHandler((req) => ({
70
+ embedOrigin: req.headers.origin || 'http://localhost:3000',
71
+ userIdentifier: req.user?.id || 'anonymous',
72
+ expiresAfter: 3600,
73
+ })))
74
+ ```
75
+
76
+ ### Next.js App Router
77
+
78
+ ```typescript
79
+ // app/chat/session/route.ts
80
+ import { createNextHandler } from '@gram-ai/elements/server/nextjs'
81
+
82
+ export const POST = createNextHandler({
83
+ embedOrigin: 'http://localhost:3000',
84
+ userIdentifier: 'user-123',
85
+ expiresAfter: 3600,
86
+ })
87
+ import { cookies } from 'next/headers'
88
+
89
+ export const POST = createNextHandler(async (request) => {
90
+ const cookieStore = await cookies()
91
+ const userId = cookieStore.get('userId')?.value || 'anonymous'
92
+
93
+ return {
94
+ embedOrigin: request.headers.get('origin') || 'http://localhost:3000',
95
+ userIdentifier: userId,
64
96
  expiresAfter: 3600,
65
- })
66
- )
97
+ }
98
+ })
99
+ ```
100
+
101
+ ### Fastify
102
+
103
+ ```typescript
104
+ import { createFastifyHandler } from '@gram-ai/elements/server/fastify'
105
+ import Fastify from 'fastify'
106
+
107
+ const fastify = Fastify()
108
+
109
+ fastify.post('/chat/session', createFastifyHandler({
110
+ embedOrigin: 'http://localhost:3000',
111
+ userIdentifier: 'user-123',
112
+ expiresAfter: 3600,
113
+ }))
114
+
115
+ fastify.listen({ port: 3000 })
67
116
  ```
68
117
 
69
- You will need to add an environment variable to your backend and make it available to the process:
118
+ ### Hono
70
119
 
120
+ ```typescript
121
+ import { createHonoHandler } from '@gram-ai/elements/server/hono'
122
+ import { Hono } from 'hono'
123
+
124
+ const app = new Hono()
125
+
126
+ app.post('/chat/session', createHonoHandler({
127
+ embedOrigin: 'http://localhost:3000',
128
+ userIdentifier: 'user-123',
129
+ expiresAfter: 3600,
130
+ }))
131
+
132
+ export default app
71
133
  ```
134
+
135
+ ### Environment Variables
136
+
137
+ All adapters require the `GRAM_API_KEY` environment variable to be set:
138
+
139
+ ```bash
72
140
  GRAM_API_KEY=xxx
73
141
  ```
74
142
 
75
- This will enable your backend chat endpoint to talk to our servers securely.
143
+ This key is kept on your server and never exposed to the browser, ensuring secure communication with Gram's API.
76
144
 
77
145
  ## Setting up your frontend
78
146
 
@@ -6,5 +6,5 @@ type Story = StoryFn<typeof Chat>;
6
6
  export declare const SystemPrompt: Story;
7
7
  export declare const WithImplicitSessionAuth: Story;
8
8
  export declare const WithExplicitSessionAuth: Story;
9
- export declare const WithStaticSessionAuth: Story;
9
+ export declare const WithDangerousApiKey: Story;
10
10
  export declare const LanguageModel: Story;
@@ -0,0 +1,25 @@
1
+ export interface CalendarProps {
2
+ /** Selected date range */
3
+ selected?: {
4
+ start: Date | null;
5
+ end: Date | null;
6
+ };
7
+ /** Called when a date or range is selected */
8
+ onSelect?: (range: {
9
+ start: Date;
10
+ end: Date | null;
11
+ }) => void;
12
+ /** Whether range selection is enabled */
13
+ mode?: 'single' | 'range';
14
+ /** Disable dates before this */
15
+ minDate?: Date;
16
+ /** Disable dates after this */
17
+ maxDate?: Date;
18
+ /** Additional className */
19
+ className?: string;
20
+ }
21
+ declare function Calendar({ selected, onSelect, mode, minDate, maxDate, className, }: CalendarProps): import("react/jsx-runtime").JSX.Element;
22
+ declare namespace Calendar {
23
+ var displayName: string;
24
+ }
25
+ export { Calendar };
@@ -0,0 +1,46 @@
1
+ export interface TimeRange {
2
+ from: Date;
3
+ to: Date;
4
+ }
5
+ export type DateRangePreset = '15m' | '1h' | '4h' | '1d' | '2d' | '3d' | '7d' | '15d' | '30d' | '90d';
6
+ export interface TimeRangePreset {
7
+ label: string;
8
+ shortLabel: string;
9
+ value: DateRangePreset;
10
+ getRange: () => TimeRange;
11
+ }
12
+ export declare const PRESETS: TimeRangePreset[];
13
+ export declare function getPresetRange(preset: DateRangePreset): TimeRange;
14
+ export interface TimeRangePickerProps {
15
+ /** Current preset value */
16
+ preset?: DateRangePreset | null;
17
+ /** Current custom range */
18
+ customRange?: TimeRange | null;
19
+ /** Called when a preset is selected */
20
+ onPresetChange?: (preset: DateRangePreset) => void;
21
+ /** Called when a custom range is selected */
22
+ onCustomRangeChange?: (from: Date, to: Date, label?: string) => void;
23
+ /** Called to clear custom range */
24
+ onClearCustomRange?: () => void;
25
+ /** Initial label for custom range (from URL params) */
26
+ customRangeLabel?: string | null;
27
+ /** Show LIVE mode option */
28
+ showLive?: boolean;
29
+ /** Is LIVE mode active */
30
+ isLive?: boolean;
31
+ /** Called when LIVE mode changes */
32
+ onLiveChange?: (isLive: boolean) => void;
33
+ /** Disabled state */
34
+ disabled?: boolean;
35
+ /** Timezone display (e.g., "UTC-08:00") */
36
+ timezone?: string;
37
+ /** API URL for AI parsing (defaults to window.location.origin) */
38
+ apiUrl?: string;
39
+ /** Project slug for API authentication */
40
+ projectSlug?: string;
41
+ }
42
+ declare function TimeRangePicker({ preset, customRange, onPresetChange, onCustomRangeChange, onClearCustomRange, customRangeLabel: initialCustomLabel, showLive, isLive, onLiveChange, disabled, timezone, apiUrl, projectSlug, }: TimeRangePickerProps): import("react/jsx-runtime").JSX.Element;
43
+ declare namespace TimeRangePicker {
44
+ var displayName: string;
45
+ }
46
+ export { TimeRangePicker };
@@ -0,0 +1,37 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { TimeRangePicker } from './time-range-picker';
3
+ declare const meta: Meta<typeof TimeRangePicker>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof TimeRangePicker>;
6
+ /**
7
+ * Default time range picker with preset badges and calendar.
8
+ * Supports natural language input with AI parsing.
9
+ */
10
+ export declare const Default: Story;
11
+ /**
12
+ * Time range picker with timezone indicator.
13
+ */
14
+ export declare const WithTimezone: Story;
15
+ /**
16
+ * With LIVE mode toggle enabled.
17
+ */
18
+ export declare const WithLiveMode: Story;
19
+ /**
20
+ * Disabled state.
21
+ */
22
+ export declare const Disabled: Story;
23
+ /**
24
+ * Full Datadog-style configuration with all features.
25
+ * Type natural language like "3 days ago", "last Wednesday", "past 2 weeks".
26
+ */
27
+ export declare const DatadogStyle: Story;
28
+ /**
29
+ * Natural language parsing demo.
30
+ * Type things like:
31
+ * - "yesterday"
32
+ * - "3 days ago"
33
+ * - "last Wednesday"
34
+ * - "past 2 weeks"
35
+ * - "January 2024"
36
+ */
37
+ export declare const NaturalLanguageParsing: Story;
@@ -14,6 +14,19 @@ type ContentItem = {
14
14
  'getgram.ai/mime-type'?: string;
15
15
  };
16
16
  };
17
+ /** MCP tool annotations providing hints about tool behavior */
18
+ interface ToolAnnotations {
19
+ /** Human-readable display name for the tool */
20
+ title?: string;
21
+ /** If true, the tool does not modify its environment */
22
+ readOnlyHint?: boolean;
23
+ /** If true, the tool may perform destructive updates */
24
+ destructiveHint?: boolean;
25
+ /** If true, repeated calls with same args have no additional effect */
26
+ idempotentHint?: boolean;
27
+ /** If true, tool interacts with external entities */
28
+ openWorldHint?: boolean;
29
+ }
17
30
  interface ToolUIProps {
18
31
  /** Display name of the tool */
19
32
  name: string;
@@ -33,6 +46,8 @@ interface ToolUIProps {
33
46
  defaultExpanded?: boolean;
34
47
  /** Additional class names */
35
48
  className?: string;
49
+ /** MCP tool annotations */
50
+ annotations?: ToolAnnotations;
36
51
  /** Approval callbacks */
37
52
  onApproveOnce?: () => void;
38
53
  onApproveForSession?: () => void;
@@ -64,7 +79,7 @@ declare function SyntaxHighlightedCode({ text, language, className, }: {
64
79
  className?: string;
65
80
  }): import("react/jsx-runtime").JSX.Element;
66
81
  declare function ToolUISection({ title, content, defaultExpanded, highlightSyntax, language, }: ToolUISectionProps): import("react/jsx-runtime").JSX.Element;
67
- declare function ToolUI({ name, icon, provider, status, request, result, defaultExpanded, className, onApproveOnce, onApproveForSession, onDeny, }: ToolUIProps): import("react/jsx-runtime").JSX.Element;
82
+ declare function ToolUI({ name, icon, provider, status, request, result, defaultExpanded, className, annotations, onApproveOnce, onApproveForSession, onDeny, }: ToolUIProps): import("react/jsx-runtime").JSX.Element;
68
83
  interface ToolUIGroupProps {
69
84
  /** Title for the group header */
70
85
  title: string;
@@ -0,0 +1,36 @@
1
+ async function r(t) {
2
+ const s = process.env.GRAM_API_URL ?? "https://app.getgram.ai";
3
+ try {
4
+ const e = await fetch(s + "/rpc/chatSessions.create", {
5
+ method: "POST",
6
+ body: JSON.stringify({
7
+ embed_origin: t.options.embedOrigin,
8
+ user_identifier: t.options.userIdentifier,
9
+ expires_after: t.options.expiresAfter
10
+ }),
11
+ headers: {
12
+ "Content-Type": "application/json",
13
+ "Gram-Project": t.projectSlug,
14
+ "Gram-Key": t.options.apiKey ?? process.env.GRAM_API_KEY ?? ""
15
+ }
16
+ }), o = await e.text();
17
+ return {
18
+ status: e.status,
19
+ body: o,
20
+ headers: { "Content-Type": "application/json" }
21
+ };
22
+ } catch (e) {
23
+ const o = e instanceof Error ? e.message : "Unknown error";
24
+ return console.error("Failed to create chat session:", e), {
25
+ status: 500,
26
+ body: JSON.stringify({
27
+ error: "Failed to create chat session: " + o
28
+ }),
29
+ headers: { "Content-Type": "application/json" }
30
+ };
31
+ }
32
+ }
33
+ export {
34
+ r as c
35
+ };
36
+ //# sourceMappingURL=core-Cqad6-xW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core-Cqad6-xW.js","sources":["../src/server/core.ts"],"sourcesContent":null,"names":["createChatSession","request","base","response","body","error","errorMessage"],"mappings":"AA2CA,eAAsBA,EACpBC,GACgC;AAChC,QAAMC,IAAO,QAAQ,IAAI,gBAAgB;AAEzC,MAAI;AACF,UAAMC,IAAW,MAAM,MAAMD,IAAO,4BAA4B;AAAA,MAC9D,QAAQ;AAAA,MACR,MAAM,KAAK,UAAU;AAAA,QACnB,cAAcD,EAAQ,QAAQ;AAAA,QAC9B,iBAAiBA,EAAQ,QAAQ;AAAA,QACjC,eAAeA,EAAQ,QAAQ;AAAA,MAAA,CAChC;AAAA,MACD,SAAS;AAAA,QACP,gBAAgB;AAAA,QAChB,gBAAgBA,EAAQ;AAAA,QACxB,YAAYA,EAAQ,QAAQ,UAAU,QAAQ,IAAI,gBAAgB;AAAA,MAAA;AAAA,IACpE,CACD,GAEKG,IAAO,MAAMD,EAAS,KAAA;AAE5B,WAAO;AAAA,MACL,QAAQA,EAAS;AAAA,MACjB,MAAAC;AAAA,MACA,SAAS,EAAE,gBAAgB,mBAAA;AAAA,IAAmB;AAAA,EAElD,SAASC,GAAO;AACd,UAAMC,IACJD,aAAiB,QAAQA,EAAM,UAAU;AAC3C,mBAAQ,MAAM,kCAAkCA,CAAK,GAE9C;AAAA,MACL,QAAQ;AAAA,MACR,MAAM,KAAK,UAAU;AAAA,QACnB,OAAO,oCAAoCC;AAAA,MAAA,CAC5C;AAAA,MACD,SAAS,EAAE,gBAAgB,mBAAA;AAAA,IAAmB;AAAA,EAElD;AACF;"}
@@ -0,0 +1,2 @@
1
+ "use strict";async function r(t){const o=process.env.GRAM_API_URL??"https://app.getgram.ai";try{const e=await fetch(o+"/rpc/chatSessions.create",{method:"POST",body:JSON.stringify({embed_origin:t.options.embedOrigin,user_identifier:t.options.userIdentifier,expires_after:t.options.expiresAfter}),headers:{"Content-Type":"application/json","Gram-Project":t.projectSlug,"Gram-Key":t.options.apiKey??process.env.GRAM_API_KEY??""}}),s=await e.text();return{status:e.status,body:s,headers:{"Content-Type":"application/json"}}}catch(e){const s=e instanceof Error?e.message:"Unknown error";return console.error("Failed to create chat session:",e),{status:500,body:JSON.stringify({error:"Failed to create chat session: "+s}),headers:{"Content-Type":"application/json"}}}}exports.createChatSession=r;
2
+ //# sourceMappingURL=core-DBxmxwCi.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core-DBxmxwCi.cjs","sources":["../src/server/core.ts"],"sourcesContent":null,"names":["createChatSession","request","base","response","body","error","errorMessage"],"mappings":"aA2CA,eAAsBA,EACpBC,EACgC,CAChC,MAAMC,EAAO,QAAQ,IAAI,cAAgB,yBAEzC,GAAI,CACF,MAAMC,EAAW,MAAM,MAAMD,EAAO,2BAA4B,CAC9D,OAAQ,OACR,KAAM,KAAK,UAAU,CACnB,aAAcD,EAAQ,QAAQ,YAC9B,gBAAiBA,EAAQ,QAAQ,eACjC,cAAeA,EAAQ,QAAQ,YAAA,CAChC,EACD,QAAS,CACP,eAAgB,mBAChB,eAAgBA,EAAQ,YACxB,WAAYA,EAAQ,QAAQ,QAAU,QAAQ,IAAI,cAAgB,EAAA,CACpE,CACD,EAEKG,EAAO,MAAMD,EAAS,KAAA,EAE5B,MAAO,CACL,OAAQA,EAAS,OACjB,KAAAC,EACA,QAAS,CAAE,eAAgB,kBAAA,CAAmB,CAElD,OAASC,EAAO,CACd,MAAMC,EACJD,aAAiB,MAAQA,EAAM,QAAU,gBAC3C,eAAQ,MAAM,iCAAkCA,CAAK,EAE9C,CACL,OAAQ,IACR,KAAM,KAAK,UAAU,CACnB,MAAO,kCAAoCC,CAAA,CAC5C,EACD,QAAS,CAAE,eAAgB,kBAAA,CAAmB,CAElD,CACF"}
package/dist/elements.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-ChW-CSuu.cjs"),t=require("./index-BpJstUh1.cjs");exports.Chat=e.Chat;exports.ChatHistory=e.ChatHistory;exports.ElementsProvider=e.ElementsProvider;exports.GramElementsProvider=e.ElementsProvider;exports.MODELS=e.MODELS;exports.Replay=e.Replay;exports.ShareButton=e.ShareButton;exports.defineFrontendTool=e.defineFrontendTool;exports.trackError=e.trackError;exports.useRecordCassette=e.useRecordCassette;exports.useThreadId=e.useThreadId;exports.useChatId=t.useChatId;exports.useElements=t.useElements;exports.useGramElements=t.useElements;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CP-wWZCV.cjs"),r=require("./index-BpJstUh1.cjs");exports.Calendar=e.Calendar;exports.Chat=e.Chat;exports.ChatHistory=e.ChatHistory;exports.ElementsProvider=e.ElementsProvider;exports.GramElementsProvider=e.ElementsProvider;exports.MODELS=e.MODELS;exports.PRESETS=e.PRESETS;exports.Replay=e.Replay;exports.ShareButton=e.ShareButton;exports.TimeRangePicker=e.TimeRangePicker;exports.defineFrontendTool=e.defineFrontendTool;exports.getPresetRange=e.getPresetRange;exports.trackError=e.trackError;exports.useRecordCassette=e.useRecordCassette;exports.useThreadId=e.useThreadId;exports.useChatId=r.useChatId;exports.useElements=r.useElements;exports.useGramElements=r.useElements;
2
2
  //# sourceMappingURL=elements.cjs.map