@kite-copilot/chat-panel 0.2.32 → 0.2.33
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/README.md +45 -2
- package/dist/auto.cjs +31 -5
- package/dist/auto.d.cts +1 -1
- package/dist/auto.d.ts +1 -1
- package/dist/auto.js +1 -1
- package/dist/{chunk-5NNBNZBS.js → chunk-5BWUHEPW.js} +31 -5
- package/dist/{createKiteChat-CyoN-YV4.d.cts → createKiteChat-DPFkdPqV.d.cts} +28 -2
- package/dist/{createKiteChat-CyoN-YV4.d.ts → createKiteChat-DPFkdPqV.d.ts} +28 -2
- package/dist/embed.global.js +18 -18
- package/dist/index.cjs +31 -5
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1367,7 +1367,12 @@ function ChatPanel({
|
|
|
1367
1367
|
currentPage,
|
|
1368
1368
|
agentUrl = DEFAULT_AGENT_URL,
|
|
1369
1369
|
startingQuestions: startingQuestionsProp,
|
|
1370
|
-
startingQuestionsEndpoint
|
|
1370
|
+
startingQuestionsEndpoint,
|
|
1371
|
+
userId,
|
|
1372
|
+
orgId,
|
|
1373
|
+
userName,
|
|
1374
|
+
userEmail,
|
|
1375
|
+
userOrganization
|
|
1371
1376
|
} = {}) {
|
|
1372
1377
|
const [messages, setMessages] = React4.useState(initialMessages);
|
|
1373
1378
|
const [input, setInput] = React4.useState("");
|
|
@@ -1938,7 +1943,12 @@ function ChatPanel({
|
|
|
1938
1943
|
body: JSON.stringify({
|
|
1939
1944
|
session_id: sessionId,
|
|
1940
1945
|
message: userText,
|
|
1941
|
-
current_page: currentPage || "dashboard"
|
|
1946
|
+
current_page: currentPage || "dashboard",
|
|
1947
|
+
user_id: userId,
|
|
1948
|
+
user_name: userName,
|
|
1949
|
+
user_email: userEmail,
|
|
1950
|
+
user_organization: userOrganization,
|
|
1951
|
+
org_id: orgId
|
|
1942
1952
|
}),
|
|
1943
1953
|
signal: controller.signal
|
|
1944
1954
|
});
|
|
@@ -2198,6 +2208,7 @@ ${userText}`
|
|
|
2198
2208
|
formData.append("message", userText);
|
|
2199
2209
|
formData.append("session_id", sessionId);
|
|
2200
2210
|
formData.append("current_page", currentPage || "dashboard");
|
|
2211
|
+
if (orgId) formData.append("org_id", orgId);
|
|
2201
2212
|
const controller = new AbortController();
|
|
2202
2213
|
const timeoutId = setTimeout(() => controller.abort(), 12e4);
|
|
2203
2214
|
const response = await fetch(`${agentUrl}/chat/bulk/stream`, {
|
|
@@ -4222,7 +4233,12 @@ function ChatPanelWithToggle({
|
|
|
4222
4233
|
startingQuestionsEndpoint,
|
|
4223
4234
|
defaultOpen = false,
|
|
4224
4235
|
isOpen: controlledIsOpen,
|
|
4225
|
-
onOpenChange
|
|
4236
|
+
onOpenChange,
|
|
4237
|
+
userId,
|
|
4238
|
+
orgId,
|
|
4239
|
+
userName,
|
|
4240
|
+
userEmail,
|
|
4241
|
+
userOrganization
|
|
4226
4242
|
}) {
|
|
4227
4243
|
const [internalIsOpen, setInternalIsOpen] = React4.useState(defaultOpen);
|
|
4228
4244
|
const isOpen = controlledIsOpen !== void 0 ? controlledIsOpen : internalIsOpen;
|
|
@@ -4253,7 +4269,12 @@ function ChatPanelWithToggle({
|
|
|
4253
4269
|
currentPage,
|
|
4254
4270
|
agentUrl,
|
|
4255
4271
|
startingQuestions,
|
|
4256
|
-
startingQuestionsEndpoint
|
|
4272
|
+
startingQuestionsEndpoint,
|
|
4273
|
+
userId,
|
|
4274
|
+
orgId,
|
|
4275
|
+
userName,
|
|
4276
|
+
userEmail,
|
|
4277
|
+
userOrganization
|
|
4257
4278
|
}
|
|
4258
4279
|
);
|
|
4259
4280
|
}
|
|
@@ -4318,7 +4339,12 @@ function KiteChatWrapper({
|
|
|
4318
4339
|
onNavigate: (page, subtab) => config.onNavigate?.(page, subtab),
|
|
4319
4340
|
onActionComplete: config.onActionComplete,
|
|
4320
4341
|
startingQuestions: config.startingQuestions,
|
|
4321
|
-
startingQuestionsEndpoint: config.startingQuestionsEndpoint
|
|
4342
|
+
startingQuestionsEndpoint: config.startingQuestionsEndpoint,
|
|
4343
|
+
userId: config.userId,
|
|
4344
|
+
orgId: config.orgId,
|
|
4345
|
+
userName: config.userName,
|
|
4346
|
+
userEmail: config.userEmail,
|
|
4347
|
+
userOrganization: config.userOrganization
|
|
4322
4348
|
}
|
|
4323
4349
|
);
|
|
4324
4350
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { i as ActionData, A as ActionType, C as ChatPanel, d as ChatPanelProps, b as ChatPanelWithToggle, e as ChatPanelWithToggleProps, H as HelpButton, g as HelpButtonProps, K as KiteChatConfig, a as KiteChatInstance, N as NavigationTarget, h as Page, P as PanelToggle, f as PanelToggleProps, S as SettingsTab, j as StartingQuestion, c as createKiteChat } from './createKiteChat-
|
|
1
|
+
export { i as ActionData, A as ActionType, C as ChatPanel, d as ChatPanelProps, b as ChatPanelWithToggle, e as ChatPanelWithToggleProps, H as HelpButton, g as HelpButtonProps, K as KiteChatConfig, a as KiteChatInstance, N as NavigationTarget, h as Page, P as PanelToggle, f as PanelToggleProps, S as SettingsTab, j as StartingQuestion, c as createKiteChat } from './createKiteChat-DPFkdPqV.cjs';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
4
|
import * as React from 'react';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { i as ActionData, A as ActionType, C as ChatPanel, d as ChatPanelProps, b as ChatPanelWithToggle, e as ChatPanelWithToggleProps, H as HelpButton, g as HelpButtonProps, K as KiteChatConfig, a as KiteChatInstance, N as NavigationTarget, h as Page, P as PanelToggle, f as PanelToggleProps, S as SettingsTab, j as StartingQuestion, c as createKiteChat } from './createKiteChat-
|
|
1
|
+
export { i as ActionData, A as ActionType, C as ChatPanel, d as ChatPanelProps, b as ChatPanelWithToggle, e as ChatPanelWithToggleProps, H as HelpButton, g as HelpButtonProps, K as KiteChatConfig, a as KiteChatInstance, N as NavigationTarget, h as Page, P as PanelToggle, f as PanelToggleProps, S as SettingsTab, j as StartingQuestion, c as createKiteChat } from './createKiteChat-DPFkdPqV.js';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
4
|
import * as React from 'react';
|
package/dist/index.js
CHANGED