@copilotkit/react-core 2.0.0-rc.37 → 2.0.0-rc.39
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/MarkdownRendererContext-BL8ct_3U.d.mts +34 -0
- package/dist/MarkdownRendererContext-BL8ct_3U.d.mts.map +1 -0
- package/dist/MarkdownRendererContext-C2J_lgqF.d.cts +34 -0
- package/dist/MarkdownRendererContext-C2J_lgqF.d.cts.map +1 -0
- package/dist/MarkdownSurfaces-Byz821bg.mjs +324 -0
- package/dist/MarkdownSurfaces-Byz821bg.mjs.map +1 -0
- package/dist/MarkdownSurfaces-D2Ck-cbb.cjs +378 -0
- package/dist/MarkdownSurfaces-D2Ck-cbb.cjs.map +1 -0
- package/dist/{MarkdownSurfaces-BQ1HGCzB.mjs → chat-Bf0vVdo7.mjs} +642 -484
- package/dist/chat-Bf0vVdo7.mjs.map +1 -0
- package/dist/{MarkdownSurfaces-BFoO6wSB.cjs → chat-D3fxo6Ah.cjs} +663 -529
- package/dist/chat-D3fxo6Ah.cjs.map +1 -0
- package/dist/{MarkdownRendererContext-CPfNVyde.d.mts → chat-DgP2N7bD.d.mts} +31 -39
- package/dist/chat-DgP2N7bD.d.mts.map +1 -0
- package/dist/{MarkdownRendererContext-iOl2pj9l.d.cts → chat-DtHs4alO.d.cts} +31 -39
- package/dist/chat-DtHs4alO.d.cts.map +1 -0
- package/dist/generative-ui/native.cjs +66 -0
- package/dist/generative-ui/native.cjs.map +1 -0
- package/dist/generative-ui/native.d.cts +155 -0
- package/dist/generative-ui/native.d.cts.map +1 -0
- package/dist/generative-ui/native.d.mts +155 -0
- package/dist/generative-ui/native.d.mts.map +1 -0
- package/dist/generative-ui/native.mjs +24 -0
- package/dist/generative-ui/native.mjs.map +1 -0
- package/dist/generative-ui.cjs +45 -70
- package/dist/generative-ui.cjs.map +1 -1
- package/dist/generative-ui.d.cts +72 -144
- package/dist/generative-ui.d.cts.map +1 -1
- package/dist/generative-ui.d.mts +72 -144
- package/dist/generative-ui.d.mts.map +1 -1
- package/dist/generative-ui.mjs +4 -29
- package/dist/generative-ui.mjs.map +1 -1
- package/dist/headless.d.cts +58 -153
- package/dist/headless.d.cts.map +1 -1
- package/dist/hooks-2Ur8NQhj.d.cts +84 -0
- package/dist/hooks-2Ur8NQhj.d.cts.map +1 -0
- package/dist/hooks-BRYonCVu.d.mts +84 -0
- package/dist/hooks-BRYonCVu.d.mts.map +1 -0
- package/dist/index.cjs +82 -430
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +4 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +5 -353
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +645 -140
- package/dist/index.umd.js.map +1 -1
- package/dist/refs-BIUfn1wb.cjs +43 -0
- package/dist/refs-BIUfn1wb.cjs.map +1 -0
- package/dist/refs-CMrRm3ta.mjs +31 -0
- package/dist/refs-CMrRm3ta.mjs.map +1 -0
- package/dist/use-generative-ui-root-C12htqbK.cjs +390 -0
- package/dist/use-generative-ui-root-C12htqbK.cjs.map +1 -0
- package/dist/use-generative-ui-root-CVgsDy1f.mjs +385 -0
- package/dist/use-generative-ui-root-CVgsDy1f.mjs.map +1 -0
- package/package.json +14 -10
- package/dist/MarkdownRendererContext-CPfNVyde.d.mts.map +0 -1
- package/dist/MarkdownRendererContext-iOl2pj9l.d.cts.map +0 -1
- package/dist/MarkdownSurfaces-BFoO6wSB.cjs.map +0 -1
- package/dist/MarkdownSurfaces-BQ1HGCzB.mjs.map +0 -1
package/dist/headless.d.cts
CHANGED
|
@@ -1,162 +1,12 @@
|
|
|
1
|
+
import { CopilotKitCoreReact, CopilotKitCoreReactConfig, useCopilotKit } from "@copilotkit/react-core/context";
|
|
1
2
|
import React$1, { ComponentType, MutableRefObject, ReactNode } from "react";
|
|
2
3
|
import * as _copilotkit_core0 from "@copilotkit/core";
|
|
3
|
-
import {
|
|
4
|
-
import { InferSchemaOutput, StandardSchemaV1 } from "@copilotkit/shared";
|
|
4
|
+
import { CopilotChatDefaultLabels, CopilotChatLabels, CopilotChatLabels as CopilotChatLabels$1, FrontendTool, HumanInTheLoopRenderProps, InterruptEvent, InterruptHandlerProps, InterruptRenderProps, Suggestion, ToolCallRenderProps, ToolCallRendererDef, ɵChatConfigurationStore, ɵJsonSerializable, ɵSuggestionsConfigInput, ɵThreadSummary } from "@copilotkit/core";
|
|
5
5
|
import * as _ag_ui_client0 from "@ag-ui/client";
|
|
6
6
|
import { Interrupt, ResumeEntry, ResumeStatus } from "@ag-ui/client";
|
|
7
|
+
import { InferSchemaOutput, StandardSchemaV1 } from "@copilotkit/shared";
|
|
7
8
|
import { AgentCapabilities, ToolCall, ToolMessage } from "@ag-ui/core";
|
|
8
9
|
|
|
9
|
-
//#region src/types/react-tool-call-renderer.d.ts
|
|
10
|
-
/**
|
|
11
|
-
* A tool call renderer for React: a React component that draws one tool call
|
|
12
|
-
* in the chat. The component receives {@link ToolCallRenderProps}.
|
|
13
|
-
*
|
|
14
|
-
* Pass a list of these to `renderToolCalls` on `CopilotKitProvider`, or build
|
|
15
|
-
* one with `defineToolCallRenderer`.
|
|
16
|
-
*
|
|
17
|
-
* @typeParam T - The shape of the tool arguments.
|
|
18
|
-
*/
|
|
19
|
-
type ReactToolCallRenderer<T = unknown> = ToolCallRendererDef<T, React$1.ComponentType<ToolCallRenderProps<T>>>;
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region src/types/react-activity-message-renderer.d.ts
|
|
22
|
-
/**
|
|
23
|
-
* An activity message renderer for React: a React component that draws
|
|
24
|
-
* activity messages of one `activityType` (or `"*"` for any type). The
|
|
25
|
-
* component receives {@link ActivityMessageRenderProps}.
|
|
26
|
-
*
|
|
27
|
-
* @typeParam TActivityContent - The shape of the activity content.
|
|
28
|
-
*/
|
|
29
|
-
type ReactActivityMessageRenderer<TActivityContent> = ActivityMessageRendererDef<TActivityContent, React$1.ComponentType<ActivityMessageRenderProps<TActivityContent>>>;
|
|
30
|
-
//#endregion
|
|
31
|
-
//#region src/types/react-custom-message-renderer.d.ts
|
|
32
|
-
/**
|
|
33
|
-
* Props a React custom message renderer receives: the same as
|
|
34
|
-
* {@link CustomMessageRenderProps}, with `stateSnapshot` typed `any` so a
|
|
35
|
-
* component can read the agent state without a cast.
|
|
36
|
-
*/
|
|
37
|
-
type ReactCustomMessageRenderProps = Omit<CustomMessageRenderProps, "stateSnapshot"> & {
|
|
38
|
-
stateSnapshot: any;
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* A custom message renderer for React: a component that draws before or
|
|
42
|
-
* after each chat message. Return `null` from the component to draw nothing
|
|
43
|
-
* for a message. A `null` render is skipped.
|
|
44
|
-
*/
|
|
45
|
-
type ReactCustomMessageRenderer = CustomMessageRendererDef<React$1.ComponentType<ReactCustomMessageRenderProps> | null>;
|
|
46
|
-
//#endregion
|
|
47
|
-
//#region src/types/frontend-tool.d.ts
|
|
48
|
-
type ReactFrontendTool<T extends Record<string, unknown> = Record<string, unknown>> = FrontendTool<T> & {
|
|
49
|
-
render?: ReactToolCallRenderer<T>["render"];
|
|
50
|
-
};
|
|
51
|
-
//#endregion
|
|
52
|
-
//#region src/types/human-in-the-loop.d.ts
|
|
53
|
-
/**
|
|
54
|
-
* A human-in-the-loop tool for React. It has no handler: the agent waits until
|
|
55
|
-
* the `render` component calls `respond` with the user's answer.
|
|
56
|
-
*
|
|
57
|
-
* @typeParam T - The shape of the tool arguments.
|
|
58
|
-
*/
|
|
59
|
-
type ReactHumanInTheLoop<T extends Record<string, unknown> = Record<string, unknown>> = Omit<FrontendTool<T>, "handler"> & {
|
|
60
|
-
/**
|
|
61
|
-
* Render the human-in-the-loop UI for this tool call. The component
|
|
62
|
-
* receives {@link HumanInTheLoopRenderProps}, which also carry `toolCallId`
|
|
63
|
-
* and `agentId` for attribution.
|
|
64
|
-
*/
|
|
65
|
-
render: React$1.ComponentType<HumanInTheLoopRenderProps<T>>;
|
|
66
|
-
};
|
|
67
|
-
//#endregion
|
|
68
|
-
//#region src/types/defineToolCallRenderer.d.ts
|
|
69
|
-
/**
|
|
70
|
-
* Helper to define a type-safe tool call renderer entry.
|
|
71
|
-
* - Accepts a single object whose keys match ReactToolCallRenderer's fields: { name, args, render, agentId? }.
|
|
72
|
-
* - Derives `args` type from the provided schema (any Standard Schema V1 compatible library).
|
|
73
|
-
* - Ensures the render function param type exactly matches ReactToolCallRenderer<T>["render"]'s param.
|
|
74
|
-
* - For wildcard tools (name: "*"), args is optional and defaults to a schema that accepts any value.
|
|
75
|
-
*/
|
|
76
|
-
declare function defineToolCallRenderer(def: {
|
|
77
|
-
name: "*";
|
|
78
|
-
render: (props: ToolCallRenderProps<any>) => React$1.ReactElement | null;
|
|
79
|
-
agentId?: string;
|
|
80
|
-
group?: boolean;
|
|
81
|
-
}): ReactToolCallRenderer<any>;
|
|
82
|
-
declare function defineToolCallRenderer<S extends StandardSchemaV1>(def: {
|
|
83
|
-
name: string;
|
|
84
|
-
args: S;
|
|
85
|
-
render: (props: ToolCallRenderProps<InferSchemaOutput<S>>) => React$1.ReactElement | null;
|
|
86
|
-
agentId?: string;
|
|
87
|
-
group?: boolean;
|
|
88
|
-
}): ReactToolCallRenderer<InferSchemaOutput<S>>;
|
|
89
|
-
//#endregion
|
|
90
|
-
//#region src/lib/react-core.d.ts
|
|
91
|
-
interface CopilotKitCoreReactConfig extends CopilotKitCoreConfig {
|
|
92
|
-
renderToolCalls?: ReactToolCallRenderer<any>[];
|
|
93
|
-
renderActivityMessages?: ReactActivityMessageRenderer<any>[];
|
|
94
|
-
renderCustomMessages?: ReactCustomMessageRenderer[];
|
|
95
|
-
}
|
|
96
|
-
interface CopilotKitCoreReactSubscriber extends CopilotKitCoreSubscriber {
|
|
97
|
-
onRenderToolCallsChanged?: (event: {
|
|
98
|
-
copilotkit: CopilotKitCore;
|
|
99
|
-
renderToolCalls: readonly ReactToolCallRenderer<any>[];
|
|
100
|
-
}) => void | Promise<void>;
|
|
101
|
-
onRenderActivityMessagesChanged?: (event: {
|
|
102
|
-
copilotkit: CopilotKitCore;
|
|
103
|
-
renderActivityMessages: readonly ReactActivityMessageRenderer<any>[];
|
|
104
|
-
}) => void | Promise<void>;
|
|
105
|
-
onRenderCustomMessagesChanged?: (event: {
|
|
106
|
-
copilotkit: CopilotKitCore;
|
|
107
|
-
renderCustomMessages: readonly ReactCustomMessageRenderer[];
|
|
108
|
-
}) => void | Promise<void>;
|
|
109
|
-
onInterruptElementChanged?: (event: {
|
|
110
|
-
copilotkit: CopilotKitCore;
|
|
111
|
-
interruptElement: React$1.ReactElement | null;
|
|
112
|
-
}) => void | Promise<void>;
|
|
113
|
-
}
|
|
114
|
-
declare class CopilotKitCoreReact extends CopilotKitCore {
|
|
115
|
-
private readonly _renderers;
|
|
116
|
-
constructor(config: CopilotKitCoreReactConfig);
|
|
117
|
-
get renderCustomMessages(): readonly ReactCustomMessageRenderer[];
|
|
118
|
-
get renderActivityMessages(): readonly ReactActivityMessageRenderer<any>[];
|
|
119
|
-
/**
|
|
120
|
-
* Prop, hook and built-in renderers merged. For one name and agentId, a
|
|
121
|
-
* hook renderer wins over a prop one, and both win over a built-in one.
|
|
122
|
-
*/
|
|
123
|
-
get renderToolCalls(): readonly ReactToolCallRenderer<any>[];
|
|
124
|
-
setRenderActivityMessages(renderers: ReactActivityMessageRenderer<any>[]): void;
|
|
125
|
-
setRenderCustomMessages(renderers: ReactCustomMessageRenderer[]): void;
|
|
126
|
-
setRenderToolCalls(renderToolCalls: ReactToolCallRenderer<any>[]): void;
|
|
127
|
-
addHookRenderToolCall(entry: ReactToolCallRenderer<any>): void;
|
|
128
|
-
removeHookRenderToolCall(name: string, agentId?: string): void;
|
|
129
|
-
/**
|
|
130
|
-
* @internal Add a renderer for a tool a built-in feature owns (A2UI,
|
|
131
|
-
* generative UI). Prop and hook renderers with the same name and agent win
|
|
132
|
-
* over it, and `setRenderToolCalls` never removes it.
|
|
133
|
-
*
|
|
134
|
-
* @returns A function that removes the renderer.
|
|
135
|
-
*/
|
|
136
|
-
ɵaddBuiltInRenderToolCall(entry: ReactToolCallRenderer): () => void;
|
|
137
|
-
private notifyRenderersChanged;
|
|
138
|
-
get interruptElement(): React$1.ReactElement | null;
|
|
139
|
-
setInterruptElement(element: React$1.ReactElement | null): void;
|
|
140
|
-
subscribe(subscriber: CopilotKitCoreReactSubscriber): CopilotKitCoreSubscription;
|
|
141
|
-
}
|
|
142
|
-
//#endregion
|
|
143
|
-
//#region src/context.d.ts
|
|
144
|
-
interface CopilotKitContextValue {
|
|
145
|
-
copilotkit: CopilotKitCoreReact;
|
|
146
|
-
/**
|
|
147
|
-
* Whether CopilotKit should automatically mount Intelligence indicators.
|
|
148
|
-
* Defaults to true when omitted for compatibility with custom providers.
|
|
149
|
-
*/
|
|
150
|
-
showIntelligenceIndicator?: boolean;
|
|
151
|
-
/**
|
|
152
|
-
* Set of tool call IDs currently being executed.
|
|
153
|
-
* This is tracked at the provider level to ensure tool execution events
|
|
154
|
-
* are captured even before child components mount.
|
|
155
|
-
*/
|
|
156
|
-
executingToolCallIds: ReadonlySet<string>;
|
|
157
|
-
}
|
|
158
|
-
declare const useCopilotKit: () => CopilotKitContextValue;
|
|
159
|
-
//#endregion
|
|
160
10
|
//#region src/providers/use-owned-core.d.ts
|
|
161
11
|
/** The part of a core this hook needs: something it can dispose. */
|
|
162
12
|
interface Disposable {
|
|
@@ -417,6 +267,23 @@ declare function useAgent({
|
|
|
417
267
|
isReady: boolean;
|
|
418
268
|
};
|
|
419
269
|
//#endregion
|
|
270
|
+
//#region src/types/react-tool-call-renderer.d.ts
|
|
271
|
+
/**
|
|
272
|
+
* A tool call renderer for React: a React component that draws one tool call
|
|
273
|
+
* in the chat. The component receives {@link ToolCallRenderProps}.
|
|
274
|
+
*
|
|
275
|
+
* Pass a list of these to `renderToolCalls` on `CopilotKitProvider`, or build
|
|
276
|
+
* one with `defineToolCallRenderer`.
|
|
277
|
+
*
|
|
278
|
+
* @typeParam T - The shape of the tool arguments.
|
|
279
|
+
*/
|
|
280
|
+
type ReactToolCallRenderer<T = unknown> = ToolCallRendererDef<T, React$1.ComponentType<ToolCallRenderProps<T>>>;
|
|
281
|
+
//#endregion
|
|
282
|
+
//#region src/types/frontend-tool.d.ts
|
|
283
|
+
type ReactFrontendTool<T extends Record<string, unknown> = Record<string, unknown>> = FrontendTool<T> & {
|
|
284
|
+
render?: ReactToolCallRenderer<T>["render"];
|
|
285
|
+
};
|
|
286
|
+
//#endregion
|
|
420
287
|
//#region src/hooks/use-frontend-tool.d.ts
|
|
421
288
|
/**
|
|
422
289
|
* Register a frontend tool while the component is mounted. The agent can
|
|
@@ -559,6 +426,22 @@ declare function useComponent<TSchema extends StandardSchemaV1<any, Record<strin
|
|
|
559
426
|
followUp?: boolean;
|
|
560
427
|
}, deps?: ReadonlyArray<unknown>): void;
|
|
561
428
|
//#endregion
|
|
429
|
+
//#region src/types/human-in-the-loop.d.ts
|
|
430
|
+
/**
|
|
431
|
+
* A human-in-the-loop tool for React. It has no handler: the agent waits until
|
|
432
|
+
* the `render` component calls `respond` with the user's answer.
|
|
433
|
+
*
|
|
434
|
+
* @typeParam T - The shape of the tool arguments.
|
|
435
|
+
*/
|
|
436
|
+
type ReactHumanInTheLoop<T extends Record<string, unknown> = Record<string, unknown>> = Omit<FrontendTool<T>, "handler"> & {
|
|
437
|
+
/**
|
|
438
|
+
* Render the human-in-the-loop UI for this tool call. The component
|
|
439
|
+
* receives {@link HumanInTheLoopRenderProps}, which also carry `toolCallId`
|
|
440
|
+
* and `agentId` for attribution.
|
|
441
|
+
*/
|
|
442
|
+
render: React$1.ComponentType<HumanInTheLoopRenderProps<T>>;
|
|
443
|
+
};
|
|
444
|
+
//#endregion
|
|
562
445
|
//#region src/hooks/use-human-in-the-loop.d.ts
|
|
563
446
|
declare function useHumanInTheLoop<T extends Record<string, unknown> = Record<string, unknown>>(tool: ReactHumanInTheLoop<T>, deps?: ReadonlyArray<unknown>): void;
|
|
564
447
|
//#endregion
|
|
@@ -963,6 +846,28 @@ declare function useRenderToolCall(): ({
|
|
|
963
846
|
toolMessage
|
|
964
847
|
}: UseRenderToolCallProps) => React$1.ReactElement | null;
|
|
965
848
|
//#endregion
|
|
849
|
+
//#region src/types/defineToolCallRenderer.d.ts
|
|
850
|
+
/**
|
|
851
|
+
* Helper to define a type-safe tool call renderer entry.
|
|
852
|
+
* - Accepts a single object whose keys match ReactToolCallRenderer's fields: { name, args, render, agentId? }.
|
|
853
|
+
* - Derives `args` type from the provided schema (any Standard Schema V1 compatible library).
|
|
854
|
+
* - Ensures the render function param type exactly matches ReactToolCallRenderer<T>["render"]'s param.
|
|
855
|
+
* - For wildcard tools (name: "*"), args is optional and defaults to a schema that accepts any value.
|
|
856
|
+
*/
|
|
857
|
+
declare function defineToolCallRenderer(def: {
|
|
858
|
+
name: "*";
|
|
859
|
+
render: (props: ToolCallRenderProps<any>) => React$1.ReactElement | null;
|
|
860
|
+
agentId?: string;
|
|
861
|
+
group?: boolean;
|
|
862
|
+
}): ReactToolCallRenderer<any>;
|
|
863
|
+
declare function defineToolCallRenderer<S extends StandardSchemaV1>(def: {
|
|
864
|
+
name: string;
|
|
865
|
+
args: S;
|
|
866
|
+
render: (props: ToolCallRenderProps<InferSchemaOutput<S>>) => React$1.ReactElement | null;
|
|
867
|
+
agentId?: string;
|
|
868
|
+
group?: boolean;
|
|
869
|
+
}): ReactToolCallRenderer<InferSchemaOutput<S>>;
|
|
870
|
+
//#endregion
|
|
966
871
|
//#region src/hooks/use-capabilities.d.ts
|
|
967
872
|
/**
|
|
968
873
|
* Returns the capabilities declared by the given agent (or the agent resolved
|
package/dist/headless.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"headless.d.cts","names":[],"sources":["../src/
|
|
1
|
+
{"version":3,"file":"headless.d.cts","names":[],"sources":["../src/providers/use-owned-core.ts","../src/providers/CopilotChatConfigurationProvider.tsx","../src/hooks/use-agent.tsx","../src/types/react-tool-call-renderer.ts","../src/types/frontend-tool.ts","../src/hooks/use-frontend-tool.tsx","../src/hooks/use-frontend-tools.tsx","../src/hooks/use-component.tsx","../src/types/human-in-the-loop.ts","../src/hooks/use-human-in-the-loop.tsx","../src/hooks/use-interrupt.tsx","../src/hooks/use-suggestions.tsx","../src/hooks/use-configure-suggestions.tsx","../src/hooks/use-agent-context.tsx","../src/hooks/use-threads.tsx","../src/hooks/use-render-tool.tsx","../src/hooks/use-render-tool-call.tsx","../src/types/defineToolCallRenderer.ts","../src/hooks/use-capabilities.tsx"],"mappings":";;;;;;;;;;;UAIU,UAAA;EACR,OAAA;AAAA;;;;;;AAJ4C;;;;;AAyB9C;;;;;;;;iBAAgB,aAAA,WAAwB,UAAA,CAAA,CACtC,GAAA,EAAK,gBAAA,CAAiB,CAAA,UACtB,MAAA,QAAc,CAAA,GAAC,CAAA;;;UCRA,6BAAA;EACf,MAAA,EAAQ,mBAAA;EACR,OAAA;EACA,QAAA;EACA,WAAA;EACA,YAAA,GAAe,IAAA;EDrBP;;;;;EC2BR,UAAA;EDL2B;;;;;ECW3B,aAAA,GAAgB,IAAA;EDTD;;;;;ECef,gBAAA;EDhBsB;;;;;;;ECwBtB,cAAA;;;AA/BF;;;;;;;;EA0CE,oBAAA,GAAuB,UAAA,GAAa,IAAA;EAKpC,mBAAA;EA1Ce;;;;;;;;;;;;;;;;;EA4Df,iBAAA,GACE,QAAA,UACA,OAAA;IAAY,QAAA;EAAA;EAwBsC;;;;;;;;;EAbpD,cAAA;EAeS;;;;EAVT,MAAA,GAAS,uBAAA;AAAA;AAAA,UAQM,qCAAA;EACf,QAAA,EAAU,SAAA;EACV,MAAA,GAAS,OAAA,CAAQ,mBAAA;EACjB,OAAA;EACA,QAAA;EAMA,mBAAA;EACA,kBAAA;AAAA;AAAA,cAIW,gCAAA,EAAkC,OAAA,CAAM,EAAA,CACnD,qCAAA;AAAA,cAoIW,2BAAA,QACP,6BAAA;;;aC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;EACZ,MAAA,GAAS,KAAA,EAAO,eAAA,CAAgB,CAAA,MAAO,KAAA,CAAM,YAAA;EAC7C,OAAA,WdeS;EcbT,KAAA;AAAA,GAEF,IAAA,GAAO,aAAA;;;UChGQ,sBAAA;EACf,QAAA,EAAU,QAAA;EACV,WAAA,GAAc,WAAA;AAAA;;;;;;;iBAsHA,iBAAA,CAAA;EAAiB,QAAA;EAAA;AAAA,GAoB1B,sBAAA,KAAyB,OAAA,CAAM,YAAA;;;;;;;;;AhB9JQ;iBiBa9B,sBAAA,CAAuB,GAAA;EACrC,IAAA;EACA,MAAA,GAAS,KAAA,EAAO,mBAAA,UAA6B,OAAA,CAAM,YAAA;EACnD,OAAA;EACA,KAAA;AAAA,IACE,qBAAA;AAAA,iBAGY,sBAAA,WAAiC,gBAAA,CAAA,CAAkB,GAAA;EACjE,IAAA;EACA,IAAA,EAAM,CAAA;EACN,MAAA,GACE,KAAA,EAAO,mBAAA,CAAoB,iBAAA,CAAkB,CAAA,OAC1C,OAAA,CAAM,YAAA;EACX,OAAA;EACA,KAAA;AAAA,IACE,qBAAA,CAAsB,iBAAA,CAAkB,CAAA;;;;;;;;;;;;AjB7BE;;;;iBkBgB9B,eAAA,CACd,OAAA,YACC,iBAAA"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { D as GenerativeUIFunctionName, S as GenerativeUIDefinitionsOf, c as GenerativeUIRuntime, k as GenerativeUIStateOf, v as GenerativeUI$1, w as GenerativeUIFunctionArgs } from "./chat-DtHs4alO.cjs";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
import { SchemaInput } from "@copilotkit/shared/generative-ui";
|
|
4
|
+
import * as zod from "zod";
|
|
5
|
+
import * as zod_v4_core0 from "zod/v4/core";
|
|
6
|
+
|
|
7
|
+
//#region src/generative-ui/refs.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* One component id. The component receives the rendered child. Pass the
|
|
10
|
+
* description here, not with `.describe()`, which would replace the mark.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const tabsSchema = z.object({
|
|
15
|
+
* tabs: z.array(z.object({ title: z.string(), child: child() })),
|
|
16
|
+
* });
|
|
17
|
+
* // The component gets `tabs: { title: string; child: ReactNode }[]`.
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
declare function child(description?: string): zod.ZodPipe<zod.ZodString, zod.ZodTransform<ReactNode, string>>;
|
|
21
|
+
/**
|
|
22
|
+
* A list of component ids, or a template `{ componentId, path }` that
|
|
23
|
+
* repeats one component for each item of the list at `path`. The
|
|
24
|
+
* component receives the rendered children. Pass the description here,
|
|
25
|
+
* not with `.describe()`.
|
|
26
|
+
*/
|
|
27
|
+
declare function childList(description?: string): zod.ZodPipe<zod.ZodUnion<readonly [zod.ZodArray<zod.ZodString>, zod.ZodObject<{
|
|
28
|
+
componentId: zod.ZodString;
|
|
29
|
+
path: zod.ZodString;
|
|
30
|
+
}, zod_v4_core0.$strip>]>, zod.ZodTransform<ReactNode, string[] | {
|
|
31
|
+
componentId: string;
|
|
32
|
+
path: string;
|
|
33
|
+
}>>;
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/generative-ui/hooks.d.ts
|
|
36
|
+
/** Re-renders on any surface-manager change. */
|
|
37
|
+
declare function useManagerVersion(runtime: GenerativeUIRuntime | null): number;
|
|
38
|
+
/** What `useGenerativeUIState` takes for one key: the input of its schema. */
|
|
39
|
+
type StateInput<UI extends GenerativeUI$1<any>, Key extends keyof GenerativeUIStateOf<UI>> = SchemaInput<GenerativeUIDefinitionsOf<UI>["state"][Key]>;
|
|
40
|
+
/**
|
|
41
|
+
* Experimental. Gives one key of the app state declared in
|
|
42
|
+
* `createGenerativeUI({ state })` its value. Bound props of generated
|
|
43
|
+
* components read it. The model does not see it.
|
|
44
|
+
*
|
|
45
|
+
* The key is set on mount and when the value changes (compared as JSON). It
|
|
46
|
+
* is removed on unmount.
|
|
47
|
+
*
|
|
48
|
+
* @param ui - The object from `createGenerativeUI`. It gives the key and the
|
|
49
|
+
* value their types.
|
|
50
|
+
* @param key - A top-level key of `state`.
|
|
51
|
+
* @param value - The value of that key. It must fit the key's schema.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```tsx
|
|
55
|
+
* useGenerativeUIState(storeUI, "cart", { count, total, coupon, items });
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
declare function useGenerativeUIState<UI extends GenerativeUI$1<any>, Key extends keyof GenerativeUIStateOf<UI> & string>(ui: UI, key: Key, value: StateInput<UI, Key>): void;
|
|
59
|
+
/**
|
|
60
|
+
* Experimental. Mounts the handler of a function declared in
|
|
61
|
+
* `createGenerativeUI({ functions })`. Generated UI can call the function
|
|
62
|
+
* only while exactly one handler for it is mounted.
|
|
63
|
+
*
|
|
64
|
+
* The handler gets the parsed arguments: schema defaults are set. It can
|
|
65
|
+
* change on each render. The latest handler always runs, and the hook does
|
|
66
|
+
* not register again.
|
|
67
|
+
*
|
|
68
|
+
* @param ui - The object from `createGenerativeUI`. It gives the name and the
|
|
69
|
+
* handler arguments their types.
|
|
70
|
+
* @param name - A key of `functions`.
|
|
71
|
+
* @param handler - Runs when generated UI calls the function. Its return
|
|
72
|
+
* value goes back to the caller as `{ ok: true, result }`.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```tsx
|
|
76
|
+
* useGenerativeUIFunction(storeUI, "addToCart", ({ productId, quantity }) =>
|
|
77
|
+
* cart.addItem(productId, quantity),
|
|
78
|
+
* );
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
declare function useGenerativeUIFunction<UI extends GenerativeUI$1<any>, Name extends GenerativeUIFunctionName<UI>>(ui: UI, name: Name, handler: (args: GenerativeUIFunctionArgs<UI, Name>) => unknown): void;
|
|
82
|
+
//#endregion
|
|
83
|
+
export { childList as a, child as i, useGenerativeUIState as n, useManagerVersion as r, useGenerativeUIFunction as t };
|
|
84
|
+
//# sourceMappingURL=hooks-2Ur8NQhj.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks-2Ur8NQhj.d.cts","names":[],"sources":["../src/generative-ui/refs.ts","../src/generative-ui/hooks.ts"],"mappings":";;;;;;;;;;;;;AAkBA;;;;;;iBAAgB,KAAA,CAAM,WAAA,YAAoB,GAAA,CAAA,OAAA,CAArB,GAAA,CAAqB,SAAA,EAAA,GAAA,CAAA,YAAA,CAAA,SAAA;;;;;;;iBAU1B,SAAA,CAAU,WAAA,gBAAoB,OAAA,CAAA,GAAA,CAAA,QAAA,WAAA,GAAA,CAAA,QAAA,CAArB,GAAA,CAAqB,SAAA,OAAA,SAAA;eAAA,GAAA,CAAA,SAAA;;;;;;;;;iBCR9B,iBAAA,CAAkB,OAAA,EAAS,mBAAA;;KAStC,UAAA,YACQ,cAAA,yBACO,mBAAA,CAAoB,EAAA,KACpC,WAAA,CAAY,yBAAA,CAA0B,EAAA,WAAa,GAAA;ADdvD;;;;;;;;;;;;;;;;AAUA;;AAVA,iBCkCgB,oBAAA,YACH,cAAA,yBACO,mBAAA,CAAoB,EAAA,WAAA,CACtC,EAAA,EAAI,EAAA,EAAI,GAAA,EAAK,GAAA,EAAK,KAAA,EAAO,UAAA,CAAW,EAAA,EAAI,GAAA;;;;;;;;;;;;;;;;;;;;;;;iBA0D1B,uBAAA,YACH,cAAA,oBACE,wBAAA,CAAyB,EAAA,EAAA,CAEtC,EAAA,EAAI,EAAA,EACJ,IAAA,EAAM,IAAA,EACN,OAAA,GAAU,IAAA,EAAM,wBAAA,CAAyB,EAAA,EAAI,IAAA"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { D as GenerativeUIFunctionName, S as GenerativeUIDefinitionsOf, c as GenerativeUIRuntime, k as GenerativeUIStateOf, v as GenerativeUI$1, w as GenerativeUIFunctionArgs } from "./chat-DgP2N7bD.mjs";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
import * as zod from "zod";
|
|
4
|
+
import { SchemaInput } from "@copilotkit/shared/generative-ui";
|
|
5
|
+
import * as zod_v4_core0 from "zod/v4/core";
|
|
6
|
+
|
|
7
|
+
//#region src/generative-ui/refs.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* One component id. The component receives the rendered child. Pass the
|
|
10
|
+
* description here, not with `.describe()`, which would replace the mark.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const tabsSchema = z.object({
|
|
15
|
+
* tabs: z.array(z.object({ title: z.string(), child: child() })),
|
|
16
|
+
* });
|
|
17
|
+
* // The component gets `tabs: { title: string; child: ReactNode }[]`.
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
declare function child$1(description?: string): zod.ZodPipe<zod.ZodString, zod.ZodTransform<ReactNode, string>>;
|
|
21
|
+
/**
|
|
22
|
+
* A list of component ids, or a template `{ componentId, path }` that
|
|
23
|
+
* repeats one component for each item of the list at `path`. The
|
|
24
|
+
* component receives the rendered children. Pass the description here,
|
|
25
|
+
* not with `.describe()`.
|
|
26
|
+
*/
|
|
27
|
+
declare function childList$1(description?: string): zod.ZodPipe<zod.ZodUnion<readonly [zod.ZodArray<zod.ZodString>, zod.ZodObject<{
|
|
28
|
+
componentId: zod.ZodString;
|
|
29
|
+
path: zod.ZodString;
|
|
30
|
+
}, zod_v4_core0.$strip>]>, zod.ZodTransform<ReactNode, string[] | {
|
|
31
|
+
componentId: string;
|
|
32
|
+
path: string;
|
|
33
|
+
}>>;
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/generative-ui/hooks.d.ts
|
|
36
|
+
/** Re-renders on any surface-manager change. */
|
|
37
|
+
declare function useManagerVersion(runtime: GenerativeUIRuntime | null): number;
|
|
38
|
+
/** What `useGenerativeUIState` takes for one key: the input of its schema. */
|
|
39
|
+
type StateInput<UI extends GenerativeUI$1<any>, Key extends keyof GenerativeUIStateOf<UI>> = SchemaInput<GenerativeUIDefinitionsOf<UI>["state"][Key]>;
|
|
40
|
+
/**
|
|
41
|
+
* Experimental. Gives one key of the app state declared in
|
|
42
|
+
* `createGenerativeUI({ state })` its value. Bound props of generated
|
|
43
|
+
* components read it. The model does not see it.
|
|
44
|
+
*
|
|
45
|
+
* The key is set on mount and when the value changes (compared as JSON). It
|
|
46
|
+
* is removed on unmount.
|
|
47
|
+
*
|
|
48
|
+
* @param ui - The object from `createGenerativeUI`. It gives the key and the
|
|
49
|
+
* value their types.
|
|
50
|
+
* @param key - A top-level key of `state`.
|
|
51
|
+
* @param value - The value of that key. It must fit the key's schema.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```tsx
|
|
55
|
+
* useGenerativeUIState(storeUI, "cart", { count, total, coupon, items });
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
declare function useGenerativeUIState<UI extends GenerativeUI$1<any>, Key extends keyof GenerativeUIStateOf<UI> & string>(ui: UI, key: Key, value: StateInput<UI, Key>): void;
|
|
59
|
+
/**
|
|
60
|
+
* Experimental. Mounts the handler of a function declared in
|
|
61
|
+
* `createGenerativeUI({ functions })`. Generated UI can call the function
|
|
62
|
+
* only while exactly one handler for it is mounted.
|
|
63
|
+
*
|
|
64
|
+
* The handler gets the parsed arguments: schema defaults are set. It can
|
|
65
|
+
* change on each render. The latest handler always runs, and the hook does
|
|
66
|
+
* not register again.
|
|
67
|
+
*
|
|
68
|
+
* @param ui - The object from `createGenerativeUI`. It gives the name and the
|
|
69
|
+
* handler arguments their types.
|
|
70
|
+
* @param name - A key of `functions`.
|
|
71
|
+
* @param handler - Runs when generated UI calls the function. Its return
|
|
72
|
+
* value goes back to the caller as `{ ok: true, result }`.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```tsx
|
|
76
|
+
* useGenerativeUIFunction(storeUI, "addToCart", ({ productId, quantity }) =>
|
|
77
|
+
* cart.addItem(productId, quantity),
|
|
78
|
+
* );
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
declare function useGenerativeUIFunction<UI extends GenerativeUI$1<any>, Name extends GenerativeUIFunctionName<UI>>(ui: UI, name: Name, handler: (args: GenerativeUIFunctionArgs<UI, Name>) => unknown): void;
|
|
82
|
+
//#endregion
|
|
83
|
+
export { childList$1 as a, child$1 as i, useGenerativeUIState as n, useManagerVersion as r, useGenerativeUIFunction as t };
|
|
84
|
+
//# sourceMappingURL=hooks-BRYonCVu.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks-BRYonCVu.d.mts","names":[],"sources":["../src/generative-ui/refs.ts","../src/generative-ui/hooks.ts"],"mappings":";;;;;;;;;;;;;AAkBA;;;;;;iBAAgB,OAAA,CAAM,WAAA,YAAoB,GAAA,CAAA,OAAA,CAArB,GAAA,CAAqB,SAAA,EAAA,GAAA,CAAA,YAAA,CAAA,SAAA;;;;;;;iBAU1B,WAAA,CAAU,WAAA,gBAAoB,OAAA,CAAA,GAAA,CAAA,QAAA,WAAA,GAAA,CAAA,QAAA,CAArB,GAAA,CAAqB,SAAA,OAAA,SAAA;eAAA,GAAA,CAAA,SAAA;;;;;;;;;iBCR9B,iBAAA,CAAkB,OAAA,EAAS,mBAAA;;KAStC,UAAA,YACQ,cAAA,yBACO,mBAAA,CAAoB,EAAA,KACpC,WAAA,CAAY,yBAAA,CAA0B,EAAA,WAAa,GAAA;ADdvD;;;;;;;;;;;;;;;;AAUA;;AAVA,iBCkCgB,oBAAA,YACH,cAAA,yBACO,mBAAA,CAAoB,EAAA,WAAA,CACtC,EAAA,EAAI,EAAA,EAAI,GAAA,EAAK,GAAA,EAAK,KAAA,EAAO,UAAA,CAAW,EAAA,EAAI,GAAA;;;;;;;;;;;;;;;;;;;;;;;iBA0D1B,uBAAA,YACH,cAAA,oBACE,wBAAA,CAAyB,EAAA,EAAA,CAEtC,EAAA,EAAI,EAAA,EACJ,IAAA,EAAM,IAAA,EACN,OAAA,GAAU,IAAA,EAAM,wBAAA,CAAyB,EAAA,EAAI,IAAA"}
|