@copilotkitnext/react 0.0.28 → 0.0.30
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/dist/index.d.mts +6 -7
- package/dist/index.d.ts +6 -7
- package/dist/index.js +21 -24
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +60 -67
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -8,8 +8,6 @@ import React__default, { ReactNode } from 'react';
|
|
|
8
8
|
import { Streamdown } from 'streamdown';
|
|
9
9
|
import { Suggestion, CopilotKitCore, ToolCallStatus, FrontendTool, DynamicSuggestionsConfig, StaticSuggestionsConfig, CopilotKitCoreConfig, CopilotKitCoreSubscriber, CopilotKitCoreSubscription } from '@copilotkitnext/core';
|
|
10
10
|
import { z } from 'zod';
|
|
11
|
-
import * as _lit_labs_react from '@lit-labs/react';
|
|
12
|
-
import { WebInspectorElement } from '@copilotkitnext/web-inspector';
|
|
13
11
|
|
|
14
12
|
declare const CopilotChatDefaultLabels: {
|
|
15
13
|
chatInputPlaceholder: string;
|
|
@@ -394,12 +392,13 @@ declare namespace CopilotPopup {
|
|
|
394
392
|
|
|
395
393
|
declare const WildcardToolCallRender: ReactToolCallRenderer<any>;
|
|
396
394
|
|
|
397
|
-
|
|
398
|
-
type CopilotKitInspectorBaseProps = React$1.ComponentProps<typeof CopilotKitInspectorBase>;
|
|
399
|
-
interface CopilotKitInspectorProps extends Omit<CopilotKitInspectorBaseProps, "core"> {
|
|
395
|
+
type CopilotKitInspectorBaseProps = {
|
|
400
396
|
core?: CopilotKitCore | null;
|
|
397
|
+
[key: string]: unknown;
|
|
398
|
+
};
|
|
399
|
+
interface CopilotKitInspectorProps extends CopilotKitInspectorBaseProps {
|
|
401
400
|
}
|
|
402
|
-
declare const CopilotKitInspector: React$1.
|
|
401
|
+
declare const CopilotKitInspector: React$1.FC<CopilotKitInspectorProps>;
|
|
403
402
|
|
|
404
403
|
interface UseRenderToolCallProps {
|
|
405
404
|
toolCall: ToolCall;
|
|
@@ -646,4 +645,4 @@ interface CopilotKitProviderProps {
|
|
|
646
645
|
declare const CopilotKitProvider: React__default.FC<CopilotKitProviderProps>;
|
|
647
646
|
declare const useCopilotKit: () => CopilotKitContextValue;
|
|
648
647
|
|
|
649
|
-
export { type AgentContextInput, AudioRecorderError, type AudioRecorderState, CopilotChat, CopilotChatAssistantMessage, type CopilotChatAssistantMessageProps, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, type CopilotChatConfigurationProviderProps, type CopilotChatConfigurationValue, CopilotChatInput, type CopilotChatInputProps, type CopilotChatLabels, CopilotChatMessageView, type CopilotChatMessageViewProps, type CopilotChatProps, CopilotChatSuggestionPill, type CopilotChatSuggestionPillProps, CopilotChatSuggestionView, type CopilotChatSuggestionViewProps, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, type CopilotChatToggleButtonProps, CopilotChatToolCallsView, type CopilotChatToolCallsViewProps, CopilotChatUserMessage, type CopilotChatUserMessageProps, CopilotChatView, type CopilotChatViewProps, type CopilotKitContextValue, CopilotKitCoreReact, type CopilotKitCoreReactConfig, type CopilotKitCoreReactSubscriber, CopilotKitInspector, type
|
|
648
|
+
export { type AgentContextInput, AudioRecorderError, type AudioRecorderState, CopilotChat, CopilotChatAssistantMessage, type CopilotChatAssistantMessageProps, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, type CopilotChatConfigurationProviderProps, type CopilotChatConfigurationValue, CopilotChatInput, type CopilotChatInputProps, type CopilotChatLabels, CopilotChatMessageView, type CopilotChatMessageViewProps, type CopilotChatProps, CopilotChatSuggestionPill, type CopilotChatSuggestionPillProps, CopilotChatSuggestionView, type CopilotChatSuggestionViewProps, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, type CopilotChatToggleButtonProps, CopilotChatToolCallsView, type CopilotChatToolCallsViewProps, CopilotChatUserMessage, type CopilotChatUserMessageProps, CopilotChatView, type CopilotChatViewProps, type CopilotKitContextValue, CopilotKitCoreReact, type CopilotKitCoreReactConfig, type CopilotKitCoreReactSubscriber, CopilotKitInspector, type CopilotKitInspectorProps, CopilotKitProvider, type CopilotKitProviderProps, CopilotModalHeader, type CopilotModalHeaderProps, CopilotPopup, type CopilotPopupProps, CopilotPopupView, type CopilotPopupViewProps, CopilotSidebar, type CopilotSidebarProps, CopilotSidebarView, type CopilotSidebarViewProps, type JsonSerializable, type ReactActivityMessageRenderer, type ReactCustomMessageRenderer, type ReactCustomMessageRendererPosition, type ReactFrontendTool, type ReactHumanInTheLoop, type ReactToolCallRenderer, type ToolsMenuItem, WildcardToolCallRender, defineToolCallRenderer, useAgent, useAgentContext, useConfigureSuggestions, useCopilotChatConfiguration, useCopilotKit, useFrontendTool, useHumanInTheLoop, useRenderActivityMessage, useRenderCustomMessages, useRenderToolCall, useSuggestions };
|
package/dist/index.d.ts
CHANGED
|
@@ -8,8 +8,6 @@ import React__default, { ReactNode } from 'react';
|
|
|
8
8
|
import { Streamdown } from 'streamdown';
|
|
9
9
|
import { Suggestion, CopilotKitCore, ToolCallStatus, FrontendTool, DynamicSuggestionsConfig, StaticSuggestionsConfig, CopilotKitCoreConfig, CopilotKitCoreSubscriber, CopilotKitCoreSubscription } from '@copilotkitnext/core';
|
|
10
10
|
import { z } from 'zod';
|
|
11
|
-
import * as _lit_labs_react from '@lit-labs/react';
|
|
12
|
-
import { WebInspectorElement } from '@copilotkitnext/web-inspector';
|
|
13
11
|
|
|
14
12
|
declare const CopilotChatDefaultLabels: {
|
|
15
13
|
chatInputPlaceholder: string;
|
|
@@ -394,12 +392,13 @@ declare namespace CopilotPopup {
|
|
|
394
392
|
|
|
395
393
|
declare const WildcardToolCallRender: ReactToolCallRenderer<any>;
|
|
396
394
|
|
|
397
|
-
|
|
398
|
-
type CopilotKitInspectorBaseProps = React$1.ComponentProps<typeof CopilotKitInspectorBase>;
|
|
399
|
-
interface CopilotKitInspectorProps extends Omit<CopilotKitInspectorBaseProps, "core"> {
|
|
395
|
+
type CopilotKitInspectorBaseProps = {
|
|
400
396
|
core?: CopilotKitCore | null;
|
|
397
|
+
[key: string]: unknown;
|
|
398
|
+
};
|
|
399
|
+
interface CopilotKitInspectorProps extends CopilotKitInspectorBaseProps {
|
|
401
400
|
}
|
|
402
|
-
declare const CopilotKitInspector: React$1.
|
|
401
|
+
declare const CopilotKitInspector: React$1.FC<CopilotKitInspectorProps>;
|
|
403
402
|
|
|
404
403
|
interface UseRenderToolCallProps {
|
|
405
404
|
toolCall: ToolCall;
|
|
@@ -646,4 +645,4 @@ interface CopilotKitProviderProps {
|
|
|
646
645
|
declare const CopilotKitProvider: React__default.FC<CopilotKitProviderProps>;
|
|
647
646
|
declare const useCopilotKit: () => CopilotKitContextValue;
|
|
648
647
|
|
|
649
|
-
export { type AgentContextInput, AudioRecorderError, type AudioRecorderState, CopilotChat, CopilotChatAssistantMessage, type CopilotChatAssistantMessageProps, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, type CopilotChatConfigurationProviderProps, type CopilotChatConfigurationValue, CopilotChatInput, type CopilotChatInputProps, type CopilotChatLabels, CopilotChatMessageView, type CopilotChatMessageViewProps, type CopilotChatProps, CopilotChatSuggestionPill, type CopilotChatSuggestionPillProps, CopilotChatSuggestionView, type CopilotChatSuggestionViewProps, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, type CopilotChatToggleButtonProps, CopilotChatToolCallsView, type CopilotChatToolCallsViewProps, CopilotChatUserMessage, type CopilotChatUserMessageProps, CopilotChatView, type CopilotChatViewProps, type CopilotKitContextValue, CopilotKitCoreReact, type CopilotKitCoreReactConfig, type CopilotKitCoreReactSubscriber, CopilotKitInspector, type
|
|
648
|
+
export { type AgentContextInput, AudioRecorderError, type AudioRecorderState, CopilotChat, CopilotChatAssistantMessage, type CopilotChatAssistantMessageProps, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, type CopilotChatConfigurationProviderProps, type CopilotChatConfigurationValue, CopilotChatInput, type CopilotChatInputProps, type CopilotChatLabels, CopilotChatMessageView, type CopilotChatMessageViewProps, type CopilotChatProps, CopilotChatSuggestionPill, type CopilotChatSuggestionPillProps, CopilotChatSuggestionView, type CopilotChatSuggestionViewProps, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, type CopilotChatToggleButtonProps, CopilotChatToolCallsView, type CopilotChatToolCallsViewProps, CopilotChatUserMessage, type CopilotChatUserMessageProps, CopilotChatView, type CopilotChatViewProps, type CopilotKitContextValue, CopilotKitCoreReact, type CopilotKitCoreReactConfig, type CopilotKitCoreReactSubscriber, CopilotKitInspector, type CopilotKitInspectorProps, CopilotKitProvider, type CopilotKitProviderProps, CopilotModalHeader, type CopilotModalHeaderProps, CopilotPopup, type CopilotPopupProps, CopilotPopupView, type CopilotPopupViewProps, CopilotSidebar, type CopilotSidebarProps, CopilotSidebarView, type CopilotSidebarViewProps, type JsonSerializable, type ReactActivityMessageRenderer, type ReactCustomMessageRenderer, type ReactCustomMessageRendererPosition, type ReactFrontendTool, type ReactHumanInTheLoop, type ReactToolCallRenderer, type ToolsMenuItem, WildcardToolCallRender, defineToolCallRenderer, useAgent, useAgentContext, useConfigureSuggestions, useCopilotChatConfiguration, useCopilotKit, useFrontendTool, useHumanInTheLoop, useRenderActivityMessage, useRenderCustomMessages, useRenderToolCall, useSuggestions };
|
package/dist/index.js
CHANGED
|
@@ -1483,32 +1483,29 @@ var CopilotKitCoreReact = class extends import_core.CopilotKitCore {
|
|
|
1483
1483
|
// src/components/CopilotKitInspector.tsx
|
|
1484
1484
|
var React4 = __toESM(require("react"));
|
|
1485
1485
|
var import_react5 = require("@lit-labs/react");
|
|
1486
|
-
var import_web_inspector = require("@copilotkitnext/web-inspector");
|
|
1487
1486
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1488
|
-
(
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
if (
|
|
1500
|
-
|
|
1501
|
-
}
|
|
1502
|
-
}, [core]);
|
|
1503
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1504
|
-
CopilotKitInspectorBase,
|
|
1505
|
-
{
|
|
1506
|
-
...rest,
|
|
1507
|
-
ref: innerRef
|
|
1487
|
+
var CopilotKitInspector = ({ core, ...rest }) => {
|
|
1488
|
+
const [InspectorComponent, setInspectorComponent] = React4.useState(null);
|
|
1489
|
+
React4.useEffect(() => {
|
|
1490
|
+
let mounted = true;
|
|
1491
|
+
import("@copilotkitnext/web-inspector").then((mod) => {
|
|
1492
|
+
mod.defineWebInspector?.();
|
|
1493
|
+
const Component = (0, import_react5.createComponent)({
|
|
1494
|
+
tagName: mod.WEB_INSPECTOR_TAG,
|
|
1495
|
+
elementClass: mod.WebInspectorElement,
|
|
1496
|
+
react: React4
|
|
1497
|
+
});
|
|
1498
|
+
if (mounted) {
|
|
1499
|
+
setInspectorComponent(() => Component);
|
|
1508
1500
|
}
|
|
1509
|
-
);
|
|
1510
|
-
|
|
1511
|
-
|
|
1501
|
+
});
|
|
1502
|
+
return () => {
|
|
1503
|
+
mounted = false;
|
|
1504
|
+
};
|
|
1505
|
+
}, []);
|
|
1506
|
+
if (!InspectorComponent) return null;
|
|
1507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(InspectorComponent, { ...rest, core: core ?? null });
|
|
1508
|
+
};
|
|
1512
1509
|
CopilotKitInspector.displayName = "CopilotKitInspector";
|
|
1513
1510
|
|
|
1514
1511
|
// src/providers/CopilotKitProvider.tsx
|