@copilotkitnext/react 0.0.22-alpha.9 → 0.0.22

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 CHANGED
@@ -1,13 +1,15 @@
1
+ import { AssistantMessage, Message, UserMessage, ToolCall, ToolMessage, ActivityMessage } from '@ag-ui/core';
2
+ export * from '@ag-ui/core';
3
+ import { AbstractAgent, Context } from '@ag-ui/client';
4
+ export * from '@ag-ui/client';
1
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
6
  import * as React$1 from 'react';
3
7
  import React__default, { ReactNode } from 'react';
4
- import { AssistantMessage, Message, UserMessage, ToolCall, ToolMessage, ActivityMessage } from '@ag-ui/core';
5
8
  import { Streamdown } from 'streamdown';
6
- import { Suggestion, CopilotKitCore, ToolCallStatus, FrontendTool, DynamicSuggestionsConfig, StaticSuggestionsConfig, CopilotKitCoreConfig, CopilotKitCoreSubscriber } from '@copilotkitnext/core';
9
+ import { Suggestion, CopilotKitCore, ToolCallStatus, FrontendTool, DynamicSuggestionsConfig, StaticSuggestionsConfig, CopilotKitCoreConfig, CopilotKitCoreSubscriber, CopilotKitCoreSubscription } from '@copilotkitnext/core';
7
10
  import { z } from 'zod';
8
11
  import * as _lit_labs_react from '@lit-labs/react';
9
12
  import { WebInspectorElement } from '@copilotkitnext/web-inspector';
10
- import { AbstractAgent, Context } from '@ag-ui/client';
11
13
 
12
14
  declare const CopilotChatDefaultLabels: {
13
15
  chatInputPlaceholder: string;
@@ -503,7 +505,7 @@ interface UseAgentProps {
503
505
  updates?: UseAgentUpdate[];
504
506
  }
505
507
  declare function useAgent({ agentId, updates }?: UseAgentProps): {
506
- agent: AbstractAgent | undefined;
508
+ agent: AbstractAgent;
507
509
  };
508
510
 
509
511
  declare function useAgentContext(context: Context): void;
@@ -608,8 +610,7 @@ declare class CopilotKitCoreReact extends CopilotKitCore {
608
610
  get renderActivityMessages(): Readonly<ReactActivityMessageRenderer<any>>[];
609
611
  get renderToolCalls(): Readonly<ReactToolCallRenderer<any>>[];
610
612
  setRenderToolCalls(renderToolCalls: ReactToolCallRenderer<any>[]): void;
611
- subscribe(subscriber: CopilotKitCoreReactSubscriber): () => void;
612
- unsubscribe(subscriber: CopilotKitCoreReactSubscriber): void;
613
+ subscribe(subscriber: CopilotKitCoreReactSubscriber): CopilotKitCoreSubscription;
613
614
  }
614
615
 
615
616
  interface CopilotKitContextValue {
package/dist/index.d.ts CHANGED
@@ -1,13 +1,15 @@
1
+ import { AssistantMessage, Message, UserMessage, ToolCall, ToolMessage, ActivityMessage } from '@ag-ui/core';
2
+ export * from '@ag-ui/core';
3
+ import { AbstractAgent, Context } from '@ag-ui/client';
4
+ export * from '@ag-ui/client';
1
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
6
  import * as React$1 from 'react';
3
7
  import React__default, { ReactNode } from 'react';
4
- import { AssistantMessage, Message, UserMessage, ToolCall, ToolMessage, ActivityMessage } from '@ag-ui/core';
5
8
  import { Streamdown } from 'streamdown';
6
- import { Suggestion, CopilotKitCore, ToolCallStatus, FrontendTool, DynamicSuggestionsConfig, StaticSuggestionsConfig, CopilotKitCoreConfig, CopilotKitCoreSubscriber } from '@copilotkitnext/core';
9
+ import { Suggestion, CopilotKitCore, ToolCallStatus, FrontendTool, DynamicSuggestionsConfig, StaticSuggestionsConfig, CopilotKitCoreConfig, CopilotKitCoreSubscriber, CopilotKitCoreSubscription } from '@copilotkitnext/core';
7
10
  import { z } from 'zod';
8
11
  import * as _lit_labs_react from '@lit-labs/react';
9
12
  import { WebInspectorElement } from '@copilotkitnext/web-inspector';
10
- import { AbstractAgent, Context } from '@ag-ui/client';
11
13
 
12
14
  declare const CopilotChatDefaultLabels: {
13
15
  chatInputPlaceholder: string;
@@ -503,7 +505,7 @@ interface UseAgentProps {
503
505
  updates?: UseAgentUpdate[];
504
506
  }
505
507
  declare function useAgent({ agentId, updates }?: UseAgentProps): {
506
- agent: AbstractAgent | undefined;
508
+ agent: AbstractAgent;
507
509
  };
508
510
 
509
511
  declare function useAgentContext(context: Context): void;
@@ -608,8 +610,7 @@ declare class CopilotKitCoreReact extends CopilotKitCore {
608
610
  get renderActivityMessages(): Readonly<ReactActivityMessageRenderer<any>>[];
609
611
  get renderToolCalls(): Readonly<ReactToolCallRenderer<any>>[];
610
612
  setRenderToolCalls(renderToolCalls: ReactToolCallRenderer<any>[]): void;
611
- subscribe(subscriber: CopilotKitCoreReactSubscriber): () => void;
612
- unsubscribe(subscriber: CopilotKitCoreReactSubscriber): void;
613
+ subscribe(subscriber: CopilotKitCoreReactSubscriber): CopilotKitCoreSubscription;
613
614
  }
614
615
 
615
616
  interface CopilotKitContextValue {