@copilotkit/react-core 2.0.0-rc.8 → 2.0.0-rc.9
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-DAuVISwv.d.cts → MarkdownRendererContext-CS35epe1.d.mts} +5 -5
- package/dist/{MarkdownRendererContext-DAuVISwv.d.cts.map → MarkdownRendererContext-CS35epe1.d.mts.map} +1 -1
- package/dist/{MarkdownRendererContext-XWC2OXD5.d.mts → MarkdownRendererContext-CfTh92vk.d.cts} +5 -5
- package/dist/{MarkdownRendererContext-XWC2OXD5.d.mts.map → MarkdownRendererContext-CfTh92vk.d.cts.map} +1 -1
- package/dist/{MarkdownSurfaces-DQZM4lSI.cjs → MarkdownSurfaces-Ije2ZQh0.cjs} +16 -17
- package/dist/MarkdownSurfaces-Ije2ZQh0.cjs.map +1 -0
- package/dist/{MarkdownSurfaces-BXaxgpm_.mjs → MarkdownSurfaces-iFKorV2w.mjs} +5 -7
- package/dist/MarkdownSurfaces-iFKorV2w.mjs.map +1 -0
- package/dist/generative-ui.cjs +507 -506
- package/dist/generative-ui.cjs.map +1 -1
- package/dist/generative-ui.d.cts +2137 -4178
- package/dist/generative-ui.d.cts.map +1 -1
- package/dist/generative-ui.d.mts +2137 -4178
- package/dist/generative-ui.d.mts.map +1 -1
- package/dist/generative-ui.mjs +3 -3
- package/dist/generative-ui.mjs.map +1 -1
- package/dist/index.cjs +102 -335
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -51
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +13 -51
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +31 -307
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +118 -351
- package/dist/index.umd.js.map +1 -1
- package/package.json +14 -14
- package/dist/MarkdownSurfaces-BXaxgpm_.mjs.map +0 -1
- package/dist/MarkdownSurfaces-DQZM4lSI.cjs.map +0 -1
|
@@ -5,8 +5,7 @@ import { warnUnsupportedRichSyntaxOnce } from "@copilotkit/markdown-renderer";
|
|
|
5
5
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { A2UI_COMPONENT_ENVELOPE_KEYS, A2UI_INDEX_FUNCTION, A2UI_VERSION, DEFAULT_AGENT_ID, GENERATIVE_UI_ACTIVITY_TYPE, GENERATIVE_UI_CHAT_TARGET, GENERATIVE_UI_FUNCTIONS, GENERATIVE_UI_FUNCTION_CALL_ACTIVITY_TYPE, GENERATIVE_UI_RENDER_TOOL, GENERATIVE_UI_ROOT_ID, applyChildRefMarks, childIdsAtRefs, collectChildRefs, functionCallers, getOperationKind, hasBoundChildRef, isActionBinding, isCallBinding, isPathBinding, isValidationResult, mapAtChildRef, randomUUID, schemaToJsonSchema, validateOperation, ɵanySchema } from "@copilotkit/shared";
|
|
7
7
|
import { CopilotKitContext, useCopilotKit, useDefaultAgentId } from "@copilotkit/react-core/context";
|
|
8
|
-
import
|
|
9
|
-
import { zodToJsonSchema } from "zod-to-json-schema";
|
|
8
|
+
import * as z from "zod";
|
|
10
9
|
|
|
11
10
|
//#region src/components/chat/StreamingMarkdownDefaultRenderer.tsx
|
|
12
11
|
const defaultNodeRenderers = createStreamingMarkdownNodeRenderers({ codeBlock: ({ node }) => /* @__PURE__ */ jsx("pre", {
|
|
@@ -521,12 +520,11 @@ function defineToolCallRenderer(def) {
|
|
|
521
520
|
//#endregion
|
|
522
521
|
//#region src/generative-ui/json-schema.ts
|
|
523
522
|
/**
|
|
524
|
-
* JSON Schema for a Standard Schema
|
|
525
|
-
* inlined, no `$schema`. A prop marked by `child()` or `childList()`
|
|
523
|
+
* JSON Schema for a Standard Schema, without `$schema`. A prop marked by `child()` or `childList()`
|
|
526
524
|
* becomes an A2UI `$ref` to `ComponentId` or `ChildList`.
|
|
527
525
|
*/
|
|
528
526
|
function toJsonSchema(schema) {
|
|
529
|
-
const { $schema: _omit, ...rest } = schemaToJsonSchema(schema
|
|
527
|
+
const { $schema: _omit, ...rest } = schemaToJsonSchema(schema);
|
|
530
528
|
return applyChildRefMarks(rest);
|
|
531
529
|
}
|
|
532
530
|
|
|
@@ -3480,7 +3478,7 @@ const ContentSchema = z.object({
|
|
|
3480
3478
|
index: z.number(),
|
|
3481
3479
|
reason: z.string()
|
|
3482
3480
|
})).default([])
|
|
3483
|
-
}).
|
|
3481
|
+
}).loose();
|
|
3484
3482
|
function GenerativeUIChatActivity({ content, agent }) {
|
|
3485
3483
|
const runtime = useGenerativeUIRuntime();
|
|
3486
3484
|
const threadId = useCopilotChatConfiguration()?.threadId ?? agent?.threadId;
|
|
@@ -3690,4 +3688,4 @@ function MarkdownSurfaces({ content, messageId, isStreaming = false, ...markdown
|
|
|
3690
3688
|
|
|
3691
3689
|
//#endregion
|
|
3692
3690
|
export { GenerativeUIError as A, renderSlot as B, issueKey as C, getMarkdownSurfaceSource as D, containsDynamicValue as E, toJsonSchema as F, CopilotIcon as G, CopilotChatConfigurationProvider as H, defineToolCallRenderer as I, StreamingMarkdownDefaultRenderer as J, IconSvg as K, MarkdownRendererProvider as L, catalogIdsOf as M, componentCatalogIds as N, BASIC_FUNCTIONS as O, createGenerativeUI as P, useMarkdownRenderer as R, isAsyncIssue as S, withoutRejectedNulls as T, useCopilotChatConfiguration as U, ControlledModalOpenScope as V, useShallowStableRef as W, GenerativeUINodeContext as _, GenerativeUIToolCallRenderer as a, useRequiredGenerativeUIRuntime as b, SurfaceView as c, namedRole as d, useGenerativeUIAccessibility as f, useManagerVersion as g, useGenerativeUIState as h, GenerativeUIChatSlotContext as i, isRecord as j, ExpressionError as k, DARK_THEME_CSS as l, useGenerativeUIFunction as m, ProviderMarkdown as n, createGenerativeUIActivityRenderer as o, wrapperAria as p, cn as q, DefaultGenerativeUIChatCard as r, createGenerativeUIFunctionCallActivityRenderer as s, MarkdownSurfaces as t, controlAria as u, GenerativeUIRuntimeContext as v, validateSchemaSync as w, formatIssues as x, useGenerativeUIRuntime as y, isReactComponentType as z };
|
|
3693
|
-
//# sourceMappingURL=MarkdownSurfaces-
|
|
3691
|
+
//# sourceMappingURL=MarkdownSurfaces-iFKorV2w.mjs.map
|