@copilotkit/react-ui 0.0.0-fix-debug-infosys-20251107162427 → 0.0.0-fix-restore-handle-method-node-http-20251222114321
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 +331 -5
- package/dist/{chunk-ZJCHKHE4.mjs → chunk-3W6J75HS.mjs} +13 -10
- package/dist/chunk-3W6J75HS.mjs.map +1 -0
- package/dist/{chunk-RKULVDQO.mjs → chunk-7OURDQZJ.mjs} +9 -2
- package/dist/chunk-7OURDQZJ.mjs.map +1 -0
- package/dist/{chunk-TZNQJ3NA.mjs → chunk-7PR2KJDO.mjs} +6 -6
- package/dist/{chunk-FK3XMHLY.mjs → chunk-ELUJRANC.mjs} +2 -2
- package/dist/{chunk-OWX6YJZH.mjs → chunk-HIW7RXCD.mjs} +9 -5
- package/dist/chunk-HIW7RXCD.mjs.map +1 -0
- package/dist/{chunk-KX44MLR6.mjs → chunk-IHFR6PYG.mjs} +1 -1
- package/dist/chunk-IHFR6PYG.mjs.map +1 -0
- package/dist/{chunk-52RQLNFB.mjs → chunk-LQEFRHRT.mjs} +2 -2
- package/dist/{chunk-2XARU6EY.mjs → chunk-NCIAFFQ2.mjs} +7 -3
- package/dist/chunk-NCIAFFQ2.mjs.map +1 -0
- package/dist/{chunk-W26XFBEG.mjs → chunk-NGJ32FAP.mjs} +3 -3
- package/dist/chunk-NGJ32FAP.mjs.map +1 -0
- package/dist/chunk-QB3GUN2N.mjs +31 -0
- package/dist/chunk-QB3GUN2N.mjs.map +1 -0
- package/dist/{chunk-MJEYL3FK.mjs → chunk-QPQRLXN3.mjs} +25 -255
- package/dist/chunk-QPQRLXN3.mjs.map +1 -0
- package/dist/chunk-RYUCX3ZK.mjs +32 -0
- package/dist/chunk-RYUCX3ZK.mjs.map +1 -0
- package/dist/chunk-Y4FKRAKJ.mjs +12 -0
- package/dist/chunk-Y4FKRAKJ.mjs.map +1 -0
- package/dist/components/chat/Chat.d.ts +3 -140
- package/dist/components/chat/Chat.js +80 -270
- package/dist/components/chat/Chat.js.map +1 -1
- package/dist/components/chat/Chat.mjs +12 -14
- package/dist/components/chat/Input.d.ts +1 -1
- package/dist/components/chat/Input.js +11 -8
- package/dist/components/chat/Input.js.map +1 -1
- package/dist/components/chat/Input.mjs +1 -1
- package/dist/components/chat/Messages.d.ts +3 -3
- package/dist/components/chat/Messages.js +35 -4
- package/dist/components/chat/Messages.js.map +1 -1
- package/dist/components/chat/Messages.mjs +6 -6
- package/dist/components/chat/Modal.d.ts +1 -6
- package/dist/components/chat/Modal.js +86 -274
- package/dist/components/chat/Modal.js.map +1 -1
- package/dist/components/chat/Modal.mjs +11 -11
- package/dist/components/chat/Popup.d.ts +1 -6
- package/dist/components/chat/Popup.js +86 -274
- package/dist/components/chat/Popup.js.map +1 -1
- package/dist/components/chat/Popup.mjs +12 -12
- package/dist/components/chat/Sidebar.d.ts +1 -6
- package/dist/components/chat/Sidebar.js +86 -274
- package/dist/components/chat/Sidebar.js.map +1 -1
- package/dist/components/chat/Sidebar.mjs +12 -12
- package/dist/components/chat/Suggestion.js.map +1 -1
- package/dist/components/chat/Suggestion.mjs +1 -1
- package/dist/components/chat/Suggestions.d.ts +1 -1
- package/dist/components/chat/Suggestions.js +19 -12
- package/dist/components/chat/Suggestions.js.map +1 -1
- package/dist/components/chat/Suggestions.mjs +2 -2
- package/dist/components/chat/index.d.ts +0 -5
- package/dist/components/chat/index.js +86 -274
- package/dist/components/chat/index.js.map +1 -1
- package/dist/components/chat/index.mjs +15 -15
- package/dist/components/chat/messages/AssistantMessage.js.map +1 -1
- package/dist/components/chat/messages/AssistantMessage.mjs +2 -2
- package/dist/components/chat/messages/ErrorMessage.mjs +1 -1
- package/dist/components/chat/messages/LegacyRenderMessage.js +30 -3
- package/dist/components/chat/messages/LegacyRenderMessage.js.map +1 -1
- package/dist/components/chat/messages/LegacyRenderMessage.mjs +5 -5
- package/dist/components/chat/messages/RenderMessage.d.ts +1 -1
- package/dist/components/chat/messages/RenderMessage.js +23 -3
- package/dist/components/chat/messages/RenderMessage.js.map +1 -1
- package/dist/components/chat/messages/RenderMessage.mjs +4 -4
- package/dist/components/chat/messages/UserMessage.js +19 -3
- package/dist/components/chat/messages/UserMessage.js.map +1 -1
- package/dist/components/chat/messages/UserMessage.mjs +1 -1
- package/dist/components/chat/props.d.ts +4 -0
- package/dist/components/chat/props.js.map +1 -1
- package/dist/components/index.d.ts +0 -5
- package/dist/components/index.js +86 -274
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +15 -15
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +2 -24
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/hooks/use-copilot-chat-suggestions.d.ts +4 -26
- package/dist/hooks/use-copilot-chat-suggestions.js +2 -24
- package/dist/hooks/use-copilot-chat-suggestions.js.map +1 -1
- package/dist/hooks/use-copilot-chat-suggestions.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +0 -5
- package/dist/index.js +89 -299
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -16
- package/dist/types/suggestions.d.ts +1 -0
- package/dist/types/suggestions.js.map +1 -1
- package/dist/v2/index.css +4 -0
- package/dist/v2/index.css.map +1 -0
- package/dist/v2/index.d.ts +2 -0
- package/dist/v2/index.js +2 -0
- package/dist/v2/index.js.map +1 -0
- package/dist/v2/index.mjs +2 -0
- package/dist/v2/index.mjs.map +1 -0
- package/package.json +8 -7
- package/src/components/chat/Chat.tsx +21 -374
- package/src/components/chat/Input.tsx +13 -12
- package/src/components/chat/Messages.tsx +8 -4
- package/src/components/chat/Suggestion.tsx +2 -2
- package/src/components/chat/Suggestions.tsx +6 -2
- package/src/components/chat/messages/AssistantMessage.tsx +1 -0
- package/src/components/chat/messages/LegacyRenderMessage.tsx +7 -0
- package/src/components/chat/messages/RenderMessage.tsx +4 -0
- package/src/components/chat/messages/UserMessage.tsx +32 -6
- package/src/components/chat/props.ts +4 -0
- package/src/css/messages.css +1 -1
- package/src/hooks/use-copilot-chat-suggestions.tsx +6 -57
- package/src/types/suggestions.ts +1 -0
- package/src/v2/index.ts +1 -0
- package/src/v2/styles.css +1 -0
- package/tsup.config.ts +1 -1
- package/dist/chunk-226ZMOE3.mjs +0 -24
- package/dist/chunk-226ZMOE3.mjs.map +0 -1
- package/dist/chunk-2XARU6EY.mjs.map +0 -1
- package/dist/chunk-EYRKZDP5.mjs +0 -32
- package/dist/chunk-EYRKZDP5.mjs.map +0 -1
- package/dist/chunk-KX44MLR6.mjs.map +0 -1
- package/dist/chunk-MJEYL3FK.mjs.map +0 -1
- package/dist/chunk-OWX6YJZH.mjs.map +0 -1
- package/dist/chunk-RKULVDQO.mjs.map +0 -1
- package/dist/chunk-VVL6JFCJ.mjs +0 -16
- package/dist/chunk-VVL6JFCJ.mjs.map +0 -1
- package/dist/chunk-W26XFBEG.mjs.map +0 -1
- package/dist/chunk-ZJCHKHE4.mjs.map +0 -1
- /package/dist/{chunk-TZNQJ3NA.mjs.map → chunk-7PR2KJDO.mjs.map} +0 -0
- /package/dist/{chunk-FK3XMHLY.mjs.map → chunk-ELUJRANC.mjs.map} +0 -0
- /package/dist/{chunk-52RQLNFB.mjs.map → chunk-LQEFRHRT.mjs.map} +0 -0
|
@@ -1,26 +1,11 @@
|
|
|
1
|
-
import * as _copilotkit_react_core_dist_types_coagent_state from '@copilotkit/react-core/dist/types/coagent-state';
|
|
2
|
-
import * as _copilotkit_react_core_dist_hooks_use_tree from '@copilotkit/react-core/dist/hooks/use-tree';
|
|
3
|
-
import * as _copilotkit_shared from '@copilotkit/shared';
|
|
4
|
-
import { Message, CopilotErrorHandler, CopilotKitError } from '@copilotkit/shared';
|
|
5
|
-
import * as _copilotkit_react_core_dist_copilot_context_cf9de848 from '@copilotkit/react-core/dist/copilot-context-cf9de848';
|
|
6
|
-
import * as _copilotkit_react_core_dist_types_coagent_action from '@copilotkit/react-core/dist/types/coagent-action';
|
|
7
|
-
import * as _copilotkit_react_core from '@copilotkit/react-core';
|
|
8
|
-
import { SuggestionItem, SystemMessageFunction, HintFunction } from '@copilotkit/react-core';
|
|
9
|
-
import * as _copilotkit_runtime_client_gql from '@copilotkit/runtime-client-gql';
|
|
10
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
11
2
|
import { CopilotChatIcons, CopilotChatLabels } from './ChatContext.js';
|
|
12
3
|
import React__default from 'react';
|
|
4
|
+
import { ChatSuggestions, OnStopGeneration, OnReloadMessages, SystemMessageFunction } from '@copilotkit/react-core';
|
|
5
|
+
import { Message, CopilotErrorHandler } from '@copilotkit/shared';
|
|
13
6
|
import { ComponentsMap, AssistantMessageProps, UserMessageProps, ErrorMessageProps, MessagesProps, RenderMessageProps, RenderSuggestionsListProps, InputProps, ImageRendererProps, CopilotObservabilityHooks } from './props.js';
|
|
14
7
|
import '../../types/suggestions.js';
|
|
15
8
|
|
|
16
|
-
/**
|
|
17
|
-
* The type of suggestions to use in the chat.
|
|
18
|
-
*
|
|
19
|
-
* `auto` - Suggestions are generated automatically.
|
|
20
|
-
* `manual` - Suggestions are controlled programmatically.
|
|
21
|
-
* `SuggestionItem[]` - Static suggestions array.
|
|
22
|
-
*/
|
|
23
|
-
type ChatSuggestions = "auto" | "manual" | SuggestionItem[];
|
|
24
9
|
/**
|
|
25
10
|
* Props for CopilotChat component.
|
|
26
11
|
*/
|
|
@@ -204,48 +189,6 @@ interface CopilotChatProps {
|
|
|
204
189
|
*/
|
|
205
190
|
onError?: CopilotErrorHandler;
|
|
206
191
|
}
|
|
207
|
-
interface OnStopGenerationArguments {
|
|
208
|
-
/**
|
|
209
|
-
* The name of the currently executing agent.
|
|
210
|
-
*/
|
|
211
|
-
currentAgentName: string | undefined;
|
|
212
|
-
/**
|
|
213
|
-
* The messages in the chat.
|
|
214
|
-
*/
|
|
215
|
-
messages: Message[];
|
|
216
|
-
/**
|
|
217
|
-
* Set the messages in the chat.
|
|
218
|
-
*/
|
|
219
|
-
setMessages: (messages: Message[]) => void;
|
|
220
|
-
/**
|
|
221
|
-
* Stop chat generation.
|
|
222
|
-
*/
|
|
223
|
-
stopGeneration: () => void;
|
|
224
|
-
/**
|
|
225
|
-
* Restart the currently executing agent.
|
|
226
|
-
*/
|
|
227
|
-
restartCurrentAgent: () => void;
|
|
228
|
-
/**
|
|
229
|
-
* Stop the currently executing agent.
|
|
230
|
-
*/
|
|
231
|
-
stopCurrentAgent: () => void;
|
|
232
|
-
/**
|
|
233
|
-
* Run the currently executing agent.
|
|
234
|
-
*/
|
|
235
|
-
runCurrentAgent: (hint?: HintFunction) => Promise<void>;
|
|
236
|
-
/**
|
|
237
|
-
* Set the state of the currently executing agent.
|
|
238
|
-
*/
|
|
239
|
-
setCurrentAgentState: (state: any) => void;
|
|
240
|
-
}
|
|
241
|
-
type OnReloadMessagesArguments = OnStopGenerationArguments & {
|
|
242
|
-
/**
|
|
243
|
-
* The message on which "regenerate" was pressed
|
|
244
|
-
*/
|
|
245
|
-
messageId: string;
|
|
246
|
-
};
|
|
247
|
-
type OnStopGeneration = (args: OnStopGenerationArguments) => void;
|
|
248
|
-
type OnReloadMessages = (args: OnReloadMessagesArguments) => void;
|
|
249
192
|
type ImageUpload = {
|
|
250
193
|
contentType: string;
|
|
251
194
|
bytes: string;
|
|
@@ -257,85 +200,5 @@ declare function WrappedCopilotChat({ children, icons, labels, className, }: {
|
|
|
257
200
|
labels?: CopilotChatLabels;
|
|
258
201
|
className?: string;
|
|
259
202
|
}): react_jsx_runtime.JSX.Element;
|
|
260
|
-
declare const useCopilotChatLogic: (chatSuggestions: ChatSuggestions, makeSystemMessage?: SystemMessageFunction, disableSystemMessage?: boolean, onInProgress?: (isLoading: boolean) => void, onSubmitMessage?: (messageContent: string) => Promise<void> | void, onStopGeneration?: OnStopGeneration, onReloadMessages?: OnReloadMessages) => {
|
|
261
|
-
messages: Message[];
|
|
262
|
-
isLoading: boolean;
|
|
263
|
-
suggestions: SuggestionItem[];
|
|
264
|
-
sendMessage: (messageContent: string, imagesToUse?: Array<{
|
|
265
|
-
contentType: string;
|
|
266
|
-
bytes: string;
|
|
267
|
-
}>) => Promise<Message>;
|
|
268
|
-
stopGeneration: () => void;
|
|
269
|
-
reloadMessages: (messageId: string) => void;
|
|
270
|
-
resetSuggestions: () => void;
|
|
271
|
-
context: {
|
|
272
|
-
messages: _copilotkit_runtime_client_gql.Message[];
|
|
273
|
-
setMessages: React__default.Dispatch<React__default.SetStateAction<_copilotkit_runtime_client_gql.Message[]>>;
|
|
274
|
-
suggestions: SuggestionItem[];
|
|
275
|
-
setSuggestions: React__default.Dispatch<React__default.SetStateAction<SuggestionItem[]>>;
|
|
276
|
-
actions: Record<string, _copilotkit_react_core.FrontendAction<any>>;
|
|
277
|
-
setAction: (id: string, action: _copilotkit_react_core.FrontendAction<any>) => void;
|
|
278
|
-
removeAction: (id: string) => void;
|
|
279
|
-
coAgentStateRenders: Record<string, _copilotkit_react_core_dist_types_coagent_action.CoAgentStateRender<any>>;
|
|
280
|
-
setCoAgentStateRender: (id: string, stateRender: _copilotkit_react_core_dist_types_coagent_action.CoAgentStateRender<any>) => void;
|
|
281
|
-
removeCoAgentStateRender: (id: string) => void;
|
|
282
|
-
chatComponentsCache: React__default.RefObject<_copilotkit_react_core_dist_copilot_context_cf9de848.j>;
|
|
283
|
-
getFunctionCallHandler: (customEntryPoints?: Record<string, _copilotkit_react_core.FrontendAction<any>>) => _copilotkit_shared.FunctionCallHandler;
|
|
284
|
-
addContext: (context: string, parentId?: string, categories?: string[]) => _copilotkit_react_core_dist_hooks_use_tree.TreeNodeId;
|
|
285
|
-
removeContext: (id: _copilotkit_react_core_dist_hooks_use_tree.TreeNodeId) => void;
|
|
286
|
-
getAllContext: () => _copilotkit_react_core.Tree;
|
|
287
|
-
getContextString: (documents: _copilotkit_react_core.DocumentPointer[], categories: string[]) => string;
|
|
288
|
-
addDocumentContext: (documentPointer: _copilotkit_react_core.DocumentPointer, categories?: string[]) => _copilotkit_react_core_dist_hooks_use_tree.TreeNodeId;
|
|
289
|
-
removeDocumentContext: (documentId: string) => void;
|
|
290
|
-
getDocumentsContext: (categories: string[]) => _copilotkit_react_core.DocumentPointer[];
|
|
291
|
-
isLoading: boolean;
|
|
292
|
-
setIsLoading: React__default.Dispatch<React__default.SetStateAction<boolean>>;
|
|
293
|
-
chatSuggestionConfiguration: {
|
|
294
|
-
[key: string]: _copilotkit_react_core.CopilotChatSuggestionConfiguration;
|
|
295
|
-
};
|
|
296
|
-
addChatSuggestionConfiguration: (id: string, suggestion: _copilotkit_react_core.CopilotChatSuggestionConfiguration) => void;
|
|
297
|
-
removeChatSuggestionConfiguration: (id: string) => void;
|
|
298
|
-
chatInstructions: string;
|
|
299
|
-
setChatInstructions: React__default.Dispatch<React__default.SetStateAction<string>>;
|
|
300
|
-
additionalInstructions?: string[];
|
|
301
|
-
setAdditionalInstructions: React__default.Dispatch<React__default.SetStateAction<string[]>>;
|
|
302
|
-
copilotApiConfig: _copilotkit_react_core.CopilotApiConfig;
|
|
303
|
-
showDevConsole: boolean;
|
|
304
|
-
coagentStates: Record<string, _copilotkit_react_core_dist_types_coagent_state.CoagentState>;
|
|
305
|
-
setCoagentStates: React__default.Dispatch<React__default.SetStateAction<Record<string, _copilotkit_react_core_dist_types_coagent_state.CoagentState>>>;
|
|
306
|
-
coagentStatesRef: React__default.RefObject<Record<string, _copilotkit_react_core_dist_types_coagent_state.CoagentState>>;
|
|
307
|
-
setCoagentStatesWithRef: (value: Record<string, _copilotkit_react_core_dist_types_coagent_state.CoagentState> | ((prev: Record<string, _copilotkit_react_core_dist_types_coagent_state.CoagentState>) => Record<string, _copilotkit_react_core_dist_types_coagent_state.CoagentState>)) => void;
|
|
308
|
-
agentSession: _copilotkit_react_core_dist_copilot_context_cf9de848.A | null;
|
|
309
|
-
setAgentSession: React__default.Dispatch<React__default.SetStateAction<_copilotkit_react_core_dist_copilot_context_cf9de848.A | null>>;
|
|
310
|
-
agentLock: string | null;
|
|
311
|
-
threadId: string;
|
|
312
|
-
setThreadId: React__default.Dispatch<React__default.SetStateAction<string>>;
|
|
313
|
-
runId: string | null;
|
|
314
|
-
setRunId: React__default.Dispatch<React__default.SetStateAction<string | null>>;
|
|
315
|
-
chatAbortControllerRef: React__default.MutableRefObject<AbortController | null>;
|
|
316
|
-
runtimeClient: _copilotkit_runtime_client_gql.CopilotRuntimeClient;
|
|
317
|
-
forwardedParameters?: Partial<Pick<_copilotkit_runtime_client_gql.ForwardedParametersInput, "temperature">>;
|
|
318
|
-
availableAgents: _copilotkit_runtime_client_gql.Agent[];
|
|
319
|
-
authStates_c?: Record<_copilotkit_react_core_dist_copilot_context_cf9de848.k, _copilotkit_react_core_dist_copilot_context_cf9de848.f>;
|
|
320
|
-
setAuthStates_c?: React__default.Dispatch<React__default.SetStateAction<Record<_copilotkit_react_core_dist_copilot_context_cf9de848.k, _copilotkit_react_core_dist_copilot_context_cf9de848.f>>>;
|
|
321
|
-
authConfig_c?: {
|
|
322
|
-
SignInComponent: React__default.ComponentType<{
|
|
323
|
-
onSignInComplete: (authState: _copilotkit_react_core_dist_copilot_context_cf9de848.f) => void;
|
|
324
|
-
}>;
|
|
325
|
-
};
|
|
326
|
-
extensions: _copilotkit_runtime_client_gql.ExtensionsInput;
|
|
327
|
-
setExtensions: React__default.Dispatch<React__default.SetStateAction<_copilotkit_runtime_client_gql.ExtensionsInput>>;
|
|
328
|
-
langGraphInterruptAction: _copilotkit_react_core_dist_copilot_context_cf9de848.L | null;
|
|
329
|
-
setLangGraphInterruptAction: _copilotkit_react_core_dist_copilot_context_cf9de848.d;
|
|
330
|
-
removeLangGraphInterruptAction: (threadId: string) => void;
|
|
331
|
-
onError: CopilotErrorHandler;
|
|
332
|
-
bannerError: CopilotKitError | null;
|
|
333
|
-
setBannerError: React__default.Dispatch<React__default.SetStateAction<CopilotKitError | null>>;
|
|
334
|
-
internalErrorHandlers: Record<string, CopilotErrorHandler>;
|
|
335
|
-
setInternalErrorHandler: (handler: Record<string, CopilotErrorHandler>) => void;
|
|
336
|
-
removeInternalErrorHandler: (id: string) => void;
|
|
337
|
-
};
|
|
338
|
-
actions: Record<string, _copilotkit_react_core.FrontendAction<any>>;
|
|
339
|
-
};
|
|
340
203
|
|
|
341
|
-
export {
|
|
204
|
+
export { CopilotChat, CopilotChatProps, ImageUpload, WrappedCopilotChat };
|