@copilotkit/react-ui 1.8.13-next.2 → 1.8.13-next.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/CHANGELOG.md +9 -0
- package/dist/{chunk-3R6CEFJE.mjs → chunk-FWKHST6I.mjs} +67 -33
- package/dist/chunk-FWKHST6I.mjs.map +1 -0
- package/dist/{chunk-ZRW27A32.mjs → chunk-IAHSHPRJ.mjs} +12 -13
- package/dist/chunk-IAHSHPRJ.mjs.map +1 -0
- package/dist/{chunk-XZNY26GH.mjs → chunk-IMBPSLL4.mjs} +3 -3
- package/dist/chunk-IMBPSLL4.mjs.map +1 -0
- package/dist/{chunk-756IINQI.mjs → chunk-JU3HNL5N.mjs} +2 -2
- package/dist/{chunk-IQ7DDXDA.mjs → chunk-QEZ3YYLO.mjs} +2 -2
- package/dist/chunk-QGSPTXOV.mjs +24 -0
- package/dist/chunk-QGSPTXOV.mjs.map +1 -0
- package/dist/chunk-SC6JRFAJ.mjs +1 -0
- package/dist/components/chat/Button.d.ts +1 -0
- package/dist/components/chat/Chat.d.ts +6 -2
- package/dist/components/chat/Chat.js +39 -24
- package/dist/components/chat/Chat.js.map +1 -1
- package/dist/components/chat/Chat.mjs +3 -2
- package/dist/components/chat/Header.d.ts +1 -0
- package/dist/components/chat/Input.d.ts +1 -0
- package/dist/components/chat/Messages.d.ts +1 -0
- package/dist/components/chat/Modal.d.ts +2 -2
- package/dist/components/chat/Modal.js +106 -62
- package/dist/components/chat/Modal.js.map +1 -1
- package/dist/components/chat/Modal.mjs +4 -3
- package/dist/components/chat/Popup.d.ts +1 -1
- package/dist/components/chat/Popup.js +108 -64
- package/dist/components/chat/Popup.js.map +1 -1
- package/dist/components/chat/Popup.mjs +5 -4
- package/dist/components/chat/Sidebar.d.ts +1 -1
- package/dist/components/chat/Sidebar.js +108 -64
- package/dist/components/chat/Sidebar.js.map +1 -1
- package/dist/components/chat/Sidebar.mjs +5 -4
- package/dist/components/chat/Suggestion.d.ts +8 -4
- package/dist/components/chat/Suggestion.js +2 -2
- package/dist/components/chat/Suggestion.js.map +1 -1
- package/dist/components/chat/Suggestion.mjs +1 -1
- package/dist/components/chat/Suggestions.d.ts +9 -0
- package/dist/components/chat/Suggestions.js +73 -0
- package/dist/components/chat/Suggestions.js.map +1 -0
- package/dist/components/chat/Suggestions.mjs +10 -0
- package/dist/components/chat/Suggestions.mjs.map +1 -0
- package/dist/components/chat/Window.d.ts +1 -0
- package/dist/components/chat/index.d.ts +4 -2
- package/dist/components/chat/index.js +114 -66
- package/dist/components/chat/index.js.map +1 -1
- package/dist/components/chat/index.mjs +14 -7
- package/dist/components/chat/messages/AssistantMessage.d.ts +1 -0
- package/dist/components/chat/messages/RenderActionExecutionMessage.d.ts +1 -0
- package/dist/components/chat/messages/RenderAgentStateMessage.d.ts +1 -0
- package/dist/components/chat/messages/RenderImageMessage.d.ts +1 -0
- package/dist/components/chat/messages/RenderResultMessage.d.ts +1 -0
- package/dist/components/chat/messages/RenderTextMessage.d.ts +1 -0
- package/dist/components/chat/messages/UserMessage.d.ts +1 -0
- package/dist/components/chat/props.d.ts +6 -1
- package/dist/components/chat/props.js.map +1 -1
- package/dist/components/index.d.ts +4 -2
- package/dist/components/index.js +114 -66
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +14 -7
- package/dist/index.d.ts +4 -2
- package/dist/index.js +114 -66
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -7
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js.map +1 -1
- package/package.json +6 -6
- package/src/components/chat/Chat.tsx +12 -14
- package/src/components/chat/Modal.tsx +2 -0
- package/src/components/chat/Suggestion.tsx +10 -3
- package/src/components/chat/Suggestions.tsx +20 -0
- package/src/components/chat/index.tsx +2 -0
- package/src/components/chat/props.ts +6 -0
- package/src/types/index.ts +1 -0
- package/dist/chunk-3R6CEFJE.mjs.map +0 -1
- package/dist/chunk-PXEVB7IK.mjs +0 -1
- package/dist/chunk-XZNY26GH.mjs.map +0 -1
- package/dist/chunk-ZRW27A32.mjs.map +0 -1
- /package/dist/{chunk-756IINQI.mjs.map → chunk-JU3HNL5N.mjs.map} +0 -0
- /package/dist/{chunk-IQ7DDXDA.mjs.map → chunk-QEZ3YYLO.mjs.map} +0 -0
- /package/dist/{chunk-PXEVB7IK.mjs.map → chunk-SC6JRFAJ.mjs.map} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "../chunk-MMVDU6DF.mjs";
|
|
2
|
-
import "../chunk-
|
|
2
|
+
import "../chunk-SC6JRFAJ.mjs";
|
|
3
|
+
import "../chunk-WB3YULQ4.mjs";
|
|
3
4
|
import {
|
|
4
5
|
CopilotPopup
|
|
5
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-QEZ3YYLO.mjs";
|
|
6
7
|
import {
|
|
7
8
|
CopilotSidebar
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-3R6CEFJE.mjs";
|
|
9
|
+
} from "../chunk-JU3HNL5N.mjs";
|
|
10
|
+
import "../chunk-FWKHST6I.mjs";
|
|
11
11
|
import "../chunk-TIDV74OE.mjs";
|
|
12
12
|
import "../chunk-UH2UFL5W.mjs";
|
|
13
13
|
import "../chunk-V7W6IM2V.mjs";
|
|
@@ -24,7 +24,7 @@ import "../chunk-BH6PCAAL.mjs";
|
|
|
24
24
|
import "../chunk-UFN2VWSR.mjs";
|
|
25
25
|
import {
|
|
26
26
|
CopilotChat
|
|
27
|
-
} from "../chunk-
|
|
27
|
+
} from "../chunk-IAHSHPRJ.mjs";
|
|
28
28
|
import "../chunk-MPZAMNCN.mjs";
|
|
29
29
|
import "../chunk-ALWZ35SI.mjs";
|
|
30
30
|
import {
|
|
@@ -38,7 +38,12 @@ import {
|
|
|
38
38
|
import {
|
|
39
39
|
UserMessage
|
|
40
40
|
} from "../chunk-HWMFMBJC.mjs";
|
|
41
|
-
import
|
|
41
|
+
import {
|
|
42
|
+
Suggestions
|
|
43
|
+
} from "../chunk-QGSPTXOV.mjs";
|
|
44
|
+
import {
|
|
45
|
+
Suggestion
|
|
46
|
+
} from "../chunk-IMBPSLL4.mjs";
|
|
42
47
|
import "../chunk-PLHTVHUW.mjs";
|
|
43
48
|
import "../chunk-EMIYIMQ6.mjs";
|
|
44
49
|
import "../chunk-CGEAG65D.mjs";
|
|
@@ -64,6 +69,8 @@ export {
|
|
|
64
69
|
CopilotSidebar,
|
|
65
70
|
Markdown,
|
|
66
71
|
RenderImageMessage,
|
|
72
|
+
Suggestion as RenderSuggestion,
|
|
73
|
+
Suggestions as RenderSuggestionsList,
|
|
67
74
|
UserMessage,
|
|
68
75
|
shouldShowDevConsole,
|
|
69
76
|
useChatContext
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { AssistantMessageProps, ButtonProps, ComponentsMap, HeaderProps, InputProps, MessagesProps, RenderMessageProps, Renderer, SuggestionsProps, UserMessageProps, WindowProps } from './components/chat/props.js';
|
|
1
|
+
export { AssistantMessageProps, ButtonProps, ComponentsMap, HeaderProps, InputProps, MessagesProps, RenderMessageProps, RenderSuggestionsListProps, Renderer, SuggestionsProps, UserMessageProps, WindowProps } from './components/chat/props.js';
|
|
2
2
|
export { CopilotPopup } from './components/chat/Popup.js';
|
|
3
3
|
export { CopilotSidebar } from './components/chat/Sidebar.js';
|
|
4
4
|
export { CopilotChat } from './components/chat/Chat.js';
|
|
@@ -7,15 +7,17 @@ export { AssistantMessage } from './components/chat/messages/AssistantMessage.js
|
|
|
7
7
|
export { UserMessage } from './components/chat/messages/UserMessage.js';
|
|
8
8
|
export { useChatContext } from './components/chat/ChatContext.js';
|
|
9
9
|
export { RenderImageMessage } from './components/chat/messages/RenderImageMessage.js';
|
|
10
|
+
export { Suggestions as RenderSuggestionsList } from './components/chat/Suggestions.js';
|
|
11
|
+
export { Suggestion as RenderSuggestion } from './components/chat/Suggestion.js';
|
|
10
12
|
export { shouldShowDevConsole } from './components/dev-console/utils.js';
|
|
11
13
|
export { CopilotDevConsole } from './components/dev-console/console.js';
|
|
12
14
|
export { useCopilotChatSuggestions } from './hooks/use-copilot-chat-suggestions.js';
|
|
13
15
|
export { CopilotKitCSSProperties } from './types/css.js';
|
|
16
|
+
export { CopilotChatSuggestion } from './types/suggestions.js';
|
|
14
17
|
import '@copilotkit/runtime-client-gql';
|
|
15
18
|
import 'react';
|
|
16
19
|
import 'react/jsx-runtime';
|
|
17
20
|
import './components/chat/Modal.js';
|
|
18
21
|
import '@copilotkit/react-core';
|
|
19
|
-
import './types/suggestions.js';
|
|
20
22
|
import 'react-markdown';
|
|
21
23
|
import './components/dev-console/types.js';
|
package/dist/index.js
CHANGED
|
@@ -87,6 +87,8 @@ __export(src_exports, {
|
|
|
87
87
|
CopilotSidebar: () => CopilotSidebar,
|
|
88
88
|
Markdown: () => Markdown,
|
|
89
89
|
RenderImageMessage: () => RenderImageMessage,
|
|
90
|
+
RenderSuggestion: () => Suggestion,
|
|
91
|
+
RenderSuggestionsList: () => Suggestions,
|
|
90
92
|
UserMessage: () => UserMessage,
|
|
91
93
|
shouldShowDevConsole: () => shouldShowDevConsole,
|
|
92
94
|
useChatContext: () => useChatContext,
|
|
@@ -2497,19 +2499,23 @@ function RenderImageMessage(_a) {
|
|
|
2497
2499
|
return null;
|
|
2498
2500
|
}
|
|
2499
2501
|
|
|
2502
|
+
// src/components/chat/Chat.tsx
|
|
2503
|
+
var import_react13 = __toESM(require("react"));
|
|
2504
|
+
var import_react_core10 = require("@copilotkit/react-core");
|
|
2505
|
+
|
|
2500
2506
|
// src/components/chat/Suggestion.tsx
|
|
2501
2507
|
var import_react_core9 = require("@copilotkit/react-core");
|
|
2502
2508
|
var import_shared2 = require("@copilotkit/shared");
|
|
2503
2509
|
var import_runtime_client_gql3 = require("@copilotkit/runtime-client-gql");
|
|
2504
2510
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2505
|
-
function Suggestion({ title,
|
|
2511
|
+
function Suggestion({ title, onClick, partial, className }) {
|
|
2506
2512
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2507
2513
|
"button",
|
|
2508
2514
|
{
|
|
2509
2515
|
disabled: partial,
|
|
2510
2516
|
onClick: (e) => {
|
|
2511
2517
|
e.preventDefault();
|
|
2512
|
-
onClick(
|
|
2518
|
+
onClick();
|
|
2513
2519
|
},
|
|
2514
2520
|
className: className || (partial ? "suggestion loading" : "suggestion"),
|
|
2515
2521
|
"data-test-id": "suggestion",
|
|
@@ -2588,8 +2594,6 @@ var reloadSuggestions = (context, chatSuggestionConfiguration, setCurrentSuggest
|
|
|
2588
2594
|
});
|
|
2589
2595
|
|
|
2590
2596
|
// src/components/chat/Chat.tsx
|
|
2591
|
-
var import_react13 = __toESM(require("react"));
|
|
2592
|
-
var import_react_core10 = require("@copilotkit/react-core");
|
|
2593
2597
|
var import_runtime_client_gql4 = require("@copilotkit/runtime-client-gql");
|
|
2594
2598
|
var import_shared3 = require("@copilotkit/shared");
|
|
2595
2599
|
var import_react_core11 = require("@copilotkit/react-core");
|
|
@@ -2672,8 +2676,24 @@ var ImageUploadQueue = ({
|
|
|
2672
2676
|
);
|
|
2673
2677
|
};
|
|
2674
2678
|
|
|
2675
|
-
// src/components/chat/
|
|
2679
|
+
// src/components/chat/Suggestions.tsx
|
|
2676
2680
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2681
|
+
function Suggestions({ suggestions, onSuggestionClick }) {
|
|
2682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "suggestions", children: suggestions.map((suggestion, index) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2683
|
+
Suggestion,
|
|
2684
|
+
{
|
|
2685
|
+
title: suggestion.title,
|
|
2686
|
+
message: suggestion.message,
|
|
2687
|
+
partial: suggestion.partial,
|
|
2688
|
+
className: suggestion.className,
|
|
2689
|
+
onClick: () => onSuggestionClick(suggestion.message)
|
|
2690
|
+
},
|
|
2691
|
+
index
|
|
2692
|
+
)) });
|
|
2693
|
+
}
|
|
2694
|
+
|
|
2695
|
+
// src/components/chat/Chat.tsx
|
|
2696
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2677
2697
|
function CopilotChat({
|
|
2678
2698
|
instructions,
|
|
2679
2699
|
onSubmitMessage,
|
|
@@ -2692,6 +2712,7 @@ function CopilotChat({
|
|
|
2692
2712
|
RenderAgentStateMessage: RenderAgentStateMessage2 = RenderAgentStateMessage,
|
|
2693
2713
|
RenderResultMessage: RenderResultMessage2 = RenderResultMessage,
|
|
2694
2714
|
RenderImageMessage: RenderImageMessage2 = RenderImageMessage,
|
|
2715
|
+
RenderSuggestionsList = Suggestions,
|
|
2695
2716
|
Input: Input2 = Input,
|
|
2696
2717
|
className,
|
|
2697
2718
|
icons,
|
|
@@ -2831,8 +2852,8 @@ function CopilotChat({
|
|
|
2831
2852
|
const removeSelectedImage = (index) => {
|
|
2832
2853
|
setSelectedImages((prev) => prev.filter((_, i) => i !== index));
|
|
2833
2854
|
};
|
|
2834
|
-
return /* @__PURE__ */ (0,
|
|
2835
|
-
/* @__PURE__ */ (0,
|
|
2855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(WrappedCopilotChat, { icons, labels, className, children: [
|
|
2856
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2836
2857
|
Messages2,
|
|
2837
2858
|
{
|
|
2838
2859
|
AssistantMessage: AssistantMessage2,
|
|
@@ -2849,22 +2870,18 @@ function CopilotChat({
|
|
|
2849
2870
|
onThumbsUp,
|
|
2850
2871
|
onThumbsDown,
|
|
2851
2872
|
markdownTagRenderers,
|
|
2852
|
-
children: currentSuggestions.length > 0 && /* @__PURE__ */ (0,
|
|
2853
|
-
|
|
2873
|
+
children: currentSuggestions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2874
|
+
RenderSuggestionsList,
|
|
2854
2875
|
{
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
onClick: (message) => handleSendMessage(message)
|
|
2860
|
-
},
|
|
2861
|
-
index
|
|
2862
|
-
)) })
|
|
2876
|
+
onSuggestionClick: handleSendMessage,
|
|
2877
|
+
suggestions: currentSuggestions
|
|
2878
|
+
}
|
|
2879
|
+
)
|
|
2863
2880
|
}
|
|
2864
2881
|
),
|
|
2865
|
-
imageUploadsEnabled && /* @__PURE__ */ (0,
|
|
2866
|
-
/* @__PURE__ */ (0,
|
|
2867
|
-
/* @__PURE__ */ (0,
|
|
2882
|
+
imageUploadsEnabled && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
2883
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ImageUploadQueue, { images: selectedImages, onRemoveImage: removeSelectedImage }),
|
|
2884
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2868
2885
|
"input",
|
|
2869
2886
|
{
|
|
2870
2887
|
type: "file",
|
|
@@ -2876,7 +2893,7 @@ function CopilotChat({
|
|
|
2876
2893
|
}
|
|
2877
2894
|
)
|
|
2878
2895
|
] }),
|
|
2879
|
-
/* @__PURE__ */ (0,
|
|
2896
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2880
2897
|
Input2,
|
|
2881
2898
|
{
|
|
2882
2899
|
inProgress: isLoading,
|
|
@@ -2899,10 +2916,10 @@ function WrappedCopilotChat({
|
|
|
2899
2916
|
}) {
|
|
2900
2917
|
const chatContext = import_react13.default.useContext(ChatContext);
|
|
2901
2918
|
if (!chatContext) {
|
|
2902
|
-
return /* @__PURE__ */ (0,
|
|
2903
|
-
}, children: /* @__PURE__ */ (0,
|
|
2919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ChatContextProvider, { icons, labels, open: true, setOpen: () => {
|
|
2920
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: `copilotKitChat ${className != null ? className : ""}`, children }) });
|
|
2904
2921
|
}
|
|
2905
|
-
return /* @__PURE__ */ (0,
|
|
2922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children });
|
|
2906
2923
|
}
|
|
2907
2924
|
var SUGGESTIONS_DEBOUNCE_TIMEOUT = 1e3;
|
|
2908
2925
|
var useCopilotChatLogic = (makeSystemMessage, onInProgress, onSubmitMessage, onStopGeneration, onReloadMessages) => {
|
|
@@ -3087,56 +3104,85 @@ var useCopilotChatLogic = (makeSystemMessage, onInProgress, onSubmitMessage, onS
|
|
|
3087
3104
|
};
|
|
3088
3105
|
|
|
3089
3106
|
// src/components/chat/Modal.tsx
|
|
3090
|
-
var
|
|
3091
|
-
var CopilotModal = ({
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3107
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
3108
|
+
var CopilotModal = (_a) => {
|
|
3109
|
+
var _b = _a, {
|
|
3110
|
+
instructions,
|
|
3111
|
+
defaultOpen = false,
|
|
3112
|
+
clickOutsideToClose = true,
|
|
3113
|
+
hitEscapeToClose = true,
|
|
3114
|
+
onSetOpen,
|
|
3115
|
+
onSubmitMessage,
|
|
3116
|
+
onStopGeneration,
|
|
3117
|
+
onReloadMessages,
|
|
3118
|
+
shortcut = "/",
|
|
3119
|
+
icons,
|
|
3120
|
+
labels,
|
|
3121
|
+
makeSystemMessage,
|
|
3122
|
+
onInProgress,
|
|
3123
|
+
Window: Window2 = Window,
|
|
3124
|
+
Button: Button2 = Button,
|
|
3125
|
+
Header: Header2 = Header,
|
|
3126
|
+
Messages: Messages2 = Messages,
|
|
3127
|
+
Input: Input2 = Input,
|
|
3128
|
+
AssistantMessage: AssistantMessage2 = AssistantMessage,
|
|
3129
|
+
UserMessage: UserMessage2 = UserMessage,
|
|
3130
|
+
onThumbsUp,
|
|
3131
|
+
onThumbsDown,
|
|
3132
|
+
onCopy,
|
|
3133
|
+
onRegenerate,
|
|
3134
|
+
markdownTagRenderers,
|
|
3135
|
+
className,
|
|
3136
|
+
children
|
|
3137
|
+
} = _b, props = __objRest(_b, [
|
|
3138
|
+
"instructions",
|
|
3139
|
+
"defaultOpen",
|
|
3140
|
+
"clickOutsideToClose",
|
|
3141
|
+
"hitEscapeToClose",
|
|
3142
|
+
"onSetOpen",
|
|
3143
|
+
"onSubmitMessage",
|
|
3144
|
+
"onStopGeneration",
|
|
3145
|
+
"onReloadMessages",
|
|
3146
|
+
"shortcut",
|
|
3147
|
+
"icons",
|
|
3148
|
+
"labels",
|
|
3149
|
+
"makeSystemMessage",
|
|
3150
|
+
"onInProgress",
|
|
3151
|
+
"Window",
|
|
3152
|
+
"Button",
|
|
3153
|
+
"Header",
|
|
3154
|
+
"Messages",
|
|
3155
|
+
"Input",
|
|
3156
|
+
"AssistantMessage",
|
|
3157
|
+
"UserMessage",
|
|
3158
|
+
"onThumbsUp",
|
|
3159
|
+
"onThumbsDown",
|
|
3160
|
+
"onCopy",
|
|
3161
|
+
"onRegenerate",
|
|
3162
|
+
"markdownTagRenderers",
|
|
3163
|
+
"className",
|
|
3164
|
+
"children"
|
|
3165
|
+
]);
|
|
3120
3166
|
const [openState, setOpenState] = import_react14.default.useState(defaultOpen);
|
|
3121
3167
|
const setOpen = (open) => {
|
|
3122
3168
|
onSetOpen == null ? void 0 : onSetOpen(open);
|
|
3123
3169
|
setOpenState(open);
|
|
3124
3170
|
};
|
|
3125
|
-
return /* @__PURE__ */ (0,
|
|
3171
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(ChatContextProvider, { icons, labels, open: openState, setOpen, children: [
|
|
3126
3172
|
children,
|
|
3127
|
-
/* @__PURE__ */ (0,
|
|
3128
|
-
/* @__PURE__ */ (0,
|
|
3129
|
-
/* @__PURE__ */ (0,
|
|
3173
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className, children: [
|
|
3174
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Button2, {}),
|
|
3175
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
3130
3176
|
Window2,
|
|
3131
3177
|
{
|
|
3132
3178
|
clickOutsideToClose,
|
|
3133
3179
|
shortcut,
|
|
3134
3180
|
hitEscapeToClose,
|
|
3135
3181
|
children: [
|
|
3136
|
-
/* @__PURE__ */ (0,
|
|
3137
|
-
/* @__PURE__ */ (0,
|
|
3182
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Header2, {}),
|
|
3183
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3138
3184
|
CopilotChat,
|
|
3139
|
-
{
|
|
3185
|
+
__spreadProps(__spreadValues({}, props), {
|
|
3140
3186
|
instructions,
|
|
3141
3187
|
onSubmitMessage,
|
|
3142
3188
|
onStopGeneration,
|
|
@@ -3152,7 +3198,7 @@ var CopilotModal = ({
|
|
|
3152
3198
|
onCopy,
|
|
3153
3199
|
onRegenerate,
|
|
3154
3200
|
markdownTagRenderers
|
|
3155
|
-
}
|
|
3201
|
+
})
|
|
3156
3202
|
)
|
|
3157
3203
|
]
|
|
3158
3204
|
}
|
|
@@ -3162,17 +3208,17 @@ var CopilotModal = ({
|
|
|
3162
3208
|
};
|
|
3163
3209
|
|
|
3164
3210
|
// src/components/chat/Popup.tsx
|
|
3165
|
-
var
|
|
3211
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
3166
3212
|
function CopilotPopup(props) {
|
|
3167
3213
|
props = __spreadProps(__spreadValues({}, props), {
|
|
3168
3214
|
className: props.className ? props.className + " copilotKitPopup" : "copilotKitPopup"
|
|
3169
3215
|
});
|
|
3170
|
-
return /* @__PURE__ */ (0,
|
|
3216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(CopilotModal, __spreadProps(__spreadValues({}, props), { children: props.children }));
|
|
3171
3217
|
}
|
|
3172
3218
|
|
|
3173
3219
|
// src/components/chat/Sidebar.tsx
|
|
3174
3220
|
var import_react15 = require("react");
|
|
3175
|
-
var
|
|
3221
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3176
3222
|
function CopilotSidebar(props) {
|
|
3177
3223
|
props = __spreadProps(__spreadValues({}, props), {
|
|
3178
3224
|
className: props.className ? props.className + " copilotKitSidebar" : "copilotKitSidebar"
|
|
@@ -3185,7 +3231,7 @@ function CopilotSidebar(props) {
|
|
|
3185
3231
|
(_a = props.onSetOpen) == null ? void 0 : _a.call(props, open);
|
|
3186
3232
|
setExpandedClassName(open ? "sidebarExpanded" : "");
|
|
3187
3233
|
};
|
|
3188
|
-
return /* @__PURE__ */ (0,
|
|
3234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: `copilotKitSidebarContentWrapper ${expandedClassName}`, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CopilotModal, __spreadProps(__spreadValues(__spreadValues({}, props), { onSetOpen }), { children: props.children })) });
|
|
3189
3235
|
}
|
|
3190
3236
|
|
|
3191
3237
|
// src/hooks/use-copilot-chat-suggestions.tsx
|
|
@@ -3224,6 +3270,8 @@ function useCopilotChatSuggestions({
|
|
|
3224
3270
|
CopilotSidebar,
|
|
3225
3271
|
Markdown,
|
|
3226
3272
|
RenderImageMessage,
|
|
3273
|
+
RenderSuggestion,
|
|
3274
|
+
RenderSuggestionsList,
|
|
3227
3275
|
UserMessage,
|
|
3228
3276
|
shouldShowDevConsole,
|
|
3229
3277
|
useChatContext,
|