@terryavg/neptune-ai-chatbot 1.0.1 → 1.0.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.
Files changed (74) hide show
  1. package/README.md +116 -1
  2. package/dist/chat-input-2CHIBULE.mjs +510 -0
  3. package/dist/chat-input-42V4ESQB.mjs +478 -0
  4. package/dist/chat-input-4T42R7FR.mjs +481 -0
  5. package/dist/chat-input-BJVIIYOP.mjs +484 -0
  6. package/dist/chat-input-G2LRENLB.mjs +512 -0
  7. package/dist/chat-input-HT47ZLQN.mjs +456 -0
  8. package/dist/chat-input-IIV2HQOZ.mjs +509 -0
  9. package/dist/chat-input-JFGPZBBQ.mjs +495 -0
  10. package/dist/chat-input-JQ7PSHNW.mjs +515 -0
  11. package/dist/chat-input-MLF62KV7.mjs +512 -0
  12. package/dist/chat-input-MOPCNDRR.mjs +517 -0
  13. package/dist/chat-input-TYNO3J5S.mjs +519 -0
  14. package/dist/chat-input-USWVSAYY.mjs +461 -0
  15. package/dist/chat-input-VQZ3WNBT.mjs +509 -0
  16. package/dist/chat-input-VTCTV5ED.mjs +495 -0
  17. package/dist/chat-input-WJMGLQJI.mjs +495 -0
  18. package/dist/chat-input-ZAFYBUO7.mjs +507 -0
  19. package/dist/chat-message-2VQW74CO.mjs +2230 -0
  20. package/dist/chat-message-35ZWSSQV.mjs +1926 -0
  21. package/dist/chat-message-3CUUWTZG.mjs +2429 -0
  22. package/dist/chat-message-3NHSJNKL.mjs +2241 -0
  23. package/dist/chat-message-3Z7B2WYC.mjs +2228 -0
  24. package/dist/chat-message-564AHZHH.mjs +2186 -0
  25. package/dist/chat-message-5QLTW4K7.mjs +2122 -0
  26. package/dist/chat-message-7EH2TDZG.mjs +1910 -0
  27. package/dist/chat-message-7QHJRHQG.mjs +1909 -0
  28. package/dist/chat-message-AAXNH5TF.mjs +2088 -0
  29. package/dist/chat-message-D36YF274.mjs +1910 -0
  30. package/dist/chat-message-DVCXEL4Z.mjs +2111 -0
  31. package/dist/chat-message-E6KB3AST.mjs +1906 -0
  32. package/dist/chat-message-EQTB6N5X.mjs +2306 -0
  33. package/dist/chat-message-G2NWPAXK.mjs +1904 -0
  34. package/dist/chat-message-GUOL4RZU.mjs +2306 -0
  35. package/dist/chat-message-H62Z3DW5.mjs +2368 -0
  36. package/dist/chat-message-HIEZ7B5R.mjs +2190 -0
  37. package/dist/chat-message-HWBFOYOJ.mjs +2306 -0
  38. package/dist/chat-message-I6AKFPK6.mjs +2156 -0
  39. package/dist/chat-message-IKYSAVAB.mjs +1918 -0
  40. package/dist/chat-message-IZL6JHV2.mjs +2429 -0
  41. package/dist/chat-message-J7PVUQO6.mjs +1878 -0
  42. package/dist/chat-message-K6QILTW5.mjs +1897 -0
  43. package/dist/chat-message-MDORLI2R.mjs +2228 -0
  44. package/dist/chat-message-MFUY6KOE.mjs +1910 -0
  45. package/dist/chat-message-MYKOR5OF.mjs +1890 -0
  46. package/dist/chat-message-NKMTAMGG.mjs +1906 -0
  47. package/dist/chat-message-NNGD3FUH.mjs +2168 -0
  48. package/dist/chat-message-NZNZX6VS.mjs +2306 -0
  49. package/dist/chat-message-QAPRO542.mjs +1915 -0
  50. package/dist/chat-message-R4IJ3MXU.mjs +2146 -0
  51. package/dist/chat-message-U7UCBLHI.mjs +2145 -0
  52. package/dist/chat-message-UKXGFKUR.mjs +1903 -0
  53. package/dist/chat-message-UNIBCF3T.mjs +1900 -0
  54. package/dist/chat-message-UXLPL76T.mjs +1890 -0
  55. package/dist/chat-message-VB54UOHB.mjs +2306 -0
  56. package/dist/chat-message-WUNUZLKI.mjs +2228 -0
  57. package/dist/chat-message-WYN5UZRD.mjs +1927 -0
  58. package/dist/chat-message-Y5OJSR2O.mjs +2228 -0
  59. package/dist/chat-message-YPDHL6WW.mjs +2114 -0
  60. package/dist/chunk-26656QB3.mjs +406 -0
  61. package/dist/chunk-2RXQ2EZ2.mjs +295 -0
  62. package/dist/chunk-DVWFDUN4.mjs +407 -0
  63. package/dist/chunk-JLRHY3SB.mjs +405 -0
  64. package/dist/chunk-VONUV37R.mjs +268 -0
  65. package/dist/chunk-XFSEOBLD.mjs +432 -0
  66. package/dist/chunk-XQVUOR36.mjs +438 -0
  67. package/dist/chunk-Y7QF5535.mjs +268 -0
  68. package/dist/index.css +174 -43
  69. package/dist/index.d.mts +214 -2
  70. package/dist/index.d.ts +214 -2
  71. package/dist/index.js +2232 -1839
  72. package/dist/index.mjs +693 -622
  73. package/dist/styles.css +1 -1
  74. package/package.json +2 -1
package/dist/index.d.ts CHANGED
@@ -1,18 +1,221 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
3
 
4
+ /**
5
+ * Configuration for local development debugging
6
+ */
4
7
  interface LocalDebugConfig {
8
+ /** Username for local authentication */
5
9
  username: string;
10
+ /** Password for local authentication */
6
11
  password: string;
12
+ /** Base URL for the local API server */
7
13
  baseUrl: string;
8
14
  }
15
+ /**
16
+ * Props for the NeptuneChatBot component
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * <NeptuneChatBot
21
+ * agentId="your-agent-id"
22
+ * theme="dark"
23
+ * title="My Assistant"
24
+ * messageBubbleColor="#E5E3F8"
25
+ * />
26
+ * ```
27
+ */
9
28
  interface NeptuneChatBotProps {
29
+ /**
30
+ * Unique identifier for the AI agent
31
+ * @required
32
+ */
10
33
  agentId: string;
11
- debug?: boolean;
34
+ /**
35
+ * Color theme for the chat interface
36
+ * @default "light"
37
+ */
12
38
  theme?: "light" | "dark";
39
+ /**
40
+ * Configuration for local development debugging
41
+ */
13
42
  localDebug?: LocalDebugConfig;
43
+ /**
44
+ * Title displayed in the chat header
45
+ * @default "Naia"
46
+ */
47
+ title?: string;
48
+ /**
49
+ * Background color for message bubbles in light mode
50
+ * @default "#E5E3F8"
51
+ * @example "#E5E3F8" or "rgba(229, 227, 248, 1)"
52
+ */
53
+ messageBubbleColor?: string;
54
+ /**
55
+ * Background color for message bubbles in dark mode
56
+ * @default "rgba(168, 140, 250, 0.3)"
57
+ */
58
+ messageBubbleColorDark?: string;
59
+ /**
60
+ * Accent color for buttons and interactive elements in light mode
61
+ * @default "#8B7FD9"
62
+ */
63
+ accentColor?: string;
64
+ /**
65
+ * Accent color for buttons and interactive elements in dark mode
66
+ * @default "#A88CFA"
67
+ */
68
+ accentColorDark?: string;
69
+ /**
70
+ * Color for the scroll-to-bottom button in light mode
71
+ * @default "#6366F1"
72
+ */
73
+ scrollButtonColor?: string;
74
+ /**
75
+ * Color for the scroll-to-bottom button in dark mode
76
+ * @default "#818CF8"
77
+ */
78
+ scrollButtonColorDark?: string;
79
+ /**
80
+ * Text displayed while the AI is generating a response
81
+ * @default "NAIA is working on it..."
82
+ */
83
+ streamingText?: string;
84
+ /**
85
+ * Color of the streaming indicator text in light mode
86
+ * @default "#2563EB"
87
+ */
88
+ streamingTextColor?: string;
89
+ /**
90
+ * Color of the streaming indicator text in dark mode
91
+ * @default "#818CF8"
92
+ */
93
+ streamingTextColorDark?: string;
94
+ /**
95
+ * Primary welcome message shown on the initial screen
96
+ * @default "Hi there!"
97
+ */
98
+ welcomeMessagePrimary?: string;
99
+ /**
100
+ * Secondary welcome message shown below the primary message
101
+ * @default "How can I help you today?"
102
+ */
103
+ welcomeMessageSecondary?: string;
104
+ /**
105
+ * Path to a custom icon image for the welcome screen (supports png, svg, etc.)
106
+ * @example "/logo.png" or "https://example.com/icon.svg"
107
+ */
108
+ welcomeIcon?: string;
109
+ /**
110
+ * Size of the welcome icon with CSS units
111
+ * @default "10rem"
112
+ * @example "10rem", "100px", "5em"
113
+ */
114
+ welcomeIconSize?: string;
115
+ /**
116
+ * Enable streaming responses from the AI
117
+ * @default true
118
+ */
119
+ streaming?: boolean;
120
+ /**
121
+ * Background color for the sidebar in light mode
122
+ * @default "#FAFAFA"
123
+ */
124
+ sidebarBackgroundColor?: string;
125
+ /**
126
+ * Background color for the sidebar in dark mode
127
+ * @default "#1F1F1F"
128
+ */
129
+ sidebarBackgroundColorDark?: string;
130
+ /**
131
+ * Background color for the chat input field in light mode
132
+ * @default "#FFFFFF"
133
+ */
134
+ inputBackgroundColor?: string;
135
+ /**
136
+ * Background color for the chat input field in dark mode
137
+ * @default "#303030"
138
+ */
139
+ inputBackgroundColorDark?: string;
140
+ /**
141
+ * Background color for the header in light mode
142
+ * @default "#FFFFFF"
143
+ */
144
+ headerBackgroundColor?: string;
145
+ /**
146
+ * Background color for the header in dark mode
147
+ * @default "#1F1F1F"
148
+ */
149
+ headerBackgroundColorDark?: string;
150
+ /**
151
+ * Base color for vector search results in light mode
152
+ * @default "#9333EA" (purple-600)
153
+ * @example "#3B82F6" for blue, "#10B981" for green
154
+ */
155
+ vectorColor?: string;
156
+ /**
157
+ * Base color for vector search results in dark mode
158
+ * @default "#A855F7" (purple-500)
159
+ * @example "#60A5FA" for blue, "#34D399" for green
160
+ */
161
+ vectorColorDark?: string;
162
+ /**
163
+ * Callback fired when a tool starts executing during streaming
164
+ * @param metadata - Event metadata containing tool information
165
+ * @example
166
+ * ```tsx
167
+ * onToolStart={(metadata) => {
168
+ * console.log('Tool started:', metadata.toolName);
169
+ * }}
170
+ * ```
171
+ */
172
+ onToolStart?: (metadata: any) => void;
173
+ /**
174
+ * Callback fired when tool input is available during streaming
175
+ * @param metadata - Event metadata containing tool input information
176
+ * @example
177
+ * ```tsx
178
+ * onToolInput={(metadata) => {
179
+ * console.log('Tool input received:', metadata);
180
+ * }}
181
+ * ```
182
+ */
183
+ onToolInput?: (metadata: any) => void;
184
+ /**
185
+ * Callback fired when a tool finishes executing during streaming
186
+ * @param metadata - Event metadata containing tool output information
187
+ * @example
188
+ * ```tsx
189
+ * onToolFinish={(metadata) => {
190
+ * console.log('Tool finished:', metadata);
191
+ * }}
192
+ * ```
193
+ */
194
+ onToolFinish?: (metadata: any) => void;
195
+ /**
196
+ * Callback fired for each text chunk received during streaming
197
+ * @param chunk - The text chunk received
198
+ * @example
199
+ * ```tsx
200
+ * onChunk={(chunk) => {
201
+ * console.log('Received chunk:', chunk);
202
+ * }}
203
+ * ```
204
+ */
205
+ onChunk?: (chunk: string) => void;
206
+ /**
207
+ * Callback fired when streaming finishes
208
+ * @param metadata - Final response metadata
209
+ * @example
210
+ * ```tsx
211
+ * onFinish={(metadata) => {
212
+ * console.log('Streaming finished:', metadata);
213
+ * }}
214
+ * ```
215
+ */
216
+ onFinish?: (metadata: any) => void;
14
217
  }
15
- declare function NeptuneChatBot({ agentId: propAgentId, debug: propDebug, theme: propTheme, localDebug: propLocalDebug, }: NeptuneChatBotProps): react_jsx_runtime.JSX.Element;
218
+ declare function NeptuneChatBot({ agentId: propAgentId, theme: propTheme, localDebug: propLocalDebug, title: propTitle, messageBubbleColor, messageBubbleColorDark, accentColor, accentColorDark, scrollButtonColor, scrollButtonColorDark, streamingText, streamingTextColor, streamingTextColorDark, welcomeMessagePrimary, welcomeMessageSecondary, welcomeIcon, welcomeIconSize, streaming, sidebarBackgroundColor, onToolStart, onToolInput, onToolFinish, onChunk, onFinish, sidebarBackgroundColorDark, inputBackgroundColor, inputBackgroundColorDark, headerBackgroundColor, headerBackgroundColorDark, vectorColor, vectorColorDark, }: NeptuneChatBotProps): react_jsx_runtime.JSX.Element;
16
219
 
17
220
  interface TextContent {
18
221
  type: "text";
@@ -48,9 +251,18 @@ interface Step {
48
251
  text?: string;
49
252
  tools?: ToolCall[];
50
253
  }
254
+ interface VectorResult {
255
+ rowId: string;
256
+ similarity: string;
257
+ template: string;
258
+ entityName: string;
259
+ data: Record<string, any>;
260
+ }
51
261
  interface MessageMetadata {
52
262
  logId?: string;
53
263
  steps?: Step[];
264
+ vectors?: VectorResult[];
265
+ feedbackPositive?: boolean | null;
54
266
  }
55
267
  interface Message {
56
268
  id: string;